Skip to content

Change to allow dynamic binding of capabilities

Peter Hutterer requested to merge whot/libei:wip/seat-bind-cap into master

Previously, a client could only bind to a capability immediately after SEAT_ADDED and with a rather awkward API to confirm the capabilities.

Change this to allow for dynamic binding of capabilities, i.e. a client calls ei_bind_capability() or ei_unbind_capability() whenever it feels like, causing the respective devices of this capabilty to be added or removed.

This allows for clients that are temporarily disinterested in a capability but may require said capability later.

The default function takes one capability, a helper for enable/disable multiple capabilities in one go is provided as well. On the protocol, only the "bind" request exists which always represents the currently wanted set of capabilities.

Note that the helper functions for multiple capabilities require NULL (not zero) as sentinel, thanks to gcc.

cc @jadahl

Merge request reports