summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-12-29 08:47:29 -0500
committerMike Lockwood <lockwood@android.com>2010-12-29 09:27:16 -0500
commit7d700f8bdce747a26e3ee4737683194d77286ba3 (patch)
tree18730f8f9be6efcb9a9b4eba00d307cd9d3241d5 /include
parent123538954b9c8ad8fe7c2d755391f0b7cbaa1d6f (diff)
downloadsystem_core-7d700f8bdce747a26e3ee4737683194d77286ba3.zip
system_core-7d700f8bdce747a26e3ee4737683194d77286ba3.tar.gz
system_core-7d700f8bdce747a26e3ee4737683194d77286ba3.tar.bz2
libusbhost: Add usb_device_get_name_from_unique_id()
This allows converting from unique IDs to USB device names Change-Id: I8e3b300790c01383aed8e3d4f547b54bcb7c2cd4 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'include')
-rw-r--r--include/usbhost/usbhost.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/usbhost/usbhost.h b/include/usbhost/usbhost.h
index ccc12b1..4a8a4fc 100644
--- a/include/usbhost/usbhost.h
+++ b/include/usbhost/usbhost.h
@@ -96,13 +96,20 @@ int usb_device_get_fd(struct usb_device *device);
*/
const char* usb_device_get_name(struct usb_device *device);
-/* Returns a unique ID for the device. Currently this is generated from the
- * dev_name path.
+/* Returns a unique ID for the device.
+ *Currently this is generated from the dev_name path.
*/
int usb_device_get_unique_id(struct usb_device *device);
+/* Returns a unique ID for the device name.
+ * Currently this is generated from the device path.
+ */
int usb_device_get_unique_id_from_name(const char* name);
+/* Returns the device name for the unique ID.
+ * Call free() to deallocate the returned string */
+char* usb_device_get_name_from_unique_id(int id);
+
/* Returns the USB vendor ID from the device descriptor for the USB device */
uint16_t usb_device_get_vendor_id(struct usb_device *device);