diff options
Diffstat (limited to 'utils/hwstub/include/hwstub.hpp')
-rw-r--r-- | utils/hwstub/include/hwstub.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/hwstub/include/hwstub.hpp b/utils/hwstub/include/hwstub.hpp index 90b29ebf9d..96072dde4f 100644 --- a/utils/hwstub/include/hwstub.hpp +++ b/utils/hwstub/include/hwstub.hpp | |||
@@ -96,6 +96,12 @@ public: | |||
96 | * are still connected (or believe to be). This function will update the device | 96 | * are still connected (or believe to be). This function will update the device |
97 | * list. */ | 97 | * list. */ |
98 | error get_device_list(std::vector<std::shared_ptr<device>>& list); | 98 | error get_device_list(std::vector<std::shared_ptr<device>>& list); |
99 | |||
100 | /** Opaque device type */ | ||
101 | typedef void* ctx_dev_t; | ||
102 | typedef std::function<bool(ctx_dev_t)> device_filter_t; | ||
103 | /** Default device filter function accept any device */ | ||
104 | device_filter_t device_filter = [](ctx_dev_t d){(void)d; return true;}; | ||
99 | /** Force the context to update its internal list of devices. */ | 105 | /** Force the context to update its internal list of devices. */ |
100 | error update_list(); | 106 | error update_list(); |
101 | /** Ask the context to automatically poll for device changes. | 107 | /** Ask the context to automatically poll for device changes. |
@@ -130,8 +136,6 @@ protected: | |||
130 | void change_device(bool arrived, std::shared_ptr<device> dev); | 136 | void change_device(bool arrived, std::shared_ptr<device> dev); |
131 | /** Do device notification */ | 137 | /** Do device notification */ |
132 | void notify_device(bool arrived, std::shared_ptr<device> dev); | 138 | void notify_device(bool arrived, std::shared_ptr<device> dev); |
133 | /** Opaque device type */ | ||
134 | typedef void* ctx_dev_t; | ||
135 | /** Fetch the device list. Each item in the list is an opaque pointer. The function | 139 | /** Fetch the device list. Each item in the list is an opaque pointer. The function |
136 | * can also provide a pointer that will be used to free the list resources | 140 | * can also provide a pointer that will be used to free the list resources |
137 | * if necessary. Return <0 on error. */ | 141 | * if necessary. Return <0 on error. */ |