X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.hpp;h=d0d11cbd4d7095bcf7f1b3fede305bd83a8a711e;hp=5aed775821300805ebc279439dab11995d2f8894;hb=956a945e4d42d0d7718e6f1364d567f5e25ebf49;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f diff --git a/pv/devicemanager.hpp b/pv/devicemanager.hpp index 5aed7758..d0d11cbd 100644 --- a/pv/devicemanager.hpp +++ b/pv/devicemanager.hpp @@ -27,19 +27,22 @@ #include namespace Glib { - class VariantBase; +class VariantBase; } namespace sigrok { - class ConfigKey; - class Context; - class Driver; - class Device; - class HardwareDevice; +class ConfigKey; +class Context; +class Driver; } namespace pv { +namespace devices { +class Device; +class HardwareDevice; +} + class Session; class DeviceManager @@ -47,41 +50,32 @@ class DeviceManager public: DeviceManager(std::shared_ptr context); - ~DeviceManager(); + ~DeviceManager() = default; + + const std::shared_ptr& context() const; std::shared_ptr context(); - const std::list< std::shared_ptr >& + const std::list< std::shared_ptr >& devices() const; - std::list< std::shared_ptr > driver_scan( + std::list< std::shared_ptr > driver_scan( std::shared_ptr driver, std::map drvopts); const std::map get_device_info( - const std::shared_ptr device); + const std::shared_ptr device); - const std::shared_ptr find_device_from_info( + const std::shared_ptr find_device_from_info( const std::map search_info); - void build_display_name(std::shared_ptr device); - - const std::string get_display_name(std::shared_ptr dev); - - const std::string get_full_name(std::shared_ptr dev); - - void update_display_name(std::shared_ptr dev); - private: - bool compare_devices(std::shared_ptr a, - std::shared_ptr b); + bool compare_devices(std::shared_ptr a, + std::shared_ptr b); protected: std::shared_ptr context_; - std::list< std::shared_ptr > devices_; - - std::map< std::shared_ptr, std::string > display_names_; - std::map< std::shared_ptr, std::string > full_names_; + std::list< std::shared_ptr > devices_; }; } // namespace pv