PulseAudio
2.1
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
mainloop-api.h
Go to the documentation of this file.
1
#ifndef foomainloopapihfoo
2
#define foomainloopapihfoo
3
4
/***
5
This file is part of PulseAudio.
6
7
Copyright 2004-2006 Lennart Poettering
8
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
9
10
PulseAudio is free software; you can redistribute it and/or modify
11
it under the terms of the GNU Lesser General Public License as
12
published by the Free Software Foundation; either version 2.1 of the
13
License, or (at your option) any later version.
14
15
PulseAudio is distributed in the hope that it will be useful, but
16
WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
Lesser General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public
21
License along with PulseAudio; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23
USA.
24
***/
25
26
#include <sys/time.h>
27
28
#include <pulse/cdecl.h>
29
#include <
pulse/version.h
>
30
46
PA_C_DECL_BEGIN
47
49
typedef
struct
pa_mainloop_api
pa_mainloop_api
;
50
52
typedef
enum
pa_io_event_flags
{
53
PA_IO_EVENT_NULL
= 0,
54
PA_IO_EVENT_INPUT
= 1,
55
PA_IO_EVENT_OUTPUT
= 2,
56
PA_IO_EVENT_HANGUP
= 4,
57
PA_IO_EVENT_ERROR
= 8
58
}
pa_io_event_flags_t
;
59
61
typedef
struct
pa_io_event
pa_io_event
;
63
typedef
void (*
pa_io_event_cb_t
)(
pa_mainloop_api
*ea,
pa_io_event
* e,
int
fd,
pa_io_event_flags_t
events,
void
*userdata);
65
typedef
void (*
pa_io_event_destroy_cb_t
)(
pa_mainloop_api
*a,
pa_io_event
*e,
void
*userdata);
66
68
typedef
struct
pa_time_event
pa_time_event
;
70
typedef
void (*
pa_time_event_cb_t
)(
pa_mainloop_api
*a,
pa_time_event
* e,
const
struct
timeval *tv,
void
*userdata);
72
typedef
void (*
pa_time_event_destroy_cb_t
)(
pa_mainloop_api
*a,
pa_time_event
*e,
void
*userdata);
73
75
typedef
struct
pa_defer_event
pa_defer_event
;
77
typedef
void (*
pa_defer_event_cb_t
)(
pa_mainloop_api
*a,
pa_defer_event
* e,
void
*userdata);
79
typedef
void (*
pa_defer_event_destroy_cb_t
)(
pa_mainloop_api
*a,
pa_defer_event
*e,
void
*userdata);
80
82
struct
pa_mainloop_api
{
84
void
*
userdata
;
85
87
pa_io_event
* (*io_new)(
pa_mainloop_api
*a,
int
fd,
pa_io_event_flags_t
events,
pa_io_event_cb_t
cb,
void
*
userdata
);
89
void (*
io_enable
)(
pa_io_event
* e,
pa_io_event_flags_t
events);
91
void (*
io_free
)(
pa_io_event
* e);
93
void (*
io_set_destroy
)(
pa_io_event
*e,
pa_io_event_destroy_cb_t
cb);
94
96
pa_time_event
* (*time_new)(
pa_mainloop_api
*a,
const
struct
timeval *tv,
pa_time_event_cb_t
cb,
void
*
userdata
);
98
void (*
time_restart
)(
pa_time_event
* e,
const
struct
timeval *tv);
100
void (*
time_free
)(
pa_time_event
* e);
102
void (*
time_set_destroy
)(
pa_time_event
*e,
pa_time_event_destroy_cb_t
cb);
103
105
pa_defer_event
* (*defer_new)(
pa_mainloop_api
*a,
pa_defer_event_cb_t
cb,
void
*
userdata
);
107
void (*
defer_enable
)(
pa_defer_event
* e,
int
b);
109
void (*
defer_free
)(
pa_defer_event
* e);
111
void (*
defer_set_destroy
)(
pa_defer_event
*e,
pa_defer_event_destroy_cb_t
cb);
112
114
void (*
quit
)(
pa_mainloop_api
*a,
int
retval);
115
};
116
118
void
pa_mainloop_api_once
(
pa_mainloop_api
*m,
void
(*callback)(
pa_mainloop_api
*m,
void
*userdata),
void
*userdata);
119
120
PA_C_DECL_END
121
122
#endif
src
pulse
mainloop-api.h
Generated by
1.8.3