From 032b7487d4ce045c9c2e5ed801baa7186c93cc33 Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Wed, 12 Jun 2013 14:44:24 +0200 Subject: [PATCH] Add a few capability constants that were missing, from libusbx-1.0.15. --- .../java/de/ailis/usb4java/libusb/LibUsb.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ailis/usb4java/libusb/LibUsb.java b/src/main/java/de/ailis/usb4java/libusb/LibUsb.java index 32a887d..a48f0a3 100644 --- a/src/main/java/de/ailis/usb4java/libusb/LibUsb.java +++ b/src/main/java/de/ailis/usb4java/libusb/LibUsb.java @@ -192,7 +192,24 @@ public final class LibUsb // library supports a given capability by calling hasCapability(). /** The hasCapability() API is available. */ - public static final int CAP_HAS_CAPABILITY = 0x00; + public static final int CAP_HAS_CAPABILITY = 0x0000; + + /** Hotplug support is available. */ + public static final int CAP_HAS_HOTPLUG = 0x0001; + + /** + * The library can access HID devices without requiring user intervention. + * Note that before being able to actually access an HID device, you may + * still have to call additional libusbx functions such as + * {@link #detachKernelDriver(DeviceHandle, int)}. + */ + public static final int CAP_HAS_HID_ACCESS = 0x0100; + + /** + * The library supports detaching of the default USB driver, using + * {@link #detachKernelDriver(DeviceHandle, int)}, if one is set by the OS. + */ + public static final int CAP_SUPPORTS_DETACH_KERNEL_DRIVER = 0x0101; public static final int CONTROL_SETUP_SIZE = 8;