diff options
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), |