summaryrefslogtreecommitdiffstats
path: root/network/server.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-04-16 14:11:50 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-04-16 14:11:50 +0000
commit6745ef8707548a27267184c29dd126945da4b19e (patch)
tree331b99d79ba5603e79c7952b62d23cc6756b93fb /network/server.c
parentea69da4ac5a927fde86de78ceaac6deadfedbff6 (diff)
Add signals Enabled/Disabled.
Diffstat (limited to 'network/server.c')
-rw-r--r--network/server.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/network/server.c b/network/server.c
index 1eeddb82..754a37dc 100644
--- a/network/server.c
+++ b/network/server.c
@@ -717,7 +717,7 @@ static DBusHandlerResult enable(DBusConnection *conn,
DBusMessage *msg, void *data)
{
struct network_server *ns = data;
- DBusMessage *reply;
+ DBusMessage *reply, *signal;
int err;
if (ns->io)
@@ -740,6 +740,11 @@ static DBusHandlerResult enable(DBusConnection *conn,
store_property(&ns->src, ns->id, "enabled", "1");
+ signal = dbus_message_new_signal(ns->path,
+ NETWORK_SERVER_INTERFACE, "Enabled");
+
+ send_message_and_unref(conn, signal);
+
return send_message_and_unref(conn, reply);
}
@@ -747,7 +752,7 @@ static DBusHandlerResult disable(DBusConnection *conn,
DBusMessage *msg, void *data)
{
struct network_server *ns = data;
- DBusMessage *reply;
+ DBusMessage *reply, *signal;
reply = dbus_message_new_method_return(msg);
if (!reply)
@@ -768,6 +773,11 @@ static DBusHandlerResult disable(DBusConnection *conn,
store_property(&ns->src, ns->id, "enabled", "0");
+ signal = dbus_message_new_signal(ns->path,
+ NETWORK_SERVER_INTERFACE, "Disabled");
+
+ send_message_and_unref(conn, signal);
+
return send_message_and_unref(conn, reply);
}