summaryrefslogtreecommitdiff
path: root/libusb/libusbi.h
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2008-05-11 20:31:58 +0100
committerDaniel Drake <dsd@gentoo.org>2008-05-11 20:47:27 +0100
commitfec7c84163e25b8f811632828334d75da82bcb16 (patch)
tree9ccdab1835c2396bfe79ecc484328932ff186427 /libusb/libusbi.h
parentaeb905fa5d78cdbba80a680aa7a2bb7338f27f65 (diff)
downloadlibusb-fec7c84163e25b8f811632828334d75da82bcb16.tar.gz
Handle hot-unplugging
This involved moving from select() to poll() because there is no way to distinguish usbfs's POLLERR condition with select().
Diffstat (limited to 'libusb/libusbi.h')
-rw-r--r--libusb/libusbi.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 414da25..87b2953 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -23,9 +23,9 @@
#include <config.h>
+#include <poll.h>
#include <pthread.h>
#include <stddef.h>
-#include <sys/select.h>
#include <time.h>
#include <libusb.h>
@@ -211,6 +211,7 @@ void usbi_io_init(void);
struct libusb_device *usbi_alloc_device(unsigned long session_id);
struct libusb_device *usbi_get_device_by_session_id(unsigned long session_id);
int usbi_sanitize_device(struct libusb_device *dev);
+void usbi_handle_disconnect(struct libusb_device_handle *handle);
void usbi_handle_transfer_completion(struct usbi_transfer *itransfer,
enum libusb_transfer_status status);
@@ -288,8 +289,9 @@ struct usbi_os_backend {
int (*submit_transfer)(struct usbi_transfer *itransfer);
int (*cancel_transfer)(struct usbi_transfer *itransfer);
+ void (*clear_transfer_priv)(struct usbi_transfer *itransfer);
- int (*handle_events)(fd_set *readfds, fd_set *writefds);
+ int (*handle_events)(struct pollfd *fds, nfds_t nfds, int num_ready);
/* number of bytes to reserve for libusb_device.os_priv */
size_t device_priv_size;