Add API for using bulk streams
authorHans de Goede <hdegoede@redhat.com>
Wed, 11 Sep 2013 11:45:01 +0000 (13:45 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 22 Apr 2014 12:31:56 +0000 (14:31 +0200)
commit6d8dfe0aee41a3c7dd862c3de488df3ce452d86e
treee9932c6109e4ad7a71b7a65e007f0abe4f6f3bf2
parent0504375ea965dd25f00d4828a19c329b7e7525d4
Add API for using bulk streams

Being able to allocate bulk-streams is not really useful if the user cannot
specify the stream ids when submitting transfers.

The actual stream id gets added to our private itransfer struct, and a setter +
getter are added to get to it. Unfortunately this is the only way to add
support for stream ids without breaking ABI. So this is another item to fix
when we do break ABI in libusb-2.0.

Bulk streams also use a separate transer type, to allow backends to determine
if a transfer is a bulk stream transfer or an ordinary bulk transfer. This is
added because there is no other reliable way to determine if a transfer is
a stream as the stream_id is part of the private itransfer struct so apps
re-using a transfer may not set it to 0. Adding a separate transfer-type
for this was suggested (and coded) by Nathan Hjelm.

Most users will likely use the new libusb_fill_bulk_stream_transfer()
though, and will never know the difference.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb/io.c
libusb/libusb.h
libusb/libusbi.h
libusb/os/linux_usbfs.c
libusb/os/linux_usbfs.h
libusb/os/netbsd_usb.c
libusb/os/openbsd_usb.c
libusb/os/wince_usb.c
libusb/os/windows_usb.c
libusb/version_nano.h