-void EnableCallbacks(ICECAdapter *adapter)
-{
- g_callbacks.CBCecLogMessage = &CecLogMessage;
- g_callbacks.CBCecKeyPress = &CecKeyPress;
- g_callbacks.CBCecCommand = &CecCommand;
- adapter->EnableCallbacks(NULL, &g_callbacks);
-}
-
-ICECAdapter *CreateParser(cec_device_type_list typeList)
-{
- ICECAdapter *parser = LibCecInit("ButtonConfig", typeList);
- if (!parser)
- {
- #ifdef __WINDOWS__
- PrintToStdOut("Cannot load libcec.dll");
- #else
- PrintToStdOut("Cannot load libcec.so");
- #endif
- return NULL;
- }
-
- PrintToStdOut("CEC Parser created - libcec version %d.%d", parser->GetLibVersionMajor(), parser->GetLibVersionMinor());
-
- return parser;
-}
-