diff options
| -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 42ce2755..8157adc9 100644 --- a/input/input-api.txt +++ b/input/input-api.txt @@ -50,7 +50,7 @@ Methods		string GetAddress()  			Returns the service name. -		string GetProductId() +		uint16 GetProductId()  			Returns the product id. diff --git a/input/input-service.c b/input/input-service.c index c5d469e1..877a3675 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -843,7 +843,18 @@ static DBusHandlerResult device_get_name(DBusConnection *conn,  static DBusHandlerResult device_get_product_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.product, +			DBUS_TYPE_INVALID); + +	return send_message_and_unref(conn, reply);  }  static DBusHandlerResult device_get_vendor_id(DBusConnection *conn,  | 
