]> sigrok.org Git - pulseview.git/blobdiff - pv/devicemanager.h
icons: Renamed probe.svg to channels.svg
[pulseview.git] / pv / devicemanager.h
index 070c3cc7d94ef202e52968333d3ec608589768bc..ca86a7fe9c15c69f727ccbf3b04711a8650e8250 100644 (file)
 #include <glib.h>
 
 #include <list>
+#include <memory>
+#include <string>
 
 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<sr_dev_inst*>& devices() const;
+       const std::list< std::shared_ptr<pv::device::Device> >&
+               devices() const;
 
-       std::list<sr_dev_inst*> driver_scan(
+       std::list< std::shared_ptr<pv::device::Device> > 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<device::Device> a,
+               std::shared_ptr<device::Device> b);
 
 private:
        struct sr_context *const _sr_ctx;
-       std::list<sr_dev_inst*> _devices;
+       std::list< std::shared_ptr<pv::device::Device> > _devices;
 };
 
 } // namespace pv