diff options
author | Bert Vermeulen <bert@biot.com> | 2013-03-19 01:47:53 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2013-03-19 01:58:22 +0100 |
commit | 2f395bff8f096ef738140913e2d01ff0a8c07002 (patch) | |
tree | 4ea2f246a5acaea67945a0ff52998e715b26fcec /sigrokdecode.h.in | |
parent | 0ff2d191726ef2e5a30ce697c7c93e4b0b1605f3 (diff) | |
download | libsigrokdecode-2f395bff8f096ef738140913e2d01ff0a8c07002.tar.gz libsigrokdecode-2f395bff8f096ef738140913e2d01ff0a8c07002.zip |
use GVariant for passing decoder options and probes
Decoder options are now exposed in struct srd_decoder, via a GSList
of the new struct srd_decoder_option. The 'def' field represents
the default value as set in the decoder, converted to GVariant. This
allows a library user to determine the type as well as default value.
Diffstat (limited to 'sigrokdecode.h.in')
-rw-r--r-- | sigrokdecode.h.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sigrokdecode.h.in b/sigrokdecode.h.in index a7221fa..3de1271 100644 --- a/sigrokdecode.h.in +++ b/sigrokdecode.h.in @@ -186,6 +186,9 @@ struct srd_decoder { */ GSList *annotations; + /** List of decoder options. */ + GSList *options; + /** Python module. */ PyObject *py_mod; @@ -208,6 +211,12 @@ struct srd_probe { int order; }; +struct srd_decoder_option { + char *id; + char *desc; + GVariant *def; +}; + struct srd_decoder_inst { struct srd_decoder *decoder; PyObject *py_inst; |