diff options
-rw-r--r-- | RemoteControlManager.xml | 2 | ||||
-rw-r--r-- | rcm-server-main.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/RemoteControlManager.xml b/RemoteControlManager.xml index ede8f69..af9c33f 100644 --- a/RemoteControlManager.xml +++ b/RemoteControlManager.xml @@ -20,7 +20,7 @@ </signal> <property name='DriverName' type='s' access='read'/> <property name='KernelKeymapName' type='s' access='read'/> - <property name='GetHardwareType' type='s' access='read'/> + <property name='HardwareType' type='s' access='read'/> </interface> <interface name='org.gnome.RemoteControlManager.IRDevice'> <annotation name="org.gtk.GDBus.C.Name" value="RCIRDevice"/> 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), |