X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevicemanager.hpp;h=43d93a7a88f5778d0bed24bcead6ec1f2e9dc85e;hp=d6548ae12c99fe1b6f4e1310b742bd2ecdd87c45;hb=1978e0c26e20c0ffbea35add4c7bae0075aec4c7;hpb=c732664f019d4934da970f4656c4857a4aa35398 diff --git a/pv/devicemanager.hpp b/pv/devicemanager.hpp index d6548ae1..43d93a7a 100644 --- a/pv/devicemanager.hpp +++ b/pv/devicemanager.hpp @@ -14,8 +14,7 @@ * 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_HPP @@ -26,6 +25,11 @@ #include #include +using std::list; +using std::map; +using std::shared_ptr; +using std::string; + namespace Glib { class VariantBase; } @@ -34,56 +38,47 @@ namespace sigrok { class ConfigKey; class Context; class Driver; -class Device; -class HardwareDevice; } namespace pv { +namespace devices { +class Device; +class HardwareDevice; +} + class Session; class DeviceManager { public: - DeviceManager(std::shared_ptr context); - - ~DeviceManager(); - - const std::shared_ptr& context() const; + DeviceManager(shared_ptr context); - std::shared_ptr context(); + ~DeviceManager() = default; - const std::list< std::shared_ptr >& - devices() const; + const shared_ptr& context() const; - std::list< std::shared_ptr > driver_scan( - std::shared_ptr driver, - std::map drvopts); + shared_ptr context(); - const std::map get_device_info( - const std::shared_ptr device); + const list< shared_ptr >& devices() const; - const std::shared_ptr find_device_from_info( - const std::map search_info); + list< shared_ptr > driver_scan( + shared_ptr driver, + map drvopts); - void build_display_name(std::shared_ptr device); + const map get_device_info( + const 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); + 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); 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_; + shared_ptr context_; + list< shared_ptr > devices_; }; } // namespace pv