1 /*
2  * libjingle
3  * Copyright 2004--2010, Google Inc.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  *  1. Redistributions of source code must retain the above copyright notice,
9  *     this list of conditions and the following disclaimer.
10  *  2. Redistributions in binary form must reproduce the above copyright notice,
11  *     this list of conditions and the following disclaimer in the documentation
12  *     and/or other materials provided with the distribution.
13  *  3. The name of the author may not be used to endorse or promote products
14  *     derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H
29 #define WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H
30 
31 #include "webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h"
32 
33 namespace webrtc_adm_linux_pulse {
34 
35 // The PulseAudio symbols we need, as an X-Macro list.
36 // This list must contain precisely every libpulse function that is used in
37 // the ADM LINUX PULSE Device and Mixer classes
38 #define PULSE_AUDIO_SYMBOLS_LIST \
39   X(pa_bytes_per_second) \
40   X(pa_context_connect) \
41   X(pa_context_disconnect) \
42   X(pa_context_errno) \
43   X(pa_context_get_protocol_version) \
44   X(pa_context_get_server_info) \
45   X(pa_context_get_sink_info_list) \
46   X(pa_context_get_sink_info_by_index) \
47   X(pa_context_get_sink_info_by_name) \
48   X(pa_context_get_sink_input_info) \
49   X(pa_context_get_source_info_by_index) \
50   X(pa_context_get_source_info_by_name) \
51   X(pa_context_get_source_info_list) \
52   X(pa_context_get_state) \
53   X(pa_context_new) \
54   X(pa_context_set_sink_input_volume) \
55   X(pa_context_set_sink_input_mute) \
56   X(pa_context_set_source_volume_by_index) \
57   X(pa_context_set_source_mute_by_index) \
58   X(pa_context_set_state_callback) \
59   X(pa_context_unref) \
60   X(pa_cvolume_set) \
61   X(pa_operation_get_state) \
62   X(pa_operation_unref) \
63   X(pa_stream_connect_playback) \
64   X(pa_stream_connect_record) \
65   X(pa_stream_disconnect) \
66   X(pa_stream_drop) \
67   X(pa_stream_get_device_index) \
68   X(pa_stream_get_index) \
69   X(pa_stream_get_latency) \
70   X(pa_stream_get_sample_spec) \
71   X(pa_stream_get_state) \
72   X(pa_stream_new) \
73   X(pa_stream_peek) \
74   X(pa_stream_readable_size) \
75   X(pa_stream_set_buffer_attr) \
76   X(pa_stream_set_overflow_callback) \
77   X(pa_stream_set_read_callback) \
78   X(pa_stream_set_state_callback) \
79   X(pa_stream_set_underflow_callback) \
80   X(pa_stream_set_write_callback) \
81   X(pa_stream_unref) \
82   X(pa_stream_writable_size) \
83   X(pa_stream_write) \
84   X(pa_strerror) \
85   X(pa_threaded_mainloop_free) \
86   X(pa_threaded_mainloop_get_api) \
87   X(pa_threaded_mainloop_lock) \
88   X(pa_threaded_mainloop_new) \
89   X(pa_threaded_mainloop_signal) \
90   X(pa_threaded_mainloop_start) \
91   X(pa_threaded_mainloop_stop) \
92   X(pa_threaded_mainloop_unlock) \
93   X(pa_threaded_mainloop_wait)
94 
95 LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(PulseAudioSymbolTable)
96 #define X(sym) \
97     LATE_BINDING_SYMBOL_TABLE_DECLARE_ENTRY(PulseAudioSymbolTable, sym)
98 PULSE_AUDIO_SYMBOLS_LIST
99 #undef X
100 LATE_BINDING_SYMBOL_TABLE_DECLARE_END(PulseAudioSymbolTable)
101 
102 }  // namespace webrtc_adm_linux_pulse
103 
104 #endif  // WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H
105