Bump LIBUSBX_API_VERSION for new hotplug API
authorHans de Goede <hdegoede@redhat.com>
Wed, 15 May 2013 10:17:42 +0000 (12:17 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 15 May 2013 18:43:35 +0000 (20:43 +0200)
And document the minimum version under which hotplug is supported

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb/hotplug.c
libusb/libusb.h
libusb/version_nano.h

index e8f1e52..a58608f 100644 (file)
@@ -39,9 +39,9 @@
  *
  * \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
@@ -53,7 +53,7 @@
  *
  * 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
  *
index 75613e6..6915875 100644 (file)
@@ -137,7 +137,7 @@ typedef unsigned __int32  uint32_t;
  * 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" {
@@ -1525,11 +1525,16 @@ void LIBUSB_CALL libusb_set_pollfd_notifiers(libusb_context *ctx,
  * 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. */
@@ -1537,6 +1542,9 @@ typedef enum {
 } 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 */
@@ -1565,6 +1573,8 @@ typedef enum {
  * 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
@@ -1585,6 +1595,8 @@ typedef int (LIBUSB_CALL *libusb_hotplug_callback_fn)(libusb_context *ctx,
  * 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
@@ -1612,6 +1624,8 @@ int LIBUSB_CALL libusb_hotplug_register_callback(libusb_context *ctx,
  * 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
  */
index 2373ba0..4e2be30 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10654
+#define LIBUSB_NANO 10655