summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2010-07-05 13:10:41 +0000
committerNikolai Kondrashov <spbnick@gmail.com>2010-07-05 13:10:41 +0000
commit872079ec9051bb2b86ec19a5e5a290b40be3b89f (patch)
tree737a2b25b32f682fa6caef32c4c11e63cc8f00be /include
parent8d2a9a44388f168da91401beab36bc51cebc5e23 (diff)
downloadusbhid-dump-872079ec9051bb2b86ec19a5e5a290b40be3b89f.tar.gz
Added interface claiming/releasing.
Diffstat (limited to 'include')
-rw-r--r--include/hid_dump/iface.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/hid_dump/iface.h b/include/hid_dump/iface.h
index 54b3b00..979928a 100644
--- a/include/hid_dump/iface.h
+++ b/include/hid_dump/iface.h
@@ -43,6 +43,8 @@ struct hid_dump_iface {
bool detached; /**< True if the interface was
detached from the kernel
driver, false otherwise */
+ bool claimed; /**< True if the interface was
+ claimed */
};
extern bool hid_dump_iface_valid(const hid_dump_iface *iface);
@@ -89,7 +91,6 @@ extern hid_dump_iface *hid_dump_iface_list_fltr_by_num(
hid_dump_iface *list,
int number);
-
/**
* Detach all interfaces in a list from their kernel drivers (if any).
*
@@ -109,6 +110,24 @@ extern enum libusb_error hid_dump_iface_list_detach(hid_dump_iface *list);
*/
extern enum libusb_error hid_dump_iface_list_attach(hid_dump_iface *list);
+/**
+ * Claim all interfaces in a list.
+ *
+ * @param list The list of interfaces to claim.
+ *
+ * @return Libusb error code.
+ */
+extern enum libusb_error hid_dump_iface_list_claim(hid_dump_iface *list);
+
+/**
+ * Release all interfaces in a list (if were claimed before).
+ *
+ * @param list The list of interfaces to release.
+ *
+ * @return Libusb error code.
+ */
+extern enum libusb_error hid_dump_iface_list_release(hid_dump_iface *list);
+
#ifdef __cplusplus
} /* extern "C" */
#endif