summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-22 14:53:22 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-03-22 14:53:22 +0000
commit6caed0053e1c938737111e9f34c671803131bfbf (patch)
tree4ceb462bda3849121647a92ee8ece31c31cd1721 /input
parent27fe6a301b25a0a3196e27267e8a40f32b303f86 (diff)
input: Added the Disconnect signal
Diffstat (limited to 'input')
-rw-r--r--input/device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/input/device.c b/input/device.c
index fe38e759..5ebeb1ec 100644
--- a/input/device.c
+++ b/input/device.c
@@ -853,12 +853,21 @@ static DBusHandlerResult device_disconnect(DBusConnection *conn,
DBusMessage *msg, void *data)
{
struct device *idev = data;
+ DBusMessage *signal;
+ const char *path;
if (disconnect(idev, 0) < 0)
return err_failed(conn, msg, strerror(errno));
- return send_message_and_unref(conn,
+ /* Replying to the requestor */
+ send_message_and_unref(conn,
dbus_message_new_method_return(msg));
+
+ /* Sending the Disconnect signal */
+ path = dbus_message_get_path(msg);
+ signal = dbus_message_new_signal(path,
+ INPUT_DEVICE_INTERFACE, "Disconnected");
+ return send_message_and_unref(conn, signal);
}
static DBusHandlerResult device_is_connected(DBusConnection *conn,