diff options
author | Nathan Hjelm <hjelmn@me.com> | 2012-11-29 14:23:26 -0700 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-05-15 17:28:06 +0200 |
commit | 7801ff94fa6e49fe98433eccc7f2e461590a6f7c (patch) | |
tree | 7d75d9c8f40471b45bbd77e8352ff602d5497c6f /.gitignore | |
parent | 29480089519f0b52da7697c34a3bbb67d3e74a3f (diff) | |
download | libusb-7801ff94fa6e49fe98433eccc7f2e461590a6f7c.tar.gz |
Add hotplug support.
The internal API is changing as follows:
- Adding two new functions. usbi_connect_device, and usbi_disconnect_device.
Backends must call these functions to add them to the context's device list
at one of two places: initial enumeration (done at init), and on device
attach and removal. These functions need to be called once per context.
- Backends that support hotplug should not provide a get_device_list funtion.
This function is now deprecated and will likely be removed once all backends
support hotplug.
The external API is changing as follows:
- Two new functions have been added to register and deregister callbacks for
hotplug notification: libusb_hotplug_register_callback(),
libusb_hotplug_deregister_callback(). Hotplug callbacks are called by
libusb_handle_events(). Details of the new API can be found in libusb.h.
- A new capability check has been added to check for hotplug support. See
LIBUSB_CAP_HAS_HOTPLUG.
Aa suggested by Xiaofan add new example has been added to show how to use
the new external hotplug API. See examples/hotplugtest.c.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to '.gitignore')
-rw-r--r-- | .gitignore | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -29,6 +29,7 @@ examples/xusb examples/dpfp examples/dpfp_threaded examples/fxload +examples/hotplugtest tests/stress *.exe *.pc |