By now you should have 229.
And replace the instructions with actual ratbagd build instructions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Gio.bus_get_sync may return None when the DBus service is not available (see
libratbag/piper#2). In addition to this, the service may time out when it is
being started in which case Gio.DBusProxy.new_sync will raise a GLib.Gerror.
This commit checks for both scenarios and raises a RatbagdDBusUnavailable
exception when either one of them occurs. This will in turn be caught in for
example Piper to properly deal with this.
We don't really expect more than 2-3 devices even on a test box. This function
serves little purpose, we can easily require a caller to just get all devices
(usually just one anyway) and then go from there.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is the terminology used in libratbag as well (and everywhere else where
we deal with input devices).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Strings can suffer from locale issues, the official recommendation for DBus
APIs is to use enums here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Strings can suffer from locale issues, the official recommendation for DBus
APIs is to use enums here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We don't shut down once activated but that doesn't mean we need to run when
never requested.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Now that we clean up properly, the most common crash should be fixed. Restart
on abort by default so ideally all we need to do is restart piper or whatever
consumes the API.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This configure.ac is largely a copy from systemd so it included things that we
don't use locally.
- we don't use grep, awk or ln
- AC_SYS_LARGEFILE and AC_CANONICAL_HOST are unecessary
- pkg.m4 - if that's missing you don't have pkgconfig installed. stop trying
to build things then :)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Exporting just the filename requires the caller to know where that file sits.
That's useful for things like e.g. icons where callers may several sets to
chose from but here most callers will just use the default svg provided by
libratbag.
Export that, so that we don't have build-time dependencies in the callers just
for that single path.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
It's a lot easier to interact with ratbagd from a python script than it is
with C code. Plus this means we test the bindings whenever we use ratbagctl.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>