Commit | Line | Data |
---|---|---|
abbca718 LOK |
1 | #pragma once |
2 | /* | |
3 | * This file is part of the libCEC(R) library. | |
4 | * | |
5 | * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved. | |
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 | ||
761dcc45 | 37 | #include <cectypes.h> |
acec5f48 | 38 | |
abbca718 LOK |
39 | #ifdef __cplusplus |
40 | extern "C" { | |
41 | #endif | |
42 | ||
df7339c6 | 43 | #ifdef __cplusplus |
f958766e | 44 | extern DECLSPEC int cec_init(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress, uint16_t iPhysicalAddress); |
df7339c6 | 45 | #else |
f958766e | 46 | extern DECLSPEC int cec_init(const char *strDeviceName, cec_logical_address iLogicalAddress, uint16_t iPhysicalAddress); |
df7339c6 | 47 | #endif |
abbca718 | 48 | |
f8513317 LOK |
49 | #ifdef __cplusplus |
50 | extern DECLSPEC int cec_init_typed(const char *strDeviceName, CEC::cec_device_type_list devicesTypes); | |
51 | #else | |
52 | extern DECLSPEC int cec_init_typed(const char *strDeviceName, cec_device_type_list devicesTypes); | |
53 | #endif | |
54 | ||
55 | ||
5f39c4d8 LOK |
56 | extern DECLSPEC void cec_destroy(void); |
57 | ||
02ee2c68 | 58 | extern DECLSPEC int cec_open(const char *strPort, uint32_t iTimeout); |
abbca718 | 59 | |
5f39c4d8 | 60 | extern DECLSPEC void cec_close(void); |
f99bc831 | 61 | |
fa4798bd | 62 | #ifdef __cplusplus |
547b390d | 63 | extern DECLSPEC int cec_enable_callbacks(void *cbParam, CEC::ICECCallbacks *callbacks); |
fa4798bd | 64 | #else |
547b390d | 65 | extern DECLSPEC int cec_enable_callbacks(void *cbParam, ICECCallbacks *callbacks); |
fa4798bd LOK |
66 | #endif |
67 | ||
2abe74eb | 68 | #ifdef __cplusplus |
f958766e | 69 | extern DECLSPEC int8_t cec_find_adapters(CEC::cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath); |
2abe74eb | 70 | #else |
f958766e | 71 | extern DECLSPEC int8_t cec_find_adapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath); |
2abe74eb LOK |
72 | #endif |
73 | ||
02ee2c68 | 74 | extern DECLSPEC int cec_ping_adapters(void); |
abbca718 | 75 | |
02ee2c68 | 76 | extern DECLSPEC int cec_start_bootloader(void); |
abbca718 | 77 | |
d75be19b | 78 | extern DECLSPEC int8_t cec_get_min_lib_version(void); |
2abe74eb | 79 | |
d75be19b | 80 | extern DECLSPEC int8_t cec_get_lib_version_major(void); |
abbca718 | 81 | |
eafd9bed LOK |
82 | extern DECLSPEC int8_t cec_get_lib_version_minor(void); |
83 | ||
abbca718 | 84 | #ifdef __cplusplus |
f958766e | 85 | extern DECLSPEC int cec_power_on_devices(CEC::cec_logical_address address); |
abbca718 | 86 | #else |
f958766e | 87 | extern DECLSPEC int cec_power_on_devices(cec_logical_address address); |
abbca718 LOK |
88 | #endif |
89 | ||
abbca718 | 90 | #ifdef __cplusplus |
f958766e | 91 | extern DECLSPEC int cec_standby_devices(CEC::cec_logical_address address); |
abbca718 | 92 | #else |
f958766e | 93 | extern DECLSPEC int cec_standby_devices(cec_logical_address address); |
abbca718 LOK |
94 | #endif |
95 | ||
02ee2c68 | 96 | extern DECLSPEC int cec_set_active_view(void); |
abbca718 | 97 | |
18203d17 | 98 | #ifdef __cplusplus |
f958766e | 99 | extern DECLSPEC int cec_set_active_source(CEC::cec_device_type type); |
18203d17 | 100 | #else |
f958766e | 101 | extern DECLSPEC int cec_set_active_source(cec_device_type type); |
18203d17 LOK |
102 | #endif |
103 | ||
f2cdbc36 PG |
104 | #ifdef __cplusplus |
105 | extern DECLSPEC int cec_set_deck_control_mode(CEC::cec_deck_control_mode mode, int bSendUpdate); | |
106 | #else | |
107 | extern DECLSPEC int cec_set_deck_control_mode(cec_deck_control_mode mode, int bSendUpdate); | |
108 | #endif | |
109 | ||
110 | #ifdef __cplusplus | |
111 | extern DECLSPEC int cec_set_deck_info(CEC::cec_deck_info info, int bSendUpdate); | |
112 | #else | |
113 | extern DECLSPEC int cec_set_deck_info(cec_deck_info info, int bSendUpdate); | |
114 | #endif | |
115 | ||
02ee2c68 | 116 | extern DECLSPEC int cec_set_inactive_view(void); |
abbca718 | 117 | |
f2cdbc36 PG |
118 | #ifdef __cplusplus |
119 | extern DECLSPEC int cec_set_menu_state(CEC::cec_menu_state state, int bSendUpdate); | |
120 | #else | |
121 | extern DECLSPEC int cec_set_menu_state(cec_menu_state state, int bSendUpdate); | |
122 | #endif | |
123 | ||
abbca718 | 124 | #ifdef __cplusplus |
02ee2c68 | 125 | extern DECLSPEC int cec_get_next_log_message(CEC::cec_log_message *message); |
abbca718 | 126 | #else |
02ee2c68 | 127 | extern DECLSPEC int cec_get_next_log_message(cec_log_message *message); |
abbca718 LOK |
128 | #endif |
129 | ||
abbca718 | 130 | #ifdef __cplusplus |
02ee2c68 | 131 | extern DECLSPEC int cec_get_next_keypress(CEC::cec_keypress *key); |
abbca718 | 132 | #else |
02ee2c68 | 133 | extern DECLSPEC int cec_get_next_keypress(cec_keypress *key); |
abbca718 LOK |
134 | #endif |
135 | ||
825ddb96 | 136 | #ifdef __cplusplus |
02ee2c68 | 137 | extern DECLSPEC int cec_get_next_command(CEC::cec_command *command); |
825ddb96 | 138 | #else |
02ee2c68 | 139 | extern DECLSPEC int cec_get_next_command(cec_command *command); |
825ddb96 LOK |
140 | #endif |
141 | ||
abbca718 | 142 | #ifdef __cplusplus |
f958766e | 143 | extern DECLSPEC int cec_transmit(const CEC::cec_command *data); |
abbca718 | 144 | #else |
f958766e | 145 | extern DECLSPEC int cec_transmit(const cec_command *data); |
abbca718 LOK |
146 | #endif |
147 | ||
6dfe9213 | 148 | #ifdef __cplusplus |
f958766e | 149 | extern DECLSPEC int cec_set_logical_address(CEC::cec_logical_address iLogicalAddress); |
6dfe9213 | 150 | #else |
f958766e | 151 | extern DECLSPEC int cec_set_logical_address(cec_logical_address iLogicalAddress); |
6dfe9213 LOK |
152 | #endif |
153 | ||
f958766e | 154 | extern DECLSPEC int cec_set_physical_address(uint16_t iPhysicalAddress); |
2492216a | 155 | |
1969b140 LOK |
156 | #ifdef __cplusplus |
157 | extern DECLSPEC int cec_set_osd_string(CEC::cec_logical_address iLogicalAddress, CEC::cec_display_control duration, const char *strMessage); | |
158 | #else | |
159 | extern DECLSPEC int cec_set_osd_string(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage); | |
160 | #endif | |
161 | ||
8b7e5ff6 LOK |
162 | extern DECLSPEC int cec_switch_monitoring(int bEnable); |
163 | ||
6a1c0009 LOK |
164 | #ifdef __cplusplus |
165 | extern DECLSPEC CEC::cec_version cec_get_device_cec_version(CEC::cec_logical_address iLogicalAddress); | |
166 | #else | |
167 | extern DECLSPEC cec_version cec_get_device_cec_version(cec_logical_address iLogicalAddress); | |
168 | #endif | |
169 | ||
a3269a0a LOK |
170 | #ifdef __cplusplus |
171 | extern DECLSPEC int cec_get_device_menu_language(CEC::cec_logical_address iLogicalAddress, CEC::cec_menu_language *language); | |
172 | #else | |
44c74256 | 173 | extern DECLSPEC int cec_get_device_menu_language(cec_logical_address iLogicalAddress, cec_menu_language *language); |
a3269a0a | 174 | #endif |
44c74256 | 175 | |
44c74256 LOK |
176 | #ifdef __cplusplus |
177 | extern DECLSPEC uint64_t cec_get_device_vendor_id(CEC::cec_logical_address iLogicalAddress); | |
178 | #else | |
179 | extern DECLSPEC uint64_t cec_get_device_vendor_id(cec_logical_address iLogicalAddress); | |
180 | #endif | |
181 | ||
eab72c40 LOK |
182 | #ifdef __cplusplus |
183 | extern DECLSPEC uint16_t cec_get_device_physical_address(CEC::cec_logical_address iLogicalAddress); | |
184 | #else | |
185 | extern DECLSPEC uint16_t cec_get_device_physical_address(cec_logical_address iLogicalAddress); | |
186 | #endif | |
187 | ||
b4b1b49b LOK |
188 | #ifdef __cplusplus |
189 | extern DECLSPEC CEC::cec_logical_address cec_get_active_source(void); | |
190 | #else | |
191 | extern DECLSPEC cec_logical_address cec_get_active_source(void); | |
192 | #endif | |
193 | ||
194 | #ifdef __cplusplus | |
195 | extern DECLSPEC int cec_is_active_source(CEC::cec_logical_address iAddress); | |
196 | #else | |
197 | extern DECLSPEC int cec_is_active_source(cec_logical_address iAddress); | |
198 | #endif | |
199 | ||
e55f3f70 LOK |
200 | #ifdef __cplusplus |
201 | extern DECLSPEC CEC::cec_power_status cec_get_device_power_status(CEC::cec_logical_address iLogicalAddress); | |
202 | #else | |
203 | extern DECLSPEC cec_power_status cec_get_device_power_status(cec_logical_address iLogicalAddress); | |
204 | #endif | |
205 | ||
57f45e6c LOK |
206 | #ifdef __cplusplus |
207 | extern DECLSPEC int cec_poll_device(CEC::cec_logical_address iLogicalAddress); | |
208 | #else | |
209 | extern DECLSPEC int cec_poll_device(cec_logical_address iLogicalAddress); | |
210 | #endif | |
211 | ||
6d858ba4 LOK |
212 | #ifdef __cplusplus |
213 | extern DECLSPEC CEC::cec_logical_addresses cec_get_active_devices(void); | |
214 | #else | |
215 | extern DECLSPEC cec_logical_addresses cec_get_active_devices(void); | |
216 | #endif | |
217 | ||
218 | #ifdef __cplusplus | |
219 | extern DECLSPEC int cec_is_active_device(CEC::cec_logical_address iAddress); | |
220 | #else | |
221 | extern DECLSPEC int cec_is_active_device(cec_logical_address iAddress); | |
222 | #endif | |
223 | ||
224 | #ifdef __cplusplus | |
225 | extern DECLSPEC int cec_is_active_device_type(CEC::cec_device_type type); | |
226 | #else | |
227 | extern DECLSPEC int cec_is_active_device_type(cec_device_type type); | |
228 | #endif | |
229 | ||
d2f1c157 LOK |
230 | #ifdef __cplusplus |
231 | extern DECLSPEC int cec_set_hdmi_port(CEC::cec_logical_address iBaseDevice, uint8_t iPort); | |
232 | #else | |
233 | extern DECLSPEC int cec_set_hdmi_port(cec_logical_address iBaseDevice, uint8_t iPort); | |
234 | #endif | |
16b1e052 | 235 | |
5c73f7f7 | 236 | extern DECLSPEC int cec_volume_up(int bSendRelease); |
04e637f9 | 237 | |
5c73f7f7 | 238 | extern DECLSPEC int cec_volume_down(int bSendRelease); |
a33794d8 | 239 | |
5c73f7f7 | 240 | extern DECLSPEC int cec_mute_audio(int bSendRelease); |
a33794d8 LOK |
241 | |
242 | #ifdef __cplusplus | |
243 | extern DECLSPEC int cec_send_keypress(CEC::cec_logical_address iDestination, CEC::cec_user_control_code key, int bWait); | |
244 | #else | |
245 | extern DECLSPEC int cec_send_keypress(cec_logical_address iDestination, cec_user_control_code key, int bWait); | |
246 | #endif | |
247 | ||
248 | #ifdef __cplusplus | |
249 | extern DECLSPEC int cec_send_key_release(CEC::cec_logical_address iDestination, int bWait); | |
250 | #else | |
251 | extern DECLSPEC int cec_send_key_release(cec_logical_address iDestination, int bWait); | |
252 | #endif | |
04e637f9 | 253 | |
ed21be2a | 254 | #ifdef __cplusplus |
f71a1df9 | 255 | extern DECLSPEC CEC::cec_osd_name cec_get_device_osd_name(CEC::cec_logical_address iAddress); |
ed21be2a | 256 | #else |
f71a1df9 | 257 | extern DECLSPEC cec_osd_name cec_get_device_osd_name(cec_logical_address iAddress); |
ed21be2a | 258 | #endif |
04e637f9 | 259 | |
2dbd78f8 LOK |
260 | extern DECLSPEC int cec_enable_physical_address_detection(void); |
261 | ||
abbca718 LOK |
262 | #ifdef __cplusplus |
263 | }; | |
264 | #endif | |
265 | ||
266 | #endif /* CECEXPORTS_C_H_ */ |