device filtering support

Pete Batard pete at akeo.ie
Sun Feb 5 08:26:25 EST 2012


On 2012.02.05 02:02, Xiaofan Chen wrote:
> I agree with you that Pete' cure is worse than the disease. But if we go
> with the approach Travis is using in libusb-win32 and libusbK, app2 will
> not disturb app1 at all.

But it's even worse! You've broken libusb, and users can no longer rely 
on expecting the same features across platforms. And suddenly, your 
_generic_ library becomes both lot less generic.

This may be fine for some users, but it's very restrictive. Personally, 
I find the idea of a generic libusb library that can't help app 
developers construct a full topological view of the USB tree, or ignores 
USB hubs and other devices altogether, ludicrously limited. That's the 
very first thing I'd expect a generic USB library to be able to provide 
(and yes, the first time I used libusb, I was disappointed because it 
only provided bus info rather than complete topological info, and you 
couldn't use it to build a representation of your USB tree. But judging 
by the recurring requests we've had for a topology call, I don't think 
I'm the only one with this kind of expectation)

With its GUID implementation, Microsoft seems to think that's OK, and 
Travis either seems to agree with Microsoft or consider that since the 
OS limits us there, we might as well carry this limitation in libusb. 
However, it's not the first time Microsoft chooses to restrict the parts 
from a _standard_ it wants to present to the users of its products, much 
to the users loss (C99 in Visual Studio anyone?) and there very much 
exists way to remove this short-sightedness.

>>>> Does the system service idea solve the versioning issue?
>>
>> No.  Different applications were written at different times, and may expect
>> different protocol versions.

(internal) APIs.

>> They may even come to RELY on certain bugs to
>> continue to exist.

Really? Are we becoming Microsoft there? ;)

>> Even static linking fails to rescue us here, because
>> we're now talking about a process.

Again, APIs. If 2 libusb apps are expected to be able to use the same 
DLL from system32, 2 libusb apps are expected to be able to use the same 
process. You're making it sound worse than it really is IMO.

Regards,

/Pete



More information about the libusbx mailing list