X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Flibsigrok-internal.h;h=89cfb599c950d9dca6c483a79d9ca24b55ae0caa;hb=b84cba4dbf2a78806848f9dbaf10238a18daf735;hp=0214fffbb6492b9e47d9652e9dda7393a9e0136c;hpb=17bfaca62aaacec71c6da4bd927af051727593b6;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 0214fffb..89cfb599 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -168,6 +168,21 @@ struct sr_context { #endif }; +/** Input module metadata keys. */ +enum sr_input_meta_keys { + /** The input filename, if there is one. */ + SR_INPUT_META_FILENAME = 0x01, + /** The input file's size in bytes. */ + 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, +}; + /** Input (file) module struct. */ struct sr_input { /** @@ -182,21 +197,21 @@ struct sr_input { /** Input (file) module driver. */ struct sr_input_module { /** - * A unique ID for this output module, suitable for use in command-line + * A unique ID for this input module, suitable for use in command-line * clients, [a-z0-9-]. Must not be NULL. */ const char *id; /** - * A unique name for this output module, suitable for use in GUI + * A unique name for this input module, suitable for use in GUI * clients, can contain UTF-8. Must not be NULL. */ const char *name; /** - * A short description of the output module. Must not be NULL. + * A short description of the input module. Must not be NULL. * - * This can be displayed by frontends, e.g. when selecting the output + * This can be displayed by frontends, e.g. when selecting the input * module for saving a file. */ const char *desc;