]> sigrok.org Git - pulseview.git/blobdiff - pv/devicemanager.h
Rename 'probe' to 'channel' (libsigrokdecode change).
[pulseview.git] / pv / devicemanager.h
index f4be73b9274565e93832becba4e01985a54dece0..acef8a42d93ba2b1f1d1f5475717ab3a97557079 100644 (file)
 #include <list>
 #include <string>
 
 #include <list>
 #include <string>
 
+#include <boost/shared_ptr.hpp>
+
 struct sr_context;
 struct sr_dev_driver;
 struct sr_context;
 struct sr_dev_driver;
-struct sr_dev_inst;
 
 namespace pv {
 
 
 namespace pv {
 
+class SigSession;
+
+namespace device {
+class Device;
+}
+
 class DeviceManager
 {
 public:
 class DeviceManager
 {
 public:
@@ -39,27 +46,28 @@ public:
 
        ~DeviceManager();
 
 
        ~DeviceManager();
 
-       const std::list<sr_dev_inst*>& devices() const;
+       const std::list< boost::shared_ptr<pv::device::Device> >&
+               devices() const;
 
 
-       std::list<sr_dev_inst*> driver_scan(
+       std::list< boost::shared_ptr<pv::device::Device> > driver_scan(
                struct sr_dev_driver *const driver,
                GSList *const drvopts = NULL);
 
                struct sr_dev_driver *const driver,
                GSList *const drvopts = NULL);
 
-       static std::string format_device_title(const sr_dev_inst *const sdi);
-
 private:
        void init_drivers();
 
 private:
        void init_drivers();
 
-       static void release_devices();
+       void release_devices();
 
        void scan_all_drivers();
 
 
        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(boost::shared_ptr<device::Device> a,
+               boost::shared_ptr<device::Device> b);
 
 private:
        struct sr_context *const _sr_ctx;
 
 private:
        struct sr_context *const _sr_ctx;
-       std::list<sr_dev_inst*> _devices;
+       std::list< boost::shared_ptr<pv::device::Device> > _devices;
 };
 
 } // namespace pv
 };
 
 } // namespace pv