X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=8b9d29b2bf89e487c31bf12e030b98678d618e2c;hp=844a2b547cef8f353007e09029b855024c2a4f44;hb=7491a29f33471b38e161b3254f4d8e708b05f929;hpb=6e89374a6796f8d5d9cc61b0a2f7e98562a034ae diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 844a2b54..8b9d29b2 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -23,7 +23,7 @@ #include "signaldata.h" -#include +#include #include #include @@ -31,8 +31,6 @@ #include #include -#include - struct srd_decoder; struct srd_probe; struct srd_proto_data; @@ -54,6 +52,10 @@ class Annotation; namespace data { +namespace decode { +class Decoder; +} + class Logic; class DecoderStack : public QObject, public SignalData @@ -70,16 +72,8 @@ public: virtual ~DecoderStack(); - const srd_decoder* decoder() const; - - const std::map >& - probes() const; - void set_probes(std::map > probes); - - const GHashTable* options() const; - - void set_option(const char *id, GVariant *value); + const std::list< boost::shared_ptr >& stack() const; + void push(boost::shared_ptr decoder); const std::vector< boost::shared_ptr > annotations() const; @@ -88,9 +82,9 @@ public: void clear_snapshots(); -private: void begin_decode(); +private: void decode_proc(boost::shared_ptr data); static void annotation_callback(srd_proto_data *pdata, @@ -109,10 +103,7 @@ private: */ static boost::mutex _global_decode_mutex; - const srd_decoder *const _decoder; - std::map > - _probes; - GHashTable *_options; + std::list< boost::shared_ptr > _stack; mutable boost::mutex _mutex; std::vector< boost::shared_ptr >