X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdevicemanager.h;h=0a8f2e0dca7d24fedb53cf7b734d321320ff180a;hb=6842b5fc481eb43d9aeea81f17e211820d6dc405;hp=2ce523dc6251d424921bba5a696a2fbcdcd100bd;hpb=85843b14c48affe67820ec8c9e357cd26e0ed943;p=pulseview.git diff --git a/pv/devicemanager.h b/pv/devicemanager.h index 2ce523dc..0a8f2e0d 100644 --- a/pv/devicemanager.h +++ b/pv/devicemanager.h @@ -25,10 +25,9 @@ #include #include +#include #include -#include - struct sr_context; struct sr_dev_driver; @@ -47,18 +46,16 @@ public: ~DeviceManager(); - const std::list< boost::shared_ptr >& + const std::list< std::shared_ptr >& devices() const; - void use_device(boost::shared_ptr dev_inst, - SigSession *owner); - - void release_device(boost::shared_ptr dev_inst); - - std::list< boost::shared_ptr > driver_scan( + std::list< std::shared_ptr > driver_scan( struct sr_dev_driver *const driver, GSList *const drvopts = NULL); + const std::shared_ptr find_device_from_info( + const std::map search_info); + private: void init_drivers(); @@ -68,14 +65,12 @@ private: void release_driver(struct sr_dev_driver *const driver); - static bool compare_devices(boost::shared_ptr a, - boost::shared_ptr b); + static bool compare_devices(std::shared_ptr a, + std::shared_ptr b); private: struct sr_context *const _sr_ctx; - std::list< boost::shared_ptr > _devices; - std::map< boost::shared_ptr, pv::SigSession*> - _used_devices; + std::list< std::shared_ptr > _devices; }; } // namespace pv