X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.hpp;h=2c9343001211409e8e836d95c9d5d623417ebcd2;hp=145f9e80a44e68fbfa96bafe027a4a2781c89e75;hb=6e2a5b1d677a26a637465cd4d304e2bc52e14f36;hpb=efdec55aec1a137460fa362a381ed1904182bfed diff --git a/pv/devicemanager.hpp b/pv/devicemanager.hpp index 145f9e80..2c934300 100644 --- a/pv/devicemanager.hpp +++ b/pv/devicemanager.hpp @@ -23,7 +23,16 @@ #include #include #include +#include #include +#include + +using std::list; +using std::map; +using std::set; +using std::shared_ptr; +using std::string; +using std::vector; namespace Glib { class VariantBase; @@ -35,6 +44,8 @@ class Context; class Driver; } +using sigrok::ConfigKey; + namespace pv { namespace devices { @@ -47,34 +58,39 @@ class Session; class DeviceManager { public: - DeviceManager(std::shared_ptr context); + DeviceManager(shared_ptr context, std::string driver); ~DeviceManager() = default; - const std::shared_ptr& context() const; + const shared_ptr& context() const; - std::shared_ptr context(); + shared_ptr context(); - const std::list< std::shared_ptr >& - devices() const; + const list< shared_ptr >& devices() const; + shared_ptr user_spec_device() const; - std::list< std::shared_ptr > driver_scan( - std::shared_ptr driver, - std::map drvopts); + list< shared_ptr > driver_scan( + shared_ptr driver, + map drvopts); - const std::map get_device_info( - const std::shared_ptr device); + const map get_device_info( + const shared_ptr device); - const std::shared_ptr find_device_from_info( - const std::map search_info); + const shared_ptr find_device_from_info( + const map search_info); private: - bool compare_devices(std::shared_ptr a, - std::shared_ptr b); + bool compare_devices(shared_ptr a, + shared_ptr b); + + static map + drive_scan_options(vector user_spec, + set driver_opts); protected: - std::shared_ptr context_; - std::list< std::shared_ptr > devices_; + shared_ptr context_; + list< shared_ptr > devices_; + shared_ptr user_spec_device_; }; } // namespace pv