X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.h;h=acef8a42d93ba2b1f1d1f5475717ab3a97557079;hp=f4be73b9274565e93832becba4e01985a54dece0;hb=8bd26d8b9c831b509ee3241ea4dac6f50c023622;hpb=dd63af740355865cc0659dfba74ecf4445414bc8 diff --git a/pv/devicemanager.h b/pv/devicemanager.h index f4be73b9..acef8a42 100644 --- a/pv/devicemanager.h +++ b/pv/devicemanager.h @@ -26,12 +26,19 @@ #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: @@ -39,27 +46,28 @@ public: ~DeviceManager(); - const std::list& devices() const; + const std::list< boost::shared_ptr >& + devices() const; - std::list driver_scan( + std::list< boost::shared_ptr > driver_scan( 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(); - 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(boost::shared_ptr a, + boost::shared_ptr b); private: struct sr_context *const _sr_ctx; - std::list _devices; + std::list< boost::shared_ptr > _devices; }; } // namespace pv