+/** A virtual device associated with an input */
+class SR_API InputDevice :
+ public StructureWrapper<Input, struct sr_dev_inst>,
+ public Device
+{
+protected:
+ InputDevice(shared_ptr<Input> input, struct sr_dev_inst *sdi);
+ ~InputDevice();
+ shared_ptr<Input> input;
+ /** Deleter needed to allow shared_ptr use with protected destructor. */
+ class Deleter
+ {
+ public:
+ void operator()(InputDevice *device) { delete device; }
+ };
+ friend class Deleter;
+ friend class Input;
+};
+
+/** An option used by an output format */
+class SR_API Option
+{
+public:
+ /** Short name of this option suitable for command line usage. */
+ string get_id();
+ /** Short name of this option suitable for GUI usage. */
+ string get_name();
+ /** Description of this option in a sentence. */
+ string get_description();
+ /** Default value for this option. */
+ Glib::VariantBase get_default_value();
+ /** Possible values for this option, if a limited set. */
+ vector<Glib::VariantBase> get_values();
+protected:
+ Option(const struct sr_option *structure,
+ shared_ptr<const struct sr_option *> structure_array);
+ ~Option();
+ const struct sr_option *structure;
+ shared_ptr<const struct sr_option *> structure_array;
+ /** Deleter needed to allow shared_ptr use with protected destructor. */
+ class Deleter
+ {
+ public:
+ void operator()(Option *option) { delete option; }
+ };
+ friend class Deleter;
+ friend class OutputFormat;
+};
+