diff options
author | David Härdeman <david@hardeman.nu> | 2015-07-09 12:26:35 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2015-07-09 12:26:35 +0200 |
commit | a3d9f86f4b0bc6cd54c02043110c0f6cedc7b907 (patch) | |
tree | 6ba270f9e9ca25f46b7d63717fade1bbd6d9cb5c /rcm-server-main.c | |
parent | d12bcdd550e317941491c05fb39fa4de6ddff24e (diff) | |
parent | 798e93e84b922975af0dd03ffb35bd8674b0504b (diff) |
Merge branch 'master' of ssh://vader.hardeman.nu/srv/data01/vcs/git/public/rcm
Diffstat (limited to 'rcm-server-main.c')
-rw-r--r-- | rcm-server-main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rcm-server-main.c b/rcm-server-main.c index 02387a1..3379697 100644 --- a/rcm-server-main.c +++ b/rcm-server-main.c @@ -40,9 +40,9 @@ find_device_by_path(struct manager *mgr, const char *path) } static int -property_get_driver_name(sd_bus *bus, const char *path, const char *interface, - const char *property, sd_bus_message *reply, void *userdata, - sd_bus_error *error) +property_get(sd_bus *bus, const char *path, const char *interface, + const char *property, sd_bus_message *reply, void *userdata, + sd_bus_error *error) { struct manager *mgr = userdata; struct device *dev; @@ -57,6 +57,8 @@ property_get_driver_name(sd_bus *bus, const char *path, const char *interface, return sd_bus_message_append(reply, "s", dev->driver_name); else if (!strcmp(property, "KernelKeymapName")) return sd_bus_message_append(reply, "s", dev->keymap_name); + else if (!strcmp(property, "HardwareType")) + return sd_bus_message_append(reply, "s", "ir"); sd_bus_error_set_const(error, "org.gnome.RemoteControlManager.InvalidProperty", "Sorry, invalid property"); return -EINVAL; @@ -177,8 +179,9 @@ out: static const sd_bus_vtable device_vtable[] = { SD_BUS_VTABLE_START(0), - SD_BUS_PROPERTY("DriverName", "s", property_get_driver_name, 0, 0), - SD_BUS_PROPERTY("KernelKeymapName", "s", property_get_driver_name, 0, 0), + SD_BUS_PROPERTY("DriverName", "s", property_get, 0, 0), + SD_BUS_PROPERTY("KernelKeymapName", "s", property_get, 0, 0), + SD_BUS_PROPERTY("HardwareType", "s", property_get, 0, 0), SD_BUS_METHOD("EchoString", "s", "s", method_echostring, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD("ListKeymaps", NULL, "as", method_listkeymaps, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD("GetKeymap", "s", "qqaa{sv}", method_getkeymap, SD_BUS_VTABLE_UNPRIVILEGED), |