#ifndef PULSEVIEW_PV_PROP_BINDING_DECODEROPTIONS_H
#define PULSEVIEW_PV_PROP_BINDING_DECODEROPTIONS_H
-#include <glib.h>
-
#include "binding.h"
+#include <pv/prop/property.h>
+
+struct srd_decoder_option;
+
namespace pv {
namespace data {
+class DecoderStack;
+namespace decode {
class Decoder;
}
+}
namespace prop {
namespace binding {
class DecoderOptions : public Binding
{
public:
- DecoderOptions(boost::shared_ptr<pv::data::Decoder> decoder);
+ DecoderOptions(std::shared_ptr<pv::data::DecoderStack> decoder_stack,
+ std::shared_ptr<pv::data::decode::Decoder> decoder);
private:
- GVariant* getter(const char *id);
+ static std::shared_ptr<Property> bind_enum(const QString &name,
+ const srd_decoder_option *option,
+ Property::Getter getter, Property::Setter setter);
+
+ Glib::VariantBase getter(const char *id);
- void setter(const char *id, GVariant *value);
+ void setter(const char *id, Glib::VariantBase value);
private:
- boost::shared_ptr<pv::data::Decoder> _decoder;
+ std::shared_ptr<pv::data::DecoderStack> _decoder_stack;
+ std::shared_ptr<pv::data::decode::Decoder> _decoder;
};
} // binding