From: Paul Grove Date: Sat, 26 Nov 2011 14:23:20 +0000 (+0000) Subject: Missing C Functions X-Git-Tag: upstream/2.2.0~1^2~44^2~66^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f2cdbc3683e19fa58e5311e4020c0420901cfed5;p=deb_libcec.git Missing C Functions --- diff --git a/include/cecc.h b/include/cecc.h index c7e5ad4..640a609 100644 --- a/include/cecc.h +++ b/include/cecc.h @@ -95,8 +95,26 @@ extern DECLSPEC int cec_set_active_source(CEC::cec_device_type type); extern DECLSPEC int cec_set_active_source(cec_device_type type); #endif +#ifdef __cplusplus +extern DECLSPEC int cec_set_deck_control_mode(CEC::cec_deck_control_mode mode, int bSendUpdate); +#else +extern DECLSPEC int cec_set_deck_control_mode(cec_deck_control_mode mode, int bSendUpdate); +#endif + +#ifdef __cplusplus +extern DECLSPEC int cec_set_deck_info(CEC::cec_deck_info info, int bSendUpdate); +#else +extern DECLSPEC int cec_set_deck_info(cec_deck_info info, int bSendUpdate); +#endif + extern DECLSPEC int cec_set_inactive_view(void); +#ifdef __cplusplus +extern DECLSPEC int cec_set_menu_state(CEC::cec_menu_state state, int bSendUpdate); +#else +extern DECLSPEC int cec_set_menu_state(cec_menu_state state, int bSendUpdate); +#endif + #ifdef __cplusplus extern DECLSPEC int cec_get_next_log_message(CEC::cec_log_message *message); #else diff --git a/src/lib/LibCECC.cpp b/src/lib/LibCECC.cpp index 08e6987..a637a83 100644 --- a/src/lib/LibCECC.cpp +++ b/src/lib/LibCECC.cpp @@ -186,6 +186,19 @@ int cec_set_active_source(cec_device_type type) return -1; } +int cec_set_deck_control_mode(cec_deck_control_mode mode, int bSendUpdate) { + if (cec_parser) + return cec_parser->SetDeckControlMode(mode, bSendUpdate == 1) ? 1 : 0; + return -1; +} + +int cec_set_deck_info(cec_deck_info info, int bSendUpdate) { + if (cec_parser) + return cec_parser->SetDeckInfo(info, bSendUpdate == 1) ? 1 : 0; + return -1; + +} + int cec_set_inactive_view(void) { if (cec_parser) @@ -193,6 +206,12 @@ int cec_set_inactive_view(void) return -1; } +int cec_set_menu_state(cec_menu_state state, int bSendUpdate) { + if (cec_parser) + return cec_parser->SetMenuState(state, bSendUpdate == 1) ? 1 : 0; + return -1; +} + int cec_set_osd_string(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage) { if (cec_parser)