Main loop abstraction layer.
int pa_mainloop_prepare(pa_mainloop *m, int timeout)
Prepare for a single iteration of the main loop.
int pa_mainloop_get_retval(const pa_mainloop *m)
Return the return value as specified with the main loop's quit() routine.
void pa_mainloop_wakeup(pa_mainloop *m)
Interrupt a running poll (for threaded systems)
void pa_mainloop_quit(pa_mainloop *m, int retval)
Shutdown the main loop with the specified return value.
int pa_mainloop_iterate(pa_mainloop *m, int block, int *retval)
Run a single iteration of the main loop.
void pa_mainloop_free(pa_mainloop *m)
Free a main loop object.
int pa_mainloop_poll(pa_mainloop *m)
Execute the previously prepared poll.
pa_mainloop_api * pa_mainloop_get_api(pa_mainloop *m)
Return the abstract main loop abstraction layer vtable for this main loop.
int(* pa_poll_func)(struct pollfd *ufds, unsigned long nfds, int timeout, void *userdata)
Generic prototype of a poll() like function.
Definition: mainloop.h:127
struct pa_mainloop pa_mainloop
An opaque main loop object.
Definition: mainloop.h:78
int pa_mainloop_dispatch(pa_mainloop *m)
Dispatch timeout, io and deferred events from the previously executed poll.
pa_mainloop * pa_mainloop_new(void)
Allocate a new main loop object.
void pa_mainloop_set_poll_func(pa_mainloop *m, pa_poll_func poll_func, void *userdata)
Change the poll() implementation.
int pa_mainloop_run(pa_mainloop *m, int *retval)
Run unlimited iterations of the main loop object until the main loop's quit() routine is called.
An abstract mainloop API vtable.
Definition: mainloop-api.h:87