aboutsummaryrefslogtreecommitdiffstats
path: root/libusb/libusb.h
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2011-09-14 02:30:18 +0200
committerPeter Stuge <peter@stuge.se>2011-10-17 16:23:54 +0200
commite16805130a04b2642891e86b8f479e6343ca17da (patch)
tree4231d31eb62d51183c648d2ececd9e96fabcf6d1 /libusb/libusb.h
parent2dc2fa2a56408e515d25359323b4ea2f1bbec14a (diff)
downloadandroid_external_libusbx-e16805130a04b2642891e86b8f479e6343ca17da.tar.gz
android_external_libusbx-e16805130a04b2642891e86b8f479e6343ca17da.tar.bz2
android_external_libusbx-e16805130a04b2642891e86b8f479e6343ca17da.zip
Add libusb_has_capability() API function
Since it is currently not planned to change the filename of the libusb library between libusb-1.0 versions at least on Windows systems it's important to have a capability API. Currently there exists only one capability; LIBUSB_CAP_HAS_CAPABILITY, which tests support for the libusb_has_capability() API.
Diffstat (limited to 'libusb/libusb.h')
-rw-r--r--libusb/libusb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h
index 3b7f92a..ae09907 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -885,9 +885,20 @@ struct libusb_transfer {
;
};
+/** \ingroup misc
+ * Capabilities supported by this instance of libusb. Test if the loaded
+ * library supports a given capability by calling
+ * \ref libusb_has_capability().
+ */
+enum libusb_capability {
+ /** The libusb_has_capability() API is available. */
+ LIBUSB_CAP_HAS_CAPABILITY = 0,
+};
+
int LIBUSB_CALL libusb_init(libusb_context **ctx);
void LIBUSB_CALL libusb_exit(libusb_context *ctx);
void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
+int LIBUSB_CALL libusb_has_capability(uint32_t capability);
ssize_t LIBUSB_CALL libusb_get_device_list(libusb_context *ctx,
libusb_device ***list);