RFC: add filter function based enumeration #584
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#584
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
But that is a different effort, and would definitely need an implementation on all platforms.
Originally posted by @Youw in https://github.com/libusb/hidapi/issues/575#issuecomment-1570629007
We filter devices in the postprocessing after enumeration. But it would make sense to define blacklist entries before enumeration. This makes als sense when we think about hot-plugging.
We currently use the following criteria:
I agree all of those are valid points.
Knowing the codebase, I must say that to implement (early) filtering for each criteria will be challenging, e.g.: it is impossible to get the usage_pages/usages of the device with libusb backend w/o opening the device, which is so much for "early" filtering.
I believe on all (not sure about macOS - that one is a bit different) platforms, having an early filter for vid/pid only is simple-enough and probably should be our first step towards that direction.