diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-22 20:32:35 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-22 20:32:35 +0000 |
commit | 339f5da8b617ade7dee7b57a3edb9800fd95275d (patch) | |
tree | 0eb1c28eb95e2190d249186f0d59a231f91d249b | |
parent | a00358121e25b11f1a3540534e2240c12e8763c9 (diff) |
Added GetAddress
-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 377f47e2..76081c1e 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -401,7 +401,19 @@ static DBusHandlerResult device_is_connected(DBusConnection *conn, static DBusHandlerResult device_get_address(DBusConnection *conn, DBusMessage *msg, void *data) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + struct input_device *idev = data; + DBusMessage *reply; + const char *paddr = idev->addr; + + reply = dbus_message_new_method_return(msg); + if (!reply) + return DBUS_HANDLER_RESULT_NEED_MEMORY; + + dbus_message_append_args(reply, + DBUS_TYPE_STRING, &paddr, + DBUS_TYPE_INVALID); + + return send_message_and_unref(conn, reply); } static DBusHandlerResult device_get_name(DBusConnection *conn, |