*
* \section intro Introduction
*
- * Releases of libusb 1.0 newer than 1.X have added support for hotplug
- * events. This interface allows you to request notification for the
- * arrival and departure of matching USB devices.
+ * Version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102, has added support
+ * for hotplug events. This interface allows you to request notification for
+ * the arrival and departure of matching USB devices.
*
* To receive hotplug notification you register a callback by calling
* libusb_hotplug_register_callback(). This function will optionally return
*
* Callbacks for a particulat context are automatically deregistered by libusb_exit().
*
- * As of 1.X there are two supported hotplug events:
+ * As of 1.0.16 there are two supported hotplug events:
* - LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED: A device has arrived and is ready to use
* - LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT: A device has left and is no longer available
*
* Internally, LIBUSBX_API_VERSION is defined as follows:
* (libusbx major << 24) | (libusbx minor << 16) | (16 bit incremental)
*/
-#define LIBUSBX_API_VERSION 0x01000101
+#define LIBUSBX_API_VERSION 0x01000102
#ifdef __cplusplus
extern "C" {
* per libusb_context and it is safe to call libusb_hotplug_deregister_callback()
* on an already deregisted callback.
*
+ * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
+ *
* For more information, see \ref hotplug.
*/
typedef int libusb_hotplug_callback_handle;
/** \ingroup hotplug
+ *
+ * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
+ *
* Flags for hotplug events */
typedef enum {
/** Arm the callback and fire it for all matching currently attached devices. */
} libusb_hotplug_flag;
/** \ingroup hotplug
+ *
+ * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
+ *
* Hotplug events */
typedef enum {
/** A device has been plugged in and is ready to use */
* It is safe to call either libusb_hotplug_register_callback() or
* libusb_hotplug_deregister_callback() from within a callback function.
*
+ * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
+ *
* \param libusb_context context of this notification
* \param device libusb_device this event occurred on
* \param event event that occurred
* armed until either it is deregistered with libusb_hotplug_deregister_callback()
* or the supplied callback returns 1 to indicate it is finished processing events.
*
+ * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
+ *
* \param[in] ctx context to register this callback with
* \param[in] events bitwise or of events that will trigger this callback. See \ref
* libusb_hotplug_event
* Deregister a callback from a libusb_context. This function is safe to call from within
* a hotplug callback.
*
+ * Since version 1.0.16, \ref LIBUSBX_API_VERSION >= 0x01000102
+ *
* \param[in] ctx context this callback is registered with
* \param[in] handle the handle of the callback to deregister
*/