summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2008-03-06 23:25:20 +0000
committerDaniel Drake <dsd@gentoo.org>2008-03-06 23:25:20 +0000
commit9cfdb494fccac53a4277da7c8b6d15f1a72a4959 (patch)
treea6aa93d20fe9768534074b8c5792999bf45f9add /TODO
parent77cea822788e024c848c7f554915f771a2dc1e0f (diff)
downloadlibusb-9cfdb494fccac53a4277da7c8b6d15f1a72a4959.tar.gz
Rework device discovery API
libusb_find_devices and libusb_get_devices are no more libusb_get_device_list obtains a list of libusb_device structures for all known devices in the system. Each libusb_device now has a reference count, defaulting to 1 on instantiation. The reference count of 1 refers to the fact that it is present in the list in this scenario. Opening a device adds a pointer to the libusb_device structure in the handle, so that also adds a reference. Closing the device removes that reference. The function to free the device list can optionally unref all the devices inside. In future we will make the libusb_device instances all "global" so that if the app calls get_device_list twice it actually gets the same libusb_device structure references back. This way we can start to track disconnects, and we can investigate adding a unique "session ID" to each libusb_device, an identifier guaranteed to be unique to that device until reboot.
Diffstat (limited to 'TODO')
-rw-r--r--TODO6
1 files changed, 5 insertions, 1 deletions
diff --git a/TODO b/TODO
index 68adc12..c4ff9b1 100644
--- a/TODO
+++ b/TODO
@@ -8,6 +8,10 @@ API docs
isochronous endpoint I/O
thread safety
abstraction for cross-platform-ness
+fallback on /proc/bus/usb on linux
+error codes
+assign session ID to each libusb_device
+share libusb_device structures in memory between all get_devices callers
for 1.1 or future
==================
@@ -21,6 +25,6 @@ use poll() rather than select()?
struct libusb_(bulk|control)_transfer or parameters?
devh in general
urbh in general (should this be a transfer handle?)
-find/get devices API
config struct/function naming
typedef _cb or _cb_fn or _cb_t?
+typedef as-is or pointers? libusb_dev_t rather than libusb_dev *?