Hi, On 09/13/2013 09:04 PM, Nathan Hjelm wrote: > One more thing about the API. It might be good to change: > > uint32_t API_EXPORTED libusb_transfer_get_stream_id (struct libusb_transfer > *transfer); > > to: > > int API_EXPORTED libusb_transfer_get_stream_id (struct libusb_transfer > *transfer, uint32_t *stream_id); > > This would allow the return of LIBUSB_ERROR_INVALID_PARAM if the transfer is > not a bulk stream transfer.
I don't think this is a good idea, it makes the API (somwhat) harder to use, and if the transfer is pristine libusb_transfer_get_stream_id will return 0 which is not a valid stream-id, thus indicating something is wrong. If a transfer is being re-used for another type of transfer, then the function will simply return the last stream_id used, without any adverse side-effects to libusb. But the app really should know what they're doing when calling this function. > Anyway, the type change is pushed to my tree. Thanks! I've cherry picked your two ABI changing patches (the addition of the new transfer type and this one) into my tree and squashed them into my initial patches (with a comment giving credit in the commit msg). I've done this as I would like the commit bumping the LIBUSBX_API_VERSION to actually contain the final version of the API. I've pushed this here: https://github.com/jwrdegoede/libusbx/commits/master Can you please rebase on top of this. You can drop the 2 mentioned commits, except for the darwin bits of the "core: use an unsigned type for stream ids" commit, which are not in my tree since the darwin stream code is not in my tree :) I've re-reviewed the darwin alloc_streams code and it looks good now. Thanks & Regards, Hans ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel