summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/dbus-protocol.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-03 21:07:02 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-03 21:07:02 +0000
commit3a625af272ee8c6f878ba4d44ed1c741a1582395 (patch)
treeee5fb1f6bff53c670cede2882bbe69d408777894 /avahi-daemon/dbus-protocol.c
parent69ea921fa92b0b23faf0a955628e3afab5117534 (diff)
* add C examples
* change doxygen to output stuff in "doxygen/" instead of "doxygen-doc/" * implement avahi_entry_group_{reset,is_empty}() and make everyone use it * move holdoff (SLEEPING) time checking from server to entry group * add preliminary error codes git-svn-id: file:///home/lennart/svn/public/avahi/trunk@216 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-daemon/dbus-protocol.c')
-rw-r--r--avahi-daemon/dbus-protocol.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
index 0813617..c6a60df 100644
--- a/avahi-daemon/dbus-protocol.c
+++ b/avahi-daemon/dbus-protocol.c
@@ -513,6 +513,35 @@ static DBusHandlerResult msg_entry_group_impl(DBusConnection *c, DBusMessage *m,
avahi_entry_group_commit(i->entry_group);
return respond_ok(c, m);
+
+ } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "Reset")) {
+
+ if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+ avahi_log_warn("Error parsing EntryGroup::Reset message");
+ goto fail;
+ }
+
+ avahi_entry_group_reset(i->entry_group);
+ return respond_ok(c, m);
+
+ } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "IsEmpty")) {
+ DBusMessage *reply;
+ gboolean b;
+
+ if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+ avahi_log_warn("Error parsing EntryGroup::IsEmpty message");
+ goto fail;
+ }
+
+ b = avahi_entry_group_is_empty(i->entry_group);
+
+ reply = dbus_message_new_method_return(m);
+ dbus_message_append_args(m, DBUS_TYPE_BOOLEAN, &b, DBUS_TYPE_INVALID);
+ dbus_connection_send(c, reply, NULL);
+ dbus_message_unref(reply);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "GetState")) {
DBusMessage *reply;
gint32 t;