2013/5/28 Tim Roberts <[email protected]>:
> Hans de Goede wrote:
>> Sorry no code (yet), as I would first like to get some buy in for
>> the concept before spending time on coding this.
>>
>> For apps which show a list of usb devices to the user, it is useful
>> to have some userfriendly description of the device to show.
>>
>> I've code for this in spice-gtk, which I think really should be in
>> libusb, as it is useful for other apps too.
>>
>> Therefor I would like to suggest to add these functions:
>>
>> char *libusb_get_vendor_string(libusb_device *device);
>> char *libusb_get_product_string(libusb_device *device);
>
> I'm not fond of this concept. In USB terms, the "vendor string" is the
> string descriptor designated by iManufacturer in the device descriptor,
> and "product string" is the string descriptor designated by iProduct in
> the device descriptor. This is extending the meaning of those terms in
> a possibly unexpected way.
I agree.
Why libusb_get_string_descriptor_ascii() can't be used to get the
vendor string? I use that in my code and it works well.
r = libusb_get_string_descriptor_ascii(handle, desc.iManufacturer,
buffer, sizeof(buffer));
The only problem is with devices that do not return any string for
iManufacturer. But they are a minority and can be considered bogus.
> Apps that need the usb.ids lookup should go do the lookup. Beyond that,
> this becomes a maintenance headache.
Maybe it is time to start a new library that would be a libusb
companion with "higher" level functions or helper functions.
> However, I may not be in the majority. I also think the project will
> come to regret the introduction of libusb_strerror.
No, please :-)
I need libusb_strerror (in English only).
Bye
--
Dr. Ludovic Rousseau
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
libusbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusbx-devel