- InputFileDevice(shared_ptr<InputFormat> format,
- struct sr_input *input, string filename);
- ~InputFileDevice();
- struct sr_input *input;
- shared_ptr<InputFormat> format;
- string filename;
- /** Deleter needed to allow shared_ptr use with protected destructor. */
- class Deleter
- {
- public:
- void operator()(InputFileDevice *device) { delete device; }
- };
+ Input(shared_ptr<Context> context, const struct sr_input *structure);
+ ~Input();
+ shared_ptr<Context> _context;
+ InputDevice *_device;
+ friend class Deleter;
+ friend class Context;
+ friend class InputFormat;
+};
+
+/** A virtual device associated with an input */
+class SR_API InputDevice :
+ public ParentOwned<InputDevice, Input, struct sr_dev_inst>,
+ public Device
+{
+protected:
+ InputDevice(shared_ptr<Input> input, struct sr_dev_inst *sdi);
+ ~InputDevice();
+ shared_ptr<Device> get_shared_from_this();
+ shared_ptr<Input> _input;
+ friend class Input;
+};
+
+/** An option used by an output format */
+class SR_API Option : public UserOwned<Option, const struct sr_option>
+{
+public:
+ /** Short name of this option suitable for command line usage. */
+ string id();
+ /** Short name of this option suitable for GUI usage. */
+ string name();
+ /** Description of this option in a sentence. */
+ string description();
+ /** Default value for this option. */
+ Glib::VariantBase default_value();
+ /** Possible values for this option, if a limited set. */
+ vector<Glib::VariantBase> values();
+protected:
+ Option(const struct sr_option *structure,
+ shared_ptr<const struct sr_option *> structure_array);
+ ~Option();
+ shared_ptr<const struct sr_option *> _structure_array;