Commit | Line | Data |
---|---|---|
abbca718 LOK |
1 | #pragma once |
2 | /* | |
3 | * This file is part of the libCEC(R) library. | |
4 | * | |
b492c10e | 5 | * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. |
abbca718 LOK |
6 | * libCEC(R) is an original work, containing original code. |
7 | * | |
8 | * libCEC(R) is a trademark of Pulse-Eight Limited. | |
9 | * | |
10 | * This program is dual-licensed; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; either version 2 of the License, or | |
13 | * (at your option) any later version. | |
14 | * | |
15 | * This program is distributed in the hope that it will be useful, | |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | * GNU General Public License for more details. | |
19 | * | |
20 | * You should have received a copy of the GNU General Public License | |
21 | * along with this program; if not, write to the Free Software | |
22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
23 | * | |
24 | * | |
25 | * Alternatively, you can license this library under a commercial license, | |
26 | * please contact Pulse-Eight Licensing for more information. | |
27 | * | |
28 | * For more information contact: | |
29 | * Pulse-Eight Licensing <license@pulse-eight.com> | |
30 | * http://www.pulse-eight.com/ | |
31 | * http://www.pulse-eight.net/ | |
32 | */ | |
33 | ||
34 | #ifndef CECEXPORTS_C_H_ | |
35 | #define CECEXPORTS_C_H_ | |
36 | ||
bafc6701 | 37 | #include "cectypes.h" |
acec5f48 | 38 | |
abbca718 LOK |
39 | #ifdef __cplusplus |
40 | extern "C" { | |
41 | #endif | |
42 | ||
f8513317 | 43 | #ifdef __cplusplus |
3efda01a | 44 | extern DECLSPEC int cec_initialise(CEC::libcec_configuration *configuration); |
f8513317 | 45 | #else |
3efda01a | 46 | extern DECLSPEC int cec_initialise(libcec_configuration *configuration); |
caca2d81 LOK |
47 | #endif |
48 | ||
49 | #ifdef __cplusplus | |
50 | extern DECLSPEC int cec_init_typed(const char *strDeviceName, CEC::cec_device_type_list deviceTypes); | |
51 | #else | |
52 | extern DECLSPEC int cec_init_typed(const char *strDeviceName, cec_device_type_list deviceTypes); | |
f8513317 LOK |
53 | #endif |
54 | ||
5f39c4d8 LOK |
55 | extern DECLSPEC void cec_destroy(void); |
56 | ||
02ee2c68 | 57 | extern DECLSPEC int cec_open(const char *strPort, uint32_t iTimeout); |
abbca718 | 58 | |
5f39c4d8 | 59 | extern DECLSPEC void cec_close(void); |
f99bc831 | 60 | |
fa4798bd | 61 | #ifdef __cplusplus |
547b390d | 62 | extern DECLSPEC int cec_enable_callbacks(void *cbParam, CEC::ICECCallbacks *callbacks); |
fa4798bd | 63 | #else |
547b390d | 64 | extern DECLSPEC int cec_enable_callbacks(void *cbParam, ICECCallbacks *callbacks); |
fa4798bd LOK |
65 | #endif |
66 | ||
2abe74eb | 67 | #ifdef __cplusplus |
f958766e | 68 | extern DECLSPEC int8_t cec_find_adapters(CEC::cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath); |
2abe74eb | 69 | #else |
f958766e | 70 | extern DECLSPEC int8_t cec_find_adapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath); |
2abe74eb LOK |
71 | #endif |
72 | ||
02ee2c68 | 73 | extern DECLSPEC int cec_ping_adapters(void); |
abbca718 | 74 | |
02ee2c68 | 75 | extern DECLSPEC int cec_start_bootloader(void); |
abbca718 | 76 | |
dc2c98f6 LOK |
77 | extern DECLSPEC int8_t cec_get_min_lib_version(void); |
78 | ||
79 | extern DECLSPEC int8_t cec_get_lib_version_major(void); | |
80 | ||
81 | extern DECLSPEC int8_t cec_get_lib_version_minor(void); | |
82 | ||
abbca718 | 83 | #ifdef __cplusplus |
f958766e | 84 | extern DECLSPEC int cec_power_on_devices(CEC::cec_logical_address address); |
abbca718 | 85 | #else |
f958766e | 86 | extern DECLSPEC int cec_power_on_devices(cec_logical_address address); |
abbca718 LOK |
87 | #endif |
88 | ||
abbca718 | 89 | #ifdef __cplusplus |
f958766e | 90 | extern DECLSPEC int cec_standby_devices(CEC::cec_logical_address address); |
abbca718 | 91 | #else |
f958766e | 92 | extern DECLSPEC int cec_standby_devices(cec_logical_address address); |
abbca718 LOK |
93 | #endif |
94 | ||
dc2c98f6 LOK |
95 | extern DECLSPEC int cec_set_active_view(void); |
96 | ||
18203d17 | 97 | #ifdef __cplusplus |
f958766e | 98 | extern DECLSPEC int cec_set_active_source(CEC::cec_device_type type); |
18203d17 | 99 | #else |
f958766e | 100 | extern DECLSPEC int cec_set_active_source(cec_device_type type); |
18203d17 LOK |
101 | #endif |
102 | ||
f2cdbc36 PG |
103 | #ifdef __cplusplus |
104 | extern DECLSPEC int cec_set_deck_control_mode(CEC::cec_deck_control_mode mode, int bSendUpdate); | |
105 | #else | |
106 | extern DECLSPEC int cec_set_deck_control_mode(cec_deck_control_mode mode, int bSendUpdate); | |
107 | #endif | |
108 | ||
109 | #ifdef __cplusplus | |
110 | extern DECLSPEC int cec_set_deck_info(CEC::cec_deck_info info, int bSendUpdate); | |
111 | #else | |
112 | extern DECLSPEC int cec_set_deck_info(cec_deck_info info, int bSendUpdate); | |
113 | #endif | |
114 | ||
02ee2c68 | 115 | extern DECLSPEC int cec_set_inactive_view(void); |
abbca718 | 116 | |
f2cdbc36 PG |
117 | #ifdef __cplusplus |
118 | extern DECLSPEC int cec_set_menu_state(CEC::cec_menu_state state, int bSendUpdate); | |
119 | #else | |
120 | extern DECLSPEC int cec_set_menu_state(cec_menu_state state, int bSendUpdate); | |
121 | #endif | |
122 | ||
dc2c98f6 LOK |
123 | #ifdef __cplusplus |
124 | extern DECLSPEC int cec_get_next_log_message(CEC::cec_log_message *message); | |
125 | #else | |
126 | extern DECLSPEC int cec_get_next_log_message(cec_log_message *message); | |
127 | #endif | |
128 | ||
129 | #ifdef __cplusplus | |
130 | extern DECLSPEC int cec_get_next_keypress(CEC::cec_keypress *key); | |
131 | #else | |
132 | extern DECLSPEC int cec_get_next_keypress(cec_keypress *key); | |
133 | #endif | |
134 | ||
135 | #ifdef __cplusplus | |
136 | extern DECLSPEC int cec_get_next_command(CEC::cec_command *command); | |
137 | #else | |
138 | extern DECLSPEC int cec_get_next_command(cec_command *command); | |
139 | #endif | |
140 | ||
abbca718 | 141 | #ifdef __cplusplus |
f958766e | 142 | extern DECLSPEC int cec_transmit(const CEC::cec_command *data); |
abbca718 | 143 | #else |
f958766e | 144 | extern DECLSPEC int cec_transmit(const cec_command *data); |
abbca718 LOK |
145 | #endif |
146 | ||
6dfe9213 | 147 | #ifdef __cplusplus |
f958766e | 148 | extern DECLSPEC int cec_set_logical_address(CEC::cec_logical_address iLogicalAddress); |
6dfe9213 | 149 | #else |
f958766e | 150 | extern DECLSPEC int cec_set_logical_address(cec_logical_address iLogicalAddress); |
6dfe9213 LOK |
151 | #endif |
152 | ||
f958766e | 153 | extern DECLSPEC int cec_set_physical_address(uint16_t iPhysicalAddress); |
2492216a | 154 | |
1969b140 LOK |
155 | #ifdef __cplusplus |
156 | extern DECLSPEC int cec_set_osd_string(CEC::cec_logical_address iLogicalAddress, CEC::cec_display_control duration, const char *strMessage); | |
157 | #else | |
158 | extern DECLSPEC int cec_set_osd_string(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage); | |
159 | #endif | |
160 | ||
8b7e5ff6 LOK |
161 | extern DECLSPEC int cec_switch_monitoring(int bEnable); |
162 | ||
6a1c0009 LOK |
163 | #ifdef __cplusplus |
164 | extern DECLSPEC CEC::cec_version cec_get_device_cec_version(CEC::cec_logical_address iLogicalAddress); | |
165 | #else | |
166 | extern DECLSPEC cec_version cec_get_device_cec_version(cec_logical_address iLogicalAddress); | |
167 | #endif | |
168 | ||
a3269a0a LOK |
169 | #ifdef __cplusplus |
170 | extern DECLSPEC int cec_get_device_menu_language(CEC::cec_logical_address iLogicalAddress, CEC::cec_menu_language *language); | |
171 | #else | |
44c74256 | 172 | extern DECLSPEC int cec_get_device_menu_language(cec_logical_address iLogicalAddress, cec_menu_language *language); |
a3269a0a | 173 | #endif |
44c74256 | 174 | |
44c74256 LOK |
175 | #ifdef __cplusplus |
176 | extern DECLSPEC uint64_t cec_get_device_vendor_id(CEC::cec_logical_address iLogicalAddress); | |
177 | #else | |
178 | extern DECLSPEC uint64_t cec_get_device_vendor_id(cec_logical_address iLogicalAddress); | |
179 | #endif | |
180 | ||
eab72c40 LOK |
181 | #ifdef __cplusplus |
182 | extern DECLSPEC uint16_t cec_get_device_physical_address(CEC::cec_logical_address iLogicalAddress); | |
183 | #else | |
184 | extern DECLSPEC uint16_t cec_get_device_physical_address(cec_logical_address iLogicalAddress); | |
185 | #endif | |
186 | ||
b4b1b49b LOK |
187 | #ifdef __cplusplus |
188 | extern DECLSPEC CEC::cec_logical_address cec_get_active_source(void); | |
189 | #else | |
190 | extern DECLSPEC cec_logical_address cec_get_active_source(void); | |
191 | #endif | |
192 | ||
193 | #ifdef __cplusplus | |
194 | extern DECLSPEC int cec_is_active_source(CEC::cec_logical_address iAddress); | |
195 | #else | |
196 | extern DECLSPEC int cec_is_active_source(cec_logical_address iAddress); | |
197 | #endif | |
198 | ||
e55f3f70 LOK |
199 | #ifdef __cplusplus |
200 | extern DECLSPEC CEC::cec_power_status cec_get_device_power_status(CEC::cec_logical_address iLogicalAddress); | |
201 | #else | |
202 | extern DECLSPEC cec_power_status cec_get_device_power_status(cec_logical_address iLogicalAddress); | |
203 | #endif | |
204 | ||
57f45e6c LOK |
205 | #ifdef __cplusplus |
206 | extern DECLSPEC int cec_poll_device(CEC::cec_logical_address iLogicalAddress); | |
207 | #else | |
208 | extern DECLSPEC int cec_poll_device(cec_logical_address iLogicalAddress); | |
209 | #endif | |
210 | ||
6d858ba4 LOK |
211 | #ifdef __cplusplus |
212 | extern DECLSPEC CEC::cec_logical_addresses cec_get_active_devices(void); | |
213 | #else | |
214 | extern DECLSPEC cec_logical_addresses cec_get_active_devices(void); | |
215 | #endif | |
216 | ||
217 | #ifdef __cplusplus | |
218 | extern DECLSPEC int cec_is_active_device(CEC::cec_logical_address iAddress); | |
219 | #else | |
220 | extern DECLSPEC int cec_is_active_device(cec_logical_address iAddress); | |
221 | #endif | |
222 | ||
223 | #ifdef __cplusplus | |
224 | extern DECLSPEC int cec_is_active_device_type(CEC::cec_device_type type); | |
225 | #else | |
226 | extern DECLSPEC int cec_is_active_device_type(cec_device_type type); | |
227 | #endif | |
228 | ||
d2f1c157 LOK |
229 | #ifdef __cplusplus |
230 | extern DECLSPEC int cec_set_hdmi_port(CEC::cec_logical_address iBaseDevice, uint8_t iPort); | |
231 | #else | |
232 | extern DECLSPEC int cec_set_hdmi_port(cec_logical_address iBaseDevice, uint8_t iPort); | |
233 | #endif | |
16b1e052 | 234 | |
5c73f7f7 | 235 | extern DECLSPEC int cec_volume_up(int bSendRelease); |
04e637f9 | 236 | |
5c73f7f7 | 237 | extern DECLSPEC int cec_volume_down(int bSendRelease); |
a33794d8 | 238 | |
5c73f7f7 | 239 | extern DECLSPEC int cec_mute_audio(int bSendRelease); |
a33794d8 LOK |
240 | |
241 | #ifdef __cplusplus | |
242 | extern DECLSPEC int cec_send_keypress(CEC::cec_logical_address iDestination, CEC::cec_user_control_code key, int bWait); | |
243 | #else | |
244 | extern DECLSPEC int cec_send_keypress(cec_logical_address iDestination, cec_user_control_code key, int bWait); | |
245 | #endif | |
246 | ||
247 | #ifdef __cplusplus | |
248 | extern DECLSPEC int cec_send_key_release(CEC::cec_logical_address iDestination, int bWait); | |
249 | #else | |
250 | extern DECLSPEC int cec_send_key_release(cec_logical_address iDestination, int bWait); | |
251 | #endif | |
04e637f9 | 252 | |
ed21be2a | 253 | #ifdef __cplusplus |
f71a1df9 | 254 | extern DECLSPEC CEC::cec_osd_name cec_get_device_osd_name(CEC::cec_logical_address iAddress); |
ed21be2a | 255 | #else |
f71a1df9 | 256 | extern DECLSPEC cec_osd_name cec_get_device_osd_name(cec_logical_address iAddress); |
ed21be2a | 257 | #endif |
04e637f9 | 258 | |
dc2c98f6 LOK |
259 | extern DECLSPEC int cec_enable_physical_address_detection(void); |
260 | ||
f42d3e0f LOK |
261 | #ifdef __cplusplus |
262 | extern DECLSPEC int cec_set_stream_path_logical(CEC::cec_logical_address iAddress); | |
263 | #else | |
264 | extern DECLSPEC int cec_set_stream_path_logical(cec_logical_address iAddress); | |
265 | #endif | |
266 | ||
267 | extern DECLSPEC int cec_set_stream_path_physical(uint16_t iPhysicalAddress); | |
268 | ||
80b72250 LOK |
269 | #ifdef __cplusplus |
270 | extern DECLSPEC CEC::cec_logical_addresses cec_get_logical_addresses(void); | |
271 | #else | |
272 | extern DECLSPEC cec_logical_addresses cec_get_logical_addresses(void); | |
273 | #endif | |
274 | ||
d40928b5 LOK |
275 | #ifdef __cplusplus |
276 | extern DECLSPEC int cec_get_current_configuration(CEC::libcec_configuration *configuration); | |
277 | #else | |
278 | extern DECLSPEC int cec_get_current_configuration(libcec_configuration *configuration); | |
279 | #endif | |
280 | ||
224ea877 LOK |
281 | extern DECLSPEC int cec_can_persist_configuration(void); |
282 | ||
283 | #ifdef __cplusplus | |
30b4aac0 | 284 | extern DECLSPEC int cec_persist_configuration(CEC::libcec_configuration *configuration); |
224ea877 | 285 | #else |
30b4aac0 LOK |
286 | extern DECLSPEC int cec_persist_configuration(libcec_configuration *configuration); |
287 | #endif | |
288 | ||
289 | #ifdef __cplusplus | |
290 | extern DECLSPEC int cec_set_configuration(const CEC::libcec_configuration *configuration); | |
291 | #else | |
292 | extern DECLSPEC int cec_set_configuration(const libcec_configuration *configuration); | |
224ea877 | 293 | #endif |
d40928b5 | 294 | |
3efda01a LOK |
295 | extern DECLSPEC void cec_rescan_devices(void); |
296 | ||
c9549d35 LOK |
297 | extern DECLSPEC int cec_is_libcec_active_source(void); |
298 | ||
abbca718 LOK |
299 | #ifdef __cplusplus |
300 | }; | |
301 | #endif | |
302 | ||
303 | #endif /* CECEXPORTS_C_H_ */ |