mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
When the SVGs need to be maintained elsewhere, we need something reliable to match devices with SVGs. The easiest is to provide a unique model string, usually composed from the usb/bluetooth information. A string format was chosen to make it more flexible for the glorious future where we have something other than usb or bluetooth devices. Meanwhile, the format is the well-known "usb:1234:56ef:0" string (bus, vid, pid, version). The version in this string is a future-proof safeguard for libratbag. It will be used where libratbag supports two devices with the same VID/PID and where this is not otherwise differentiable. We don't have any such devices yet, so libratbag just returns a hardcoded 0. The format is currently defined for usb and bluetooth, in the future we may have other strings. The base guarantee is that this is a reliable identifier for the model that will never change for that model. IOW this is what piper can use to map devices to their SVGs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>