]> sigrok.org Git - pulseview.git/blobdiff - pv/devicemanager.hpp
DeviceManager: Tidied up forward declarations
[pulseview.git] / pv / devicemanager.hpp
index 823cb2bc9542ee8632690be4780db421a8bcc1de..d6548ae12c99fe1b6f4e1310b742bd2ecdd87c45 100644 (file)
@@ -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 <list>
 #include <map>
 #include <string>
 
 namespace Glib {
-       class VariantBase;
+class VariantBase;
 }
 
 namespace sigrok {
-       class ConfigKey;
-       class Context;
-       class Driver;
-       class Device;
-       class HardwareDevice;
+class ConfigKey;
+class Context;
+class Driver;
+class Device;
+class HardwareDevice;
 }
 
 namespace pv {
 
-class SigSession;
+class Session;
 
 class DeviceManager
 {
@@ -49,6 +49,8 @@ public:
 
        ~DeviceManager();
 
+       const std::shared_ptr<sigrok::Context>& context() const;
+
        std::shared_ptr<sigrok::Context> context();
 
        const std::list< std::shared_ptr<sigrok::HardwareDevice> >&
@@ -64,10 +66,12 @@ public:
        const std::shared_ptr<sigrok::HardwareDevice> find_device_from_info(
                const std::map<std::string, std::string> search_info);
 
-       const std::string build_display_name(std::shared_ptr<sigrok::Device> device);
+       void build_display_name(std::shared_ptr<sigrok::Device> device);
 
        const std::string get_display_name(std::shared_ptr<sigrok::Device> dev);
 
+       const std::string get_full_name(std::shared_ptr<sigrok::Device> dev);
+
        void update_display_name(std::shared_ptr<sigrok::Device> dev);
 
 private:
@@ -77,9 +81,11 @@ private:
 protected:
        std::shared_ptr<sigrok::Context> context_;
        std::list< std::shared_ptr<sigrok::HardwareDevice> > devices_;
+
        std::map< std::shared_ptr<sigrok::Device>, std::string > display_names_;
+       std::map< std::shared_ptr<sigrok::Device>, std::string > full_names_;
 };
 
 } // namespace pv
 
-#endif // PULSEVIEW_PV_DEVICEMANAGER_H
+#endif // PULSEVIEW_PV_DEVICEMANAGER_HPP