projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Subclass QApplication to catch exceptions in handlers.
[pulseview.git]
/
pv
/
devicemanager.h
diff --git
a/pv/devicemanager.h
b/pv/devicemanager.h
index b7f2d49a7e016ce49e6b66dc0124b17b1779dbb3..ca86a7fe9c15c69f727ccbf3b04711a8650e8250 100644
(file)
--- a/
pv/devicemanager.h
+++ b/
pv/devicemanager.h
@@
-24,17
+24,20
@@
#include <glib.h>
#include <list>
#include <glib.h>
#include <list>
-#include <m
ap
>
+#include <m
emory
>
#include <string>
struct sr_context;
struct sr_dev_driver;
#include <string>
struct sr_context;
struct sr_dev_driver;
-struct sr_dev_inst;
namespace pv {
class SigSession;
namespace pv {
class SigSession;
+namespace device {
+class Device;
+}
+
class DeviceManager
{
public:
class DeviceManager
{
public:
@@
-42,18
+45,13
@@
public:
~DeviceManager();
~DeviceManager();
- const std::list<sr_dev_inst*>& devices() const;
-
- void use_device(sr_dev_inst *sdi, SigSession *owner);
+ const std::list< std::shared_ptr<pv::device::Device> >&
+ devices() const;
- void release_device(sr_dev_inst *sdi);
-
- std::list<sr_dev_inst*> driver_scan(
+ std::list< std::shared_ptr<pv::device::Device> > driver_scan(
struct sr_dev_driver *const driver,
GSList *const drvopts = NULL);
struct sr_dev_driver *const driver,
GSList *const drvopts = NULL);
- static std::string format_device_title(const sr_dev_inst *const sdi);
-
private:
void init_drivers();
private:
void init_drivers();
@@
-63,13
+61,12
@@
private:
void release_driver(struct sr_dev_driver *const driver);
void release_driver(struct sr_dev_driver *const driver);
- static bool compare_devices(
const sr_dev_inst *const
a,
-
const sr_dev_inst *const
b);
+ static bool compare_devices(
std::shared_ptr<device::Device>
a,
+
std::shared_ptr<device::Device>
b);
private:
struct sr_context *const _sr_ctx;
private:
struct sr_context *const _sr_ctx;
- std::list<sr_dev_inst*> _devices;
- std::map<sr_dev_inst*, pv::SigSession*> _used_devices;
+ std::list< std::shared_ptr<pv::device::Device> > _devices;
};
} // namespace pv
};
} // namespace pv