summaryrefslogtreecommitdiffstats
path: root/include/usbhost
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-05-25 08:10:02 -0400
committerMike Lockwood <lockwood@android.com>2010-05-25 08:20:32 -0400
commit6ac3aa157493ef24bc837b679dd8292fad8961e0 (patch)
treede32524015fc5b081d041fbc08118f2303a9a96b /include/usbhost
parenta92be64809e3927790c7a8535f548ab5a9105e45 (diff)
downloadsystem_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/usbhost')
-rw-r--r--include/usbhost/usbhost.h8
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);