]> sigrok.org Git - pulseview.git/blobdiff - pv/device/devinst.h
Moved DeviceManager::use_device and release_device into DevInst
[pulseview.git] / pv / device / devinst.h
index 073813f2f7d1d03f418c05b07952ecc63fe784c4..9098027eb84e0674da978a65c38e67df3485c36f 100644 (file)
@@ -36,18 +36,28 @@ struct sr_probe;
 struct sr_probe_group;
 
 namespace pv {
+
+class SigSession;
+
 namespace device {
 
 class DevInst : public QObject
 {
        Q_OBJECT
 
-public:
+protected:
        DevInst(sr_dev_inst *sdi);
 
+public:
        sr_dev_inst* dev_inst() const;
 
-       std::string format_device_title() const;
+       void use(SigSession *owner);
+
+       void release();
+
+       SigSession* owner() const;
+
+       virtual std::string format_device_title() const = 0;
 
        GVariant* get_config(const sr_probe_group *group, int key);
 
@@ -68,8 +78,9 @@ public:
 signals:
        void config_changed();
 
-private:
+protected:
        sr_dev_inst *const _sdi;
+       SigSession *_owner;
 };
 
 } // device