summaryrefslogtreecommitdiffstats
path: root/avahi-client/client-test.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-17 02:07:26 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-17 02:07:26 +0000
commit0c54764cf19428a0c52724a75ddf3368e3899209 (patch)
treec75465bb36f99d179b65fea6c4daee856f67435a /avahi-client/client-test.c
parent41f2725b37437a585ce285051bdae06f4919dc3b (diff)
* split client.h into client.h, lookup.h and publish.h just like we did on the server side
* Wrap avahi_server_update_txt() as DBUS function UpdateServiceTxt * Add client side API avahi_entry_group_update_service_txt() and friends * handle AVAHI_PUBLISH_UPDATE semantics in DBUS protocol * minor cleanups git-svn-id: file:///home/lennart/svn/public/avahi/trunk@791 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-client/client-test.c')
-rw-r--r--avahi-client/client-test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c
index c7789ba..14b9e84 100644
--- a/avahi-client/client-test.c
+++ b/avahi-client/client-test.c
@@ -27,6 +27,9 @@
#include <assert.h>
#include <avahi-client/client.h>
+#include <avahi-client/lookup.h>
+#include <avahi-client/publish.h>
+
#include <avahi-common/error.h>
#include <avahi-common/simple-watch.h>
#include <avahi-common/malloc.h>
@@ -191,6 +194,14 @@ static void test_entry_group_reset (AvahiTimeout *timeout, void* userdata)
avahi_entry_group_commit (g);
}
+static void test_entry_group_update(AvahiTimeout *timeout, void* userdata) {
+ AvahiEntryGroup *g = userdata;
+
+ printf ("Updating entry group\n");
+
+ avahi_entry_group_update_service_txt(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, "foo=bar3", NULL);
+}
+
static void terminate(AvahiTimeout *timeout, void *userdata) {
avahi_simple_poll_quit(simple_poll);
@@ -272,6 +283,8 @@ int main (int argc, char *argv[]) {
avahi_elapse_time(&tv, 8000, 0);
poll_api->timeout_new(poll_api, &tv, test_entry_group_reset, group);
+ avahi_elapse_time(&tv, 15000, 0);
+ poll_api->timeout_new(poll_api, &tv, test_entry_group_update, group);
avahi_elapse_time(&tv, 20000, 0);
poll_api->timeout_new(poll_api, &tv, test_free_entry_group, group);
avahi_elapse_time(&tv, 25000, 0);