- glib_poll = avahi_glib_poll_new(NULL, G_PRIORITY_DEFAULT);
-
- avahi = avahi_server_new(avahi_glib_poll_get(glib_poll), NULL, server_callback, NULL, &error);
-
- loop = g_main_loop_new(NULL, 0);
- g_timeout_add(1000*5, dump_timeout, avahi);
- g_timeout_add(1000*5, rename_timeout, avahi);
- g_main_loop_run(loop);
- g_main_loop_unref(loop);
+ avahi_elapse_time(&tv, 5000, 0);
+ poll_api->timeout_new(poll_api, &tv, dump_timeout_callback, avahi);
+
+ avahi_elapse_time(&tv, 5000, 0);
+ poll_api->timeout_new(poll_api, &tv, rename_timeout_callback, avahi);
+
+ /* Evil, but the conformace test requires that*/
+ create_service("gurke");
+
+
+ avahi_simple_poll_loop(simple_poll);