]> git.meshlink.io Git - catta/blobdiff - avahi-common/simple-watch.h
* remove AVAHI_PUBLISH_IS_PROXY, it was a bad idea
[catta] / avahi-common / simple-watch.h
index c8234f20cf340e735859c08daf39c0bba4293724..5a4b37d05e1deca8317fc4b8481502149acbe7f0 100644 (file)
@@ -26,8 +26,7 @@
 
 #include <sys/poll.h>
 #include <avahi-common/cdecl.h>
-
-#include "watch.h"
+#include <avahi-common/watch.h>
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_BEGIN
@@ -65,10 +64,25 @@ int avahi_simple_poll_iterate(AvahiSimplePoll *s, int sleep_time);
 void avahi_simple_poll_quit(AvahiSimplePoll *s);
 
 /** Prototype for a poll() type function */
-typedef int (*AvahiPollFunc)(struct pollfd *ufds, unsigned int nfds, int timeout);
+typedef int (*AvahiPollFunc)(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata);
 
 /** Replace the internally used poll() function. By default the system's poll() will be used */
-void avahi_simple_poll_set_func(AvahiSimplePoll *s, AvahiPollFunc func);
+void avahi_simple_poll_set_func(AvahiSimplePoll *s, AvahiPollFunc func, void *userdata);
+
+/** The first stage of avahi_simple_poll_iterate(), use this function only if you know what you do */
+int avahi_simple_poll_prepare(AvahiSimplePoll *s, int timeout);
+
+/** The second stage of avahi_simple_poll_iterate(), use this function only if you know what you do */
+int avahi_simple_poll_run(AvahiSimplePoll *s);
+
+/** The third and final stage of avahi_simple_poll_iterate(), use this function only if you know what you do */
+int avahi_simple_poll_dispatch(AvahiSimplePoll *s);
+
+/** Call avahi_simple_poll_iterate() in a loop and return if it returns non-zero */
+int avahi_simple_poll_loop(AvahiSimplePoll *s);
+
+/** Wakeup the main loop. (for threaded environments) */
+void avahi_simple_poll_wakeup(AvahiSimplePoll *s);
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_END