X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdevicemanager.hpp;h=8bceed34ff409d7a1a7769d0ad2c9c7fcf6a1f4f;hb=da30ecb7e72bd2547e524258efa5ec642988b70b;hp=823cb2bc9542ee8632690be4780db421a8bcc1de;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329;p=pulseview.git diff --git a/pv/devicemanager.hpp b/pv/devicemanager.hpp index 823cb2b..8bceed3 100644 --- a/pv/devicemanager.hpp +++ b/pv/devicemanager.hpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_DEVICEMANAGER_H -#define PULSEVIEW_PV_DEVICEMANAGER_H +#ifndef PULSEVIEW_PV_DEVICEMANAGER_HPP +#define PULSEVIEW_PV_DEVICEMANAGER_HPP #include #include @@ -27,20 +27,23 @@ #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 { -class SigSession; +namespace devices { +class Device; +class HardwareDevice; +} + +class Session; class DeviceManager { @@ -49,37 +52,44 @@ public: ~DeviceManager(); + 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); - const std::string build_display_name(std::shared_ptr device); + void build_display_name(std::shared_ptr device); - const std::string get_display_name(std::shared_ptr dev); + const std::string get_display_name( + std::shared_ptr dev); - void update_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::list< std::shared_ptr > devices_; + + std::map< std::shared_ptr, std::string > display_names_; + std::map< std::shared_ptr, std::string > full_names_; }; } // namespace pv -#endif // PULSEVIEW_PV_DEVICEMANAGER_H +#endif // PULSEVIEW_PV_DEVICEMANAGER_HPP