Merge branch 'master' into release
[deb_libcec.git] / include / cecc.h
CommitLineData
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
40extern "C" {
41#endif
42
f8513317 43#ifdef __cplusplus
3efda01a 44extern DECLSPEC int cec_initialise(CEC::libcec_configuration *configuration);
f8513317 45#else
3efda01a 46extern DECLSPEC int cec_initialise(libcec_configuration *configuration);
caca2d81
LOK
47#endif
48
5f39c4d8
LOK
49extern DECLSPEC void cec_destroy(void);
50
02ee2c68 51extern DECLSPEC int cec_open(const char *strPort, uint32_t iTimeout);
abbca718 52
5f39c4d8 53extern DECLSPEC void cec_close(void);
f99bc831 54
fa4798bd 55#ifdef __cplusplus
547b390d 56extern DECLSPEC int cec_enable_callbacks(void *cbParam, CEC::ICECCallbacks *callbacks);
fa4798bd 57#else
547b390d 58extern DECLSPEC int cec_enable_callbacks(void *cbParam, ICECCallbacks *callbacks);
fa4798bd
LOK
59#endif
60
2abe74eb 61#ifdef __cplusplus
f958766e 62extern DECLSPEC int8_t cec_find_adapters(CEC::cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath);
2abe74eb 63#else
f958766e 64extern DECLSPEC int8_t cec_find_adapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath);
2abe74eb
LOK
65#endif
66
02ee2c68 67extern DECLSPEC int cec_ping_adapters(void);
abbca718 68
02ee2c68 69extern DECLSPEC int cec_start_bootloader(void);
abbca718 70
abbca718 71#ifdef __cplusplus
f958766e 72extern DECLSPEC int cec_power_on_devices(CEC::cec_logical_address address);
abbca718 73#else
f958766e 74extern DECLSPEC int cec_power_on_devices(cec_logical_address address);
abbca718
LOK
75#endif
76
abbca718 77#ifdef __cplusplus
f958766e 78extern DECLSPEC int cec_standby_devices(CEC::cec_logical_address address);
abbca718 79#else
f958766e 80extern DECLSPEC int cec_standby_devices(cec_logical_address address);
abbca718
LOK
81#endif
82
18203d17 83#ifdef __cplusplus
f958766e 84extern DECLSPEC int cec_set_active_source(CEC::cec_device_type type);
18203d17 85#else
f958766e 86extern DECLSPEC int cec_set_active_source(cec_device_type type);
18203d17
LOK
87#endif
88
f2cdbc36
PG
89#ifdef __cplusplus
90extern DECLSPEC int cec_set_deck_control_mode(CEC::cec_deck_control_mode mode, int bSendUpdate);
91#else
92extern DECLSPEC int cec_set_deck_control_mode(cec_deck_control_mode mode, int bSendUpdate);
93#endif
94
95#ifdef __cplusplus
96extern DECLSPEC int cec_set_deck_info(CEC::cec_deck_info info, int bSendUpdate);
97#else
98extern DECLSPEC int cec_set_deck_info(cec_deck_info info, int bSendUpdate);
99#endif
100
02ee2c68 101extern DECLSPEC int cec_set_inactive_view(void);
abbca718 102
f2cdbc36
PG
103#ifdef __cplusplus
104extern DECLSPEC int cec_set_menu_state(CEC::cec_menu_state state, int bSendUpdate);
105#else
106extern DECLSPEC int cec_set_menu_state(cec_menu_state state, int bSendUpdate);
107#endif
108
abbca718 109#ifdef __cplusplus
f958766e 110extern DECLSPEC int cec_transmit(const CEC::cec_command *data);
abbca718 111#else
f958766e 112extern DECLSPEC int cec_transmit(const cec_command *data);
abbca718
LOK
113#endif
114
6dfe9213 115#ifdef __cplusplus
f958766e 116extern DECLSPEC int cec_set_logical_address(CEC::cec_logical_address iLogicalAddress);
6dfe9213 117#else
f958766e 118extern DECLSPEC int cec_set_logical_address(cec_logical_address iLogicalAddress);
6dfe9213
LOK
119#endif
120
f958766e 121extern DECLSPEC int cec_set_physical_address(uint16_t iPhysicalAddress);
2492216a 122
1969b140
LOK
123#ifdef __cplusplus
124extern DECLSPEC int cec_set_osd_string(CEC::cec_logical_address iLogicalAddress, CEC::cec_display_control duration, const char *strMessage);
125#else
126extern DECLSPEC int cec_set_osd_string(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage);
127#endif
128
8b7e5ff6
LOK
129extern DECLSPEC int cec_switch_monitoring(int bEnable);
130
6a1c0009
LOK
131#ifdef __cplusplus
132extern DECLSPEC CEC::cec_version cec_get_device_cec_version(CEC::cec_logical_address iLogicalAddress);
133#else
134extern DECLSPEC cec_version cec_get_device_cec_version(cec_logical_address iLogicalAddress);
135#endif
136
a3269a0a
LOK
137#ifdef __cplusplus
138extern DECLSPEC int cec_get_device_menu_language(CEC::cec_logical_address iLogicalAddress, CEC::cec_menu_language *language);
139#else
44c74256 140extern DECLSPEC int cec_get_device_menu_language(cec_logical_address iLogicalAddress, cec_menu_language *language);
a3269a0a 141#endif
44c74256 142
44c74256
LOK
143#ifdef __cplusplus
144extern DECLSPEC uint64_t cec_get_device_vendor_id(CEC::cec_logical_address iLogicalAddress);
145#else
146extern DECLSPEC uint64_t cec_get_device_vendor_id(cec_logical_address iLogicalAddress);
147#endif
148
eab72c40
LOK
149#ifdef __cplusplus
150extern DECLSPEC uint16_t cec_get_device_physical_address(CEC::cec_logical_address iLogicalAddress);
151#else
152extern DECLSPEC uint16_t cec_get_device_physical_address(cec_logical_address iLogicalAddress);
153#endif
154
b4b1b49b
LOK
155#ifdef __cplusplus
156extern DECLSPEC CEC::cec_logical_address cec_get_active_source(void);
157#else
158extern DECLSPEC cec_logical_address cec_get_active_source(void);
159#endif
160
161#ifdef __cplusplus
162extern DECLSPEC int cec_is_active_source(CEC::cec_logical_address iAddress);
163#else
164extern DECLSPEC int cec_is_active_source(cec_logical_address iAddress);
165#endif
166
e55f3f70
LOK
167#ifdef __cplusplus
168extern DECLSPEC CEC::cec_power_status cec_get_device_power_status(CEC::cec_logical_address iLogicalAddress);
169#else
170extern DECLSPEC cec_power_status cec_get_device_power_status(cec_logical_address iLogicalAddress);
171#endif
172
57f45e6c
LOK
173#ifdef __cplusplus
174extern DECLSPEC int cec_poll_device(CEC::cec_logical_address iLogicalAddress);
175#else
176extern DECLSPEC int cec_poll_device(cec_logical_address iLogicalAddress);
177#endif
178
6d858ba4
LOK
179#ifdef __cplusplus
180extern DECLSPEC CEC::cec_logical_addresses cec_get_active_devices(void);
181#else
182extern DECLSPEC cec_logical_addresses cec_get_active_devices(void);
183#endif
184
185#ifdef __cplusplus
186extern DECLSPEC int cec_is_active_device(CEC::cec_logical_address iAddress);
187#else
188extern DECLSPEC int cec_is_active_device(cec_logical_address iAddress);
189#endif
190
191#ifdef __cplusplus
192extern DECLSPEC int cec_is_active_device_type(CEC::cec_device_type type);
193#else
194extern DECLSPEC int cec_is_active_device_type(cec_device_type type);
195#endif
196
d2f1c157
LOK
197#ifdef __cplusplus
198extern DECLSPEC int cec_set_hdmi_port(CEC::cec_logical_address iBaseDevice, uint8_t iPort);
199#else
200extern DECLSPEC int cec_set_hdmi_port(cec_logical_address iBaseDevice, uint8_t iPort);
201#endif
16b1e052 202
5c73f7f7 203extern DECLSPEC int cec_volume_up(int bSendRelease);
04e637f9 204
5c73f7f7 205extern DECLSPEC int cec_volume_down(int bSendRelease);
a33794d8 206
5c73f7f7 207extern DECLSPEC int cec_mute_audio(int bSendRelease);
a33794d8
LOK
208
209#ifdef __cplusplus
210extern DECLSPEC int cec_send_keypress(CEC::cec_logical_address iDestination, CEC::cec_user_control_code key, int bWait);
211#else
212extern DECLSPEC int cec_send_keypress(cec_logical_address iDestination, cec_user_control_code key, int bWait);
213#endif
214
215#ifdef __cplusplus
216extern DECLSPEC int cec_send_key_release(CEC::cec_logical_address iDestination, int bWait);
217#else
218extern DECLSPEC int cec_send_key_release(cec_logical_address iDestination, int bWait);
219#endif
04e637f9 220
ed21be2a 221#ifdef __cplusplus
f71a1df9 222extern DECLSPEC CEC::cec_osd_name cec_get_device_osd_name(CEC::cec_logical_address iAddress);
ed21be2a 223#else
f71a1df9 224extern DECLSPEC cec_osd_name cec_get_device_osd_name(cec_logical_address iAddress);
ed21be2a 225#endif
04e637f9 226
f42d3e0f
LOK
227#ifdef __cplusplus
228extern DECLSPEC int cec_set_stream_path_logical(CEC::cec_logical_address iAddress);
229#else
230extern DECLSPEC int cec_set_stream_path_logical(cec_logical_address iAddress);
231#endif
232
233extern DECLSPEC int cec_set_stream_path_physical(uint16_t iPhysicalAddress);
234
80b72250
LOK
235#ifdef __cplusplus
236extern DECLSPEC CEC::cec_logical_addresses cec_get_logical_addresses(void);
237#else
238extern DECLSPEC cec_logical_addresses cec_get_logical_addresses(void);
239#endif
240
d40928b5
LOK
241#ifdef __cplusplus
242extern DECLSPEC int cec_get_current_configuration(CEC::libcec_configuration *configuration);
243#else
244extern DECLSPEC int cec_get_current_configuration(libcec_configuration *configuration);
245#endif
246
224ea877
LOK
247extern DECLSPEC int cec_can_persist_configuration(void);
248
249#ifdef __cplusplus
30b4aac0 250extern DECLSPEC int cec_persist_configuration(CEC::libcec_configuration *configuration);
224ea877 251#else
30b4aac0
LOK
252extern DECLSPEC int cec_persist_configuration(libcec_configuration *configuration);
253#endif
254
255#ifdef __cplusplus
256extern DECLSPEC int cec_set_configuration(const CEC::libcec_configuration *configuration);
257#else
258extern DECLSPEC int cec_set_configuration(const libcec_configuration *configuration);
224ea877 259#endif
d40928b5 260
3efda01a
LOK
261extern DECLSPEC void cec_rescan_devices(void);
262
c9549d35
LOK
263extern DECLSPEC int cec_is_libcec_active_source(void);
264
bd624ba8
LOK
265#ifdef __cplusplus
266extern DECLSPEC int cec_get_device_information(const char *strPort, CEC::libcec_configuration *config, uint32_t iTimeoutMs);
267#else
268extern DECLSPEC int cec_get_device_information(const char *strPort, libcec_configuration *config, uint32_t iTimeoutMs);
269#endif
270
2b44051c
LOK
271extern DECLSPEC const char * cec_get_lib_info(void);
272
273extern DECLSPEC void cec_init_video_standalone(void);
274
8768aeca
LOK
275extern DECLSPEC uint16_t cec_get_adapter_vendor_id(void);
276
277extern DECLSPEC uint16_t cec_get_adapter_product_id(void);
278
6d2bc8de
LOK
279extern DECLSPEC uint8_t cec_audio_toggle_mute(void);
280
281extern DECLSPEC uint8_t cec_audio_mute(void);
282
283extern DECLSPEC uint8_t cec_audio_unmute(void);
284
285extern DECLSPEC uint8_t cec_audio_status(void);
286
abbca718
LOK
287#ifdef __cplusplus
288};
289#endif
290
291#endif /* CECEXPORTS_C_H_ */