X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdevicemanager.h;h=ca86a7fe9c15c69f727ccbf3b04711a8650e8250;hb=512bfc565937c0c1b07ec0e6486831526a6e1eee;hp=070c3cc7d94ef202e52968333d3ec608589768bc;hpb=107ca6d350b51186d12dac9273f6ed130b3f5dd7;p=pulseview.git diff --git a/pv/devicemanager.h b/pv/devicemanager.h index 070c3cc7..ca86a7fe 100644 --- a/pv/devicemanager.h +++ b/pv/devicemanager.h @@ -24,13 +24,20 @@ #include #include +#include +#include struct sr_context; struct sr_dev_driver; -struct sr_dev_inst; namespace pv { +class SigSession; + +namespace device { +class Device; +} + class DeviceManager { public: @@ -38,25 +45,28 @@ public: ~DeviceManager(); - const std::list& devices() const; + const std::list< std::shared_ptr >& + devices() const; - std::list driver_scan( + std::list< std::shared_ptr > driver_scan( struct sr_dev_driver *const driver, GSList *const drvopts = NULL); private: void init_drivers(); - static void release_devices(); + void release_devices(); void scan_all_drivers(); - static bool compare_devices(const sr_dev_inst *const a, - const sr_dev_inst *const b); + void release_driver(struct sr_dev_driver *const driver); + + static bool compare_devices(std::shared_ptr a, + std::shared_ptr b); private: struct sr_context *const _sr_ctx; - std::list _devices; + std::list< std::shared_ptr > _devices; }; } // namespace pv