X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=sigrok.h.in;h=7b3f122e72b765bb6541f3413dab4db9d1a41e3c;hb=3217b032053d6eb89ca31b01968715813bcbe1bb;hp=358743851e2ac57125f03684d662368b6307ea23;hpb=4937b2355156f954d6fc3c1daf258d3825582743;p=libsigrok.git diff --git a/sigrok.h.in b/sigrok.h.in index 35874385..7b3f122e 100644 --- a/sigrok.h.in +++ b/sigrok.h.in @@ -30,6 +30,38 @@ extern "C" { #endif +/* + * Package version macros (can be used for conditional compilation). + */ + +/** The libsigrok package 'major' version number. */ +#define SR_PACKAGE_VERSION_MAJOR @SR_PACKAGE_VERSION_MAJOR@ + +/** The libsigrok package 'minor' version number. */ +#define SR_PACKAGE_VERSION_MINOR @SR_PACKAGE_VERSION_MINOR@ + +/** The libsigrok package 'micro' version number. */ +#define SR_PACKAGE_VERSION_MICRO @SR_PACKAGE_VERSION_MICRO@ + +/** The libsigrok package version ("major.minor.micro") as string. */ +#define SR_PACKAGE_VERSION_STRING "@SR_PACKAGE_VERSION@" + +/* + * Library/libtool version macros (can be used for conditional compilation). + */ + +/** The libsigrok libtool 'current' version number. */ +#define SR_LIB_VERSION_CURRENT @SR_LIB_VERSION_CURRENT@ + +/** The libsigrok libtool 'revision' version number. */ +#define SR_LIB_VERSION_REVISION @SR_LIB_VERSION_REVISION@ + +/** The libsigrok libtool 'age' version number. */ +#define SR_LIB_VERSION_AGE @SR_LIB_VERSION_AGE@ + +/** The libsigrok libtool version ("current:revision:age") as string. */ +#define SR_LIB_VERSION_STRING "@SR_LIB_VERSION@" + /* * Status/error codes returned by libsigrok functions. * @@ -83,14 +115,25 @@ extern "C" { * * This uses the 'visibility' feature of gcc (requires gcc >= 4.0). * + * This feature is not available on MinGW/Windows, as it is a feature of + * ELF files and MinGW/Windows uses PE files. + * * Details: http://gcc.gnu.org/wiki/Visibility */ /* Marks public libsigrok API symbols. */ +#ifndef _WIN32 #define SR_API __attribute__((visibility("default"))) +#else +#define SR_API +#endif /* Marks private, non-public libsigrok symbols (not part of the API). */ +#ifndef _WIN32 #define SR_PRIV __attribute__((visibility("hidden"))) +#else +#define SR_PRIV +#endif typedef int (*sr_receive_data_callback_t)(int fd, int revents, void *cb_data); @@ -154,9 +197,10 @@ struct sr_output_format { char *description; int df_type; int (*init) (struct sr_output *o); - int (*data) (struct sr_output *o, const char *data_in, - uint64_t length_in, char **data_out, uint64_t *length_out); - int (*event) (struct sr_output *o, int event_type, char **data_out, + int (*data) (struct sr_output *o, const uint8_t *data_in, + uint64_t length_in, uint8_t **data_out, + uint64_t *length_out); + int (*event) (struct sr_output *o, int event_type, uint8_t **data_out, uint64_t *length_out); };