X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=libsigrokdecode-internal.h;h=6d60910f3b89904f2a313e8b53e98e36240fb211;hp=10b7fa7a01b8af629ac1243950cfe027d50d4dea;hb=0169f19c53e195df2f96c4df731ad3214c59e20a;hpb=30b770d5375522bd014502b9348aff3ee36e830d diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h index 10b7fa7..6d60910 100644 --- a/libsigrokdecode-internal.h +++ b/libsigrokdecode-internal.h @@ -24,20 +24,29 @@ #include "libsigrokdecode.h" +struct srd_session { + int session_id; + + /* List of decoder instances. */ + GSList *di_list; + + /* List of frontend callbacks to receive decoder output. */ + GSList *callbacks; +}; + /*--- controller.c ----------------------------------------------------------*/ SRD_PRIV int srd_decoder_searchpath_add(const char *path); -SRD_PRIV struct srd_decoder_inst *srd_inst_find_by_obj(const GSList *stack, - const PyObject *obj); -SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di, PyObject *args); -SRD_PRIV int srd_inst_decode(uint64_t start_samplenum, - const struct srd_decoder_inst *dec, - const uint8_t *inbuf, uint64_t inbuflen); +SRD_PRIV struct srd_decoder_inst *srd_inst_find_by_obj( const GSList *stack, + const PyObject *obj); +SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di); +SRD_PRIV int srd_inst_decode(const struct srd_decoder_inst *di, + uint64_t start_samplenum, uint64_t end_samplenum, + const uint8_t *inbuf, uint64_t inbuflen); SRD_PRIV void srd_inst_free(struct srd_decoder_inst *di); -SRD_PRIV void srd_inst_free_all(GSList *stack); -SRD_PRIV void *srd_pd_output_callback_find(int output_type); -SRD_PRIV int srd_inst_pd_output_add(struct srd_decoder_inst *di, - int output_type, const char *output_id); +SRD_PRIV void srd_inst_free_all(struct srd_session *sess, GSList *stack); +SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(struct srd_session *sess, + int output_type); /*--- exception.c -----------------------------------------------------------*/