1 #ifndef foomainloopapihfoo
2 #define foomainloopapihfoo
7 This file is part of polypaudio.
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 enum pa_mainloop_api_io_events
{
29 PA_MAINLOOP_API_IO_EVENT_NULL
= 0,
30 PA_MAINLOOP_API_IO_EVENT_INPUT
= 1,
31 PA_MAINLOOP_API_IO_EVENT_OUTPUT
= 2,
32 PA_MAINLOOP_API_IO_EVENT_BOTH
= 3,
33 PA_MAINLOOP_API_IO_EVENT_HUP
= 4
36 struct pa_mainloop_api
{
40 void* (*source_io
)(struct pa_mainloop_api
*a
, int fd
, enum pa_mainloop_api_io_events events
, void (*callback
) (struct pa_mainloop_api
*a
, void *id
, int fd
, enum pa_mainloop_api_io_events events
, void *userdata
), void *userdata
);
41 void (*enable_io
)(struct pa_mainloop_api
*a
, void* id
, enum pa_mainloop_api_io_events events
);
42 void (*cancel_io
)(struct pa_mainloop_api
*a
, void* id
);
45 void* (*source_fixed
)(struct pa_mainloop_api
*a
, void (*callback
) (struct pa_mainloop_api
*a
, void *id
, void *userdata
), void *userdata
);
46 void (*enable_fixed
)(struct pa_mainloop_api
*a
, void* id
, int b
);
47 void (*cancel_fixed
)(struct pa_mainloop_api
*a
, void* id
);
50 void* (*source_idle
)(struct pa_mainloop_api
*a
, void (*callback
) (struct pa_mainloop_api
*a
, void *id
, void *userdata
), void *userdata
);
51 void (*enable_idle
)(struct pa_mainloop_api
*a
, void* id
, int b
);
52 void (*cancel_idle
)(struct pa_mainloop_api
*a
, void* id
);
55 void* (*source_time
)(struct pa_mainloop_api
*a
, const struct timeval
*tv
, void (*callback
) (struct pa_mainloop_api
*a
, void *id
, const struct timeval
*tv
, void *userdata
), void *userdata
);
56 void (*enable_time
)(struct pa_mainloop_api
*a
, void *id
, const struct timeval
*tv
);
57 void (*cancel_time
)(struct pa_mainloop_api
*a
, void* id
);
60 void (*quit
)(struct pa_mainloop_api
*a
, int retval
);
63 void pa_mainloop_api_once(struct pa_mainloop_api
*m
, void (*callback
)(void *userdata
), void *userdata
);