diff options
Diffstat (limited to 'input')
-rw-r--r-- | input/input-api.txt | 2 | ||||
-rw-r--r-- | input/input-service.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/input/input-api.txt b/input/input-api.txt index 8157adc9..2658f3a6 100644 --- a/input/input-api.txt +++ b/input/input-api.txt @@ -54,7 +54,7 @@ Methods string GetAddress() Returns the product id. - string GetVendorId() + uint16 GetVendorId() Returns the vendor id. diff --git a/input/input-service.c b/input/input-service.c index 877a3675..f14edfe1 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -860,7 +860,18 @@ static DBusHandlerResult device_get_product_id(DBusConnection *conn, static DBusHandlerResult device_get_vendor_id(DBusConnection *conn, DBusMessage *msg, void *data) { - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + struct input_device *idev = data; + DBusMessage *reply; + + reply = dbus_message_new_method_return(msg); + if (!reply) + return DBUS_HANDLER_RESULT_NEED_MEMORY; + + dbus_message_append_args(reply, + DBUS_TYPE_UINT16, &idev->hidp.vendor, + DBUS_TYPE_INVALID); + + return send_message_and_unref(conn, reply); } static DBusHandlerResult device_set_timeout(DBusConnection *conn, |