summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2015-07-09 12:26:35 +0200
committerDavid Härdeman <david@hardeman.nu>2015-07-09 12:26:35 +0200
commita3d9f86f4b0bc6cd54c02043110c0f6cedc7b907 (patch)
tree6ba270f9e9ca25f46b7d63717fade1bbd6d9cb5c
parentd12bcdd550e317941491c05fb39fa4de6ddff24e (diff)
parent798e93e84b922975af0dd03ffb35bd8674b0504b (diff)
Merge branch 'master' of ssh://vader.hardeman.nu/srv/data01/vcs/git/public/rcm
-rw-r--r--RemoteControlManager.xml2
-rw-r--r--rcm-server-main.c13
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),