X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevice%2Fdevinst.h;h=9098027eb84e0674da978a65c38e67df3485c36f;hp=073813f2f7d1d03f418c05b07952ecc63fe784c4;hb=996b7c9da9b5cb56413e829217e1e7d7d7d520da;hpb=945745012eb57cefa1ef457daf48cfffa99f9ec2 diff --git a/pv/device/devinst.h b/pv/device/devinst.h index 073813f2..9098027e 100644 --- a/pv/device/devinst.h +++ b/pv/device/devinst.h @@ -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