X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=sigrokdecode.h.in;h=3de1271eab3f1679cfcb038a44a8b6f5fb046df0;hp=ca069c528a3403ac478354267e8ea6ae1cb32f74;hb=3e1a99c0f8c5e9ace4748ff818146a70b9549092;hpb=54fdeeefffe31d32dddaf0f3d6a99dc7b3bc2448 diff --git a/sigrokdecode.h.in b/sigrokdecode.h.in index ca069c5..3de1271 100644 --- a/sigrokdecode.h.in +++ b/sigrokdecode.h.in @@ -155,7 +155,6 @@ enum { #define SRD_MAX_NUM_PROBES 64 -/* TODO: Documentation. */ struct srd_decoder { /** The decoder ID. Must be non-NULL and unique for all decoders. */ char *id; @@ -187,6 +186,9 @@ struct srd_decoder { */ GSList *annotations; + /** List of decoder options. */ + GSList *options; + /** Python module. */ PyObject *py_mod; @@ -209,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; @@ -267,20 +275,19 @@ typedef struct { SRD_API int srd_init(const char *path); SRD_API int srd_exit(void); SRD_API int srd_inst_option_set(struct srd_decoder_inst *di, - GHashTable *options); + GHashTable *options); SRD_API int srd_inst_probe_set_all(struct srd_decoder_inst *di, - GHashTable *probes); + GHashTable *probes); SRD_API struct srd_decoder_inst *srd_inst_new(const char *id, - GHashTable *options); + GHashTable *options); SRD_API int srd_inst_stack(struct srd_decoder_inst *di_from, - struct srd_decoder_inst *di_to); + struct srd_decoder_inst *di_to); SRD_API struct srd_decoder_inst *srd_inst_find_by_id(const char *inst_id); -SRD_API int srd_session_start(int num_probes, int unitsize, - uint64_t samplerate); +SRD_API int srd_session_start(int num_probes, int unitsize, uint64_t samplerate); SRD_API int srd_session_send(uint64_t start_samplenum, const uint8_t *inbuf, - uint64_t inbuflen); + uint64_t inbuflen); SRD_API int srd_pd_output_callback_add(int output_type, - srd_pd_output_callback_t cb, void *cb_data); + srd_pd_output_callback_t cb, void *cb_data); /*--- decoder.c -------------------------------------------------------------*/