X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.hpp;h=145f9e80a44e68fbfa96bafe027a4a2781c89e75;hp=fa116223305a179884c27d400d76b25c53e87caa;hb=09f55d9665efb3b17ba7de4bae47be6989e884fe;hpb=2b81ae4682ade4109ffa442794de36ceb32045eb diff --git a/pv/devicemanager.hpp b/pv/devicemanager.hpp index fa116223..145f9e80 100644 --- a/pv/devicemanager.hpp +++ b/pv/devicemanager.hpp @@ -14,12 +14,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_DEVICEMANAGER_H -#define PULSEVIEW_PV_DEVICEMANAGER_H +#ifndef PULSEVIEW_PV_DEVICEMANAGER_HPP +#define PULSEVIEW_PV_DEVICEMANAGER_HPP #include #include @@ -27,19 +26,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,39 +49,34 @@ 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); - const std::string build_display_name(std::shared_ptr device); - - const std::string get_display_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_; }; } // namespace pv -#endif // PULSEVIEW_PV_DEVICEMANAGER_H +#endif // PULSEVIEW_PV_DEVICEMANAGER_HPP