X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Flibsigrok-internal.h;h=84ad295ef61de0ee1204e83c54299668cf6fe1b6;hb=2c24077466a299ead689c90f01f55f6d86c7386b;hp=89ff993f3d5129e02a41b1c75fc3c51e76d14c5e;hpb=5faebab2903dc91949edc31f0a4b118d86090a30;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 89ff993f..84ad295e 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -223,8 +223,6 @@ enum sr_input_meta_keys { SR_INPUT_META_FILESIZE = 0x02, /** The first 128 bytes of the file, provided as a GString. */ SR_INPUT_META_HEADER = 0x04, - /** The file's MIME type. */ - SR_INPUT_META_MIMETYPE = 0x08, /** The module cannot identify a file without this metadata. */ SR_INPUT_META_REQUIRED = 0x80, @@ -280,7 +278,6 @@ struct sr_input_module { * SR_INPUT_META_FILENAME * SR_INPUT_META_FILESIZE * SR_INPUT_META_HEADER - * SR_INPUT_META_MIMETYPE * * If the high bit (SR_INPUT META_REQUIRED) is set, the module cannot * identify a stream without the given metadata. @@ -291,7 +288,7 @@ struct sr_input_module { * Returns a NULL-terminated list of options this module can take. * Can be NULL, if the module has no options. */ - struct sr_option *(*options) (void); + const struct sr_option *(*options) (void); /** * Check if this input module can load and parse the specified stream. @@ -386,7 +383,7 @@ struct sr_output_module { * A unique ID for this output module, suitable for use in command-line * clients, [a-z0-9-]. Must not be NULL. */ - char *id; + const char *id; /** * A unique name for this output module, suitable for use in GUI @@ -400,7 +397,7 @@ struct sr_output_module { * This can be displayed by frontends, e.g. when selecting the output * module for saving a file. */ - char *desc; + const char *desc; /** * A NULL terminated array of strings containing a list of file name @@ -494,7 +491,7 @@ struct sr_transform_module { * A unique ID for this transform module, suitable for use in * command-line clients, [a-z0-9-]. Must not be NULL. */ - char *id; + const char *id; /** * A unique name for this transform module, suitable for use in GUI @@ -508,7 +505,7 @@ struct sr_transform_module { * This can be displayed by frontends, e.g. when selecting * which transform module(s) to add. */ - char *desc; + const char *desc; /** * Returns a NULL-terminated list of options this transform module @@ -754,12 +751,18 @@ SR_PRIV void sr_packet_free(struct sr_datafeed_packet *packet); /*--- session_file.c --------------------------------------------------------*/ +#if !HAVE_ZIP_DISCARD +/* Replace zip_discard() if not available. */ +#define zip_discard(zip) sr_zip_discard(zip) +SR_PRIV void sr_zip_discard(struct zip *archive); +#endif + SR_PRIV GKeyFile *sr_sessionfile_read_metadata(struct zip *archive, const struct zip_stat *entry); /*--- analog.c --------------------------------------------------------------*/ -SR_PRIV int sr_analog_init(struct sr_datafeed_analog2 *analog, +SR_PRIV int sr_analog_init(struct sr_datafeed_analog *analog, struct sr_analog_encoding *encoding, struct sr_analog_meaning *meaning, struct sr_analog_spec *spec,