summaryrefslogtreecommitdiffstats
path: root/src/polyp/mainloop.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-16 16:46:26 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-16 16:46:26 +0000
commit76296ca8adccec12aa84163da55c6204d7667bf5 (patch)
treebaeb292e917540a066dc1f2490987d6bed028d6f /src/polyp/mainloop.h
parenta8bb073acc24c554ed3d8fcbd91b26b2799e641a (diff)
add new API to replace the poll() function used by the main loop implementation
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@733 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polyp/mainloop.h')
-rw-r--r--src/polyp/mainloop.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/polyp/mainloop.h b/src/polyp/mainloop.h
index fe2b4c5b..f60c355a 100644
--- a/src/polyp/mainloop.h
+++ b/src/polyp/mainloop.h
@@ -70,6 +70,8 @@ PA_C_DECL_BEGIN
* defined in \ref mainloop-api.h. This implementation is thread safe
* as long as you access the main loop object from a single thread only.*/
+#include <sys/poll.h>
+
/** An opaque main loop object */
typedef struct pa_mainloop pa_mainloop;
@@ -114,6 +116,12 @@ void pa_mainloop_quit(pa_mainloop *m, int r);
/** Interrupt a running poll (for threaded systems) */
void pa_mainloop_wakeup(pa_mainloop *m);
+/** Generic prototype of a poll() like function */
+typedef int (*pa_poll_func)(struct pollfd *ufds, nfds_t nfds, int timeout, void*userdata);
+
+/** Change the poll() implementation */
+void pa_mainloop_set_poll_func(pa_mainloop *m, pa_poll_func poll_func, void *userdata);
+
PA_C_DECL_END
#endif