]> sigrok.org Git - pulseview.git/blobdiff - pv/devicemanager.h
Rename 'probe' to 'channel' (libsigrokdecode change).
[pulseview.git] / pv / devicemanager.h
index 891ba3d2c1ac28a254917a7da49def32828779d2..acef8a42d93ba2b1f1d1f5475717ab3a97557079 100644 (file)
@@ -24,7 +24,6 @@
 #include <glib.h>
 
 #include <list>
-#include <map>
 #include <string>
 
 #include <boost/shared_ptr.hpp>
@@ -34,9 +33,12 @@ struct sr_dev_driver;
 
 namespace pv {
 
-class DevInst;
 class SigSession;
 
+namespace device {
+class Device;
+}
+
 class DeviceManager
 {
 public:
@@ -44,14 +46,10 @@ public:
 
        ~DeviceManager();
 
-       const std::list< boost::shared_ptr<pv::DevInst> >& devices() const;
-
-       void use_device(boost::shared_ptr<pv::DevInst> dev_inst,
-               SigSession *owner);
-
-       void release_device(boost::shared_ptr<pv::DevInst> dev_inst);
+       const std::list< boost::shared_ptr<pv::device::Device> >&
+               devices() const;
 
-       std::list< boost::shared_ptr<DevInst> > driver_scan(
+       std::list< boost::shared_ptr<pv::device::Device> > driver_scan(
                struct sr_dev_driver *const driver,
                GSList *const drvopts = NULL);
 
@@ -64,14 +62,12 @@ private:
 
        void release_driver(struct sr_dev_driver *const driver);
 
-       static bool compare_devices(boost::shared_ptr<DevInst> a,
-               boost::shared_ptr<DevInst> b);
+       static bool compare_devices(boost::shared_ptr<device::Device> a,
+               boost::shared_ptr<device::Device> b);
 
 private:
        struct sr_context *const _sr_ctx;
-       std::list< boost::shared_ptr<pv::DevInst> > _devices;
-       std::map< boost::shared_ptr<pv::DevInst>, pv::SigSession*>
-               _used_devices;
+       std::list< boost::shared_ptr<pv::device::Device> > _devices;
 };
 
 } // namespace pv