Hi,

On 05/28/2013 09:58 PM, Tim Roberts wrote:
> 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.

Right, my first plan was mainly to give access to os cached string
descriptors, so that those can be accessed without the need to open a
device and do io to it.

>
> Apps that need the usb.ids lookup should go do the lookup.  Beyond that,
> this becomes a maintenance headache.

The usb.ids lookup came as an after thought, although it has proven to be
very useful in spice-gtk, since many devices don't bother to offer any
string descriptors.

So maybe we should split the functionality into 2 sets of functions, one for
cached string descriptors, and one for usb.ids parsing?

Regards,

Hans

------------------------------------------------------------------------------
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
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to