diff options
author | Mike Lockwood <lockwood@android.com> | 2010-05-25 08:10:02 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-05-25 08:20:32 -0400 |
commit | 6ac3aa157493ef24bc837b679dd8292fad8961e0 (patch) | |
tree | de32524015fc5b081d041fbc08118f2303a9a96b /include | |
parent | a92be64809e3927790c7a8535f548ab5a9105e45 (diff) | |
download | system_core-6ac3aa157493ef24bc837b679dd8292fad8961e0.zip system_core-6ac3aa157493ef24bc837b679dd8292fad8961e0.tar.gz system_core-6ac3aa157493ef24bc837b679dd8292fad8961e0.tar.bz2 |
libusbhost: Remove global data to allow multiple instances in the same process.
Change-Id: I977145f44131ec8b588dd274e0afbc563f3aa4c0
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/usbhost/usbhost.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/usbhost/usbhost.h b/include/usbhost/usbhost.h index c2387e5..e7a6127 100644 --- a/include/usbhost/usbhost.h +++ b/include/usbhost/usbhost.h @@ -32,17 +32,19 @@ struct usb_descriptor_iter { }; /* callback for notification when new USB devices are attached */ -typedef void (* usb_device_added_cb)(const char *dev_name); +typedef void (* usb_device_added_cb)(const char *dev_name, void *client_data); /* callback for notification when USB devices are removed */ -typedef void (* usb_device_removed_cb)(const char *dev_name); +typedef void (* usb_device_removed_cb)(const char *dev_name, void *client_data); /* Call this to start monitoring the USB bus. * added_cb will be called immediately for each existing USB device, * and subsequently each time a new device is added. * removed_cb is called when USB devices are removed from the bus. */ -int usb_host_init(usb_device_added_cb added_cb, usb_device_removed_cb removed_cb); +int usb_host_init(usb_device_added_cb added_cb, + usb_device_removed_cb removed_cb, + void *client_data); /* Creates a usb_device object for a USB device */ struct usb_device *usb_device_open(const char *dev_name); |