diff options
author | Trent Lloyd <lathiat@bur.st> | 2005-08-14 12:06:09 +0000 |
---|---|---|
committer | Trent Lloyd <lathiat@bur.st> | 2005-08-14 12:06:09 +0000 |
commit | 3d2e63d2c5c351dde38b24a45a679ce819ed0e41 (patch) | |
tree | f3d990a2572bca040761f82167c309851e9c1f1a /avahi-client/entrygroup.c | |
parent | 77dc1cb05c8e6d23bd9cea37d4b4644cd76f0f82 (diff) |
* Add a free function for AvahiEntryGroup in C api
* Modify the browser free functions to return/set errors.
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@320 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-client/entrygroup.c')
-rw-r--r-- | avahi-client/entrygroup.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/avahi-client/entrygroup.c b/avahi-client/entrygroup.c index ea56ee2..8120e49 100644 --- a/avahi-client/entrygroup.c +++ b/avahi-client/entrygroup.c @@ -114,6 +114,28 @@ fail: } int +avahi_entry_group_free (AvahiEntryGroup *group) +{ + AvahiClient *client = group->client; + DBusMessage *message; + + if (group == NULL || group->path == NULL) + return avahi_client_set_errno (client, AVAHI_ERR_INVALID_OBJECT); + + message = dbus_message_new_method_call (AVAHI_DBUS_NAME, + group->path, AVAHI_DBUS_INTERFACE_ENTRY_GROUP, "Free"); + + if (message == NULL) + return avahi_client_set_errno (client, AVAHI_ERR_DBUS_ERROR); + + dbus_connection_send (client->bus, message, NULL); + + free (group); + + return avahi_client_set_errno (client, AVAHI_OK); +} + +int avahi_entry_group_commit (AvahiEntryGroup *group) { DBusMessage *message; |