[libhid-discuss] future APIs

Charles Lepple clepple at ghz.cc
Wed Jan 14 20:53:09 UTC 2009


On Jan 13, 2009, at 5:48 PM, Peter Stuge wrote:

> Charles Lepple wrote:
>> If you send me some pointers to the "raw hid" API, I will take a
>> look at it. I am in the process of rewriting the libhid backend to
>> not be tied to just raw libusb calls.
>
> /usr/src/linux/Documentation/usb/hiddev.txt
>
> I would like to request that the backend becomes a separate library
> (almost) as simple as the Windows HID API. libhidio may be a good
> name? I don't know how much sense it really makes, but I think it
> would be nice to have.


Peter,

I'm not sure I understand your suggestion here. What are you  
proposing to separate? When I say "backend", I mean the glue code to  
a platform's native HID API (or to libusb, for "legacy" libhid  
operation). The "frontend", in my mind, is the generic API that hides  
platform-specific details.

I know that the Windows HID API automates finding the first input and  
output report, and finding which endpoint to use, but to me that  
sounds like a maintenance nightmare, with the new #1 FAQ becoming  
"why doesn't my Windows code work on Linux?". To me, that also sounds  
like a convenience function on top of the frontend described in the  
previous paragraph (for platforms other than Windows), since it  
builds on the more generic libhid API.

Do you have a sketch of your proposed architecture?



More information about the libhid-discuss mailing list