Changeset 3461:d5cac3d3f9b6 in roaraudio for libroarpulse


Ignore:
Timestamp:
02/13/10 21:59:58 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

prototype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/mainloop.c

    r3460 r3461  
    3939#include <libroarpulse/libroarpulse.h> 
    4040 
     41/** Allocate a new main loop object */ 
     42pa_mainloop *pa_mainloop_new(void); 
     43 
     44/** Free a main loop object */ 
     45void pa_mainloop_free(pa_mainloop* m); 
     46 
     47/** Prepare for a single iteration of the main loop. Returns a negative value 
     48on error or exit request. timeout specifies a maximum timeout for the subsequent 
     49poll, or -1 for blocking behaviour. .*/ 
     50int pa_mainloop_prepare(pa_mainloop *m, int timeout); 
     51 
     52/** Execute the previously prepared poll. Returns a negative value on error.*/ 
     53int pa_mainloop_poll(pa_mainloop *m); 
     54 
     55/** Dispatch timeout, io and deferred events from the previously executed poll. Returns 
     56a negative value on error. On success returns the number of source dispatched. */ 
     57int pa_mainloop_dispatch(pa_mainloop *m); 
     58 
     59/** Return the return value as specified with the main loop's quit() routine. */ 
     60int pa_mainloop_get_retval(pa_mainloop *m); 
     61 
     62/** Run a single iteration of the main loop. This is a convenience function 
     63for pa_mainloop_prepare(), pa_mainloop_poll() and pa_mainloop_dispatch(). 
     64Returns a negative value on error or exit request. If block is nonzero, 
     65block for events if none are queued. Optionally return the return value as 
     66specified with the main loop's quit() routine in the integer variable retval points 
     67to. On success returns the number of sources dispatched in this iteration. */ 
     68int pa_mainloop_iterate(pa_mainloop *m, int block, int *retval); 
     69 
     70/** Run unlimited iterations of the main loop object until the main loop's quit() routine is called. */ 
     71int pa_mainloop_run(pa_mainloop *m, int *retval); 
     72 
     73/** Return the abstract main loop abstraction layer vtable for this main loop. */ 
     74pa_mainloop_api* pa_mainloop_get_api(pa_mainloop*m); 
     75 
     76/** Shutdown the main loop */ 
     77void pa_mainloop_quit(pa_mainloop *m, int r); 
     78 
     79/** Interrupt a running poll (for threaded systems) */ 
     80void pa_mainloop_wakeup(pa_mainloop *m); 
     81 
     82/** Generic prototype of a poll() like function */ 
     83typedef int (*pa_poll_func)(struct pollfd *ufds, unsigned long nfds, int timeout, void*userdata); 
     84 
     85/** Change the poll() implementation */ 
     86void pa_mainloop_set_poll_func(pa_mainloop *m, pa_poll_func poll_func, void *userdata); 
     87 
    4188//ll 
Note: See TracChangeset for help on using the changeset viewer.