projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #964 by adding an option to register the .sr extension with PV
[pulseview.git]
/
pv
/
devicemanager.hpp
diff --git
a/pv/devicemanager.hpp
b/pv/devicemanager.hpp
index fa116223305a179884c27d400d76b25c53e87caa..43d93a7a88f5778d0bed24bcead6ec1f2e9dc85e 100644
(file)
--- a/
pv/devicemanager.hpp
+++ b/
pv/devicemanager.hpp
@@
-14,72
+14,73
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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 <http://www.gnu.org/licenses/>.
*/
*/
-#ifndef PULSEVIEW_PV_DEVICEMANAGER_H
-#define PULSEVIEW_PV_DEVICEMANAGER_H
+#ifndef PULSEVIEW_PV_DEVICEMANAGER_H
PP
+#define PULSEVIEW_PV_DEVICEMANAGER_H
PP
#include <list>
#include <map>
#include <memory>
#include <string>
#include <list>
#include <map>
#include <memory>
#include <string>
+using std::list;
+using std::map;
+using std::shared_ptr;
+using std::string;
+
namespace Glib {
namespace Glib {
-
class VariantBase;
+class VariantBase;
}
namespace sigrok {
}
namespace sigrok {
- class ConfigKey;
- class Context;
- class Driver;
- class Device;
- class HardwareDevice;
+class ConfigKey;
+class Context;
+class Driver;
}
namespace pv {
}
namespace pv {
+namespace devices {
+class Device;
+class HardwareDevice;
+}
+
class Session;
class DeviceManager
{
public:
class Session;
class DeviceManager
{
public:
- DeviceManager(std::shared_ptr<sigrok::Context> context);
-
- ~DeviceManager();
-
- std::shared_ptr<sigrok::Context> context();
+ DeviceManager(shared_ptr<sigrok::Context> context);
- const std::list< std::shared_ptr<sigrok::HardwareDevice> >&
- devices() const;
+ ~DeviceManager() = default;
- std::list< std::shared_ptr<sigrok::HardwareDevice> > driver_scan(
- std::shared_ptr<sigrok::Driver> driver,
- std::map<const sigrok::ConfigKey *, Glib::VariantBase> drvopts);
+ const shared_ptr<sigrok::Context>& context() const;
- const std::map<std::string, std::string> get_device_info(
- const std::shared_ptr<sigrok::Device> device);
+ shared_ptr<sigrok::Context> context();
- const std::shared_ptr<sigrok::HardwareDevice> find_device_from_info(
- const std::map<std::string, std::string> search_info);
+ const list< shared_ptr<devices::HardwareDevice> >& devices() const;
- const std::string build_display_name(std::shared_ptr<sigrok::Device> device);
+ list< shared_ptr<devices::HardwareDevice> > driver_scan(
+ shared_ptr<sigrok::Driver> driver,
+ map<const sigrok::ConfigKey *, Glib::VariantBase> drvopts);
- const std::string get_display_name(std::shared_ptr<sigrok::Device> dev);
+ const map<string, string> get_device_info(
+ const shared_ptr<devices::Device> device);
- void update_display_name(std::shared_ptr<sigrok::Device> dev);
+ const shared_ptr<devices::HardwareDevice> find_device_from_info(
+ const map<string, string> search_info);
private:
private:
- bool compare_devices(s
td::shared_ptr<sigrok
::Device> a,
- s
td::shared_ptr<sigrok
::Device> b);
+ bool compare_devices(s
hared_ptr<devices
::Device> a,
+ s
hared_ptr<devices
::Device> b);
protected:
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_;
+ shared_ptr<sigrok::Context> context_;
+ list< shared_ptr<devices::HardwareDevice> > devices_;
};
} // namespace pv
};
} // namespace pv
-#endif // PULSEVIEW_PV_DEVICEMANAGER_H
+#endif // PULSEVIEW_PV_DEVICEMANAGER_H
PP