]> sigrok.org Git - libsigrokdecode.git/blobdiff - libsigrokdecode.h
Make srd_inst_decode() return the actual decoder state, not SRD_OK
[libsigrokdecode.git] / libsigrokdecode.h
index ee610c939d3398ded1e068953fb3edec0c95eab7..deba470149306de3b30289affa6b7e38c53ee843 100644 (file)
@@ -71,6 +71,7 @@ enum srd_error_code {
        SRD_ERR_BUG          = -4, /**< Errors hinting at internal bugs */
        SRD_ERR_PYTHON       = -5, /**< Python C API error */
        SRD_ERR_DECODERS_DIR = -6, /**< Protocol decoder path invalid */
+       SRD_ERR_TERM_REQ     = -7, /**< Termination requested */
 
        /*
         * Note: When adding entries here, don't forget to also update the
@@ -276,6 +277,9 @@ struct srd_decoder_inst {
        /** Requests termination of wait() and decode(). */
        gboolean want_wait_terminate;
 
+       /** Indicates the current state of the decoder stack. */
+       int decoder_state;
+
        GCond got_new_samples_cond;
        GCond handled_all_samples_cond;
        GMutex data_mutex;