diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-22 20:36:05 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-22 20:36:05 +0000 |
commit | 5869694c6f27fe19ed196476e7a3c0e0c320a91c (patch) | |
tree | ee8c24930edb577db7ef3cb0abcf53209167fda3 /input | |
parent | 339f5da8b617ade7dee7b57a3edb9800fd95275d (diff) |
Added GetName
Diffstat (limited to 'input')
-rw-r--r-- | input/input-service.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/input/input-service.c b/input/input-service.c index 76081c1e..2e4c911b 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -419,7 +419,19 @@ static DBusHandlerResult device_get_address(DBusConnection *conn, static DBusHandlerResult device_get_name(DBusConnection *conn, DBusMessage *msg, void *data) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + struct input_device *idev = data; + DBusMessage *reply; + const char *pname = idev->hidp.name; + + reply = dbus_message_new_method_return(msg); + if (!reply) + return DBUS_HANDLER_RESULT_NEED_MEMORY; + + dbus_message_append_args(reply, + DBUS_TYPE_STRING, &pname, + DBUS_TYPE_INVALID); + + return send_message_and_unref(conn, reply); } static DBusHandlerResult device_get_product_id(DBusConnection *conn, |