X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=8178449cee36d7f805d7e4923b783ed404ec7852;hb=f00ff009cfc5dfefdf09ca241b9560e74575b3f5;hp=5858eb6689050a7b2f3f01ed5d471488e7d4f226;hpb=c3039d2e99a31c129c982d271f25c9c56e353643;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 5858eb6..8178449 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -38,12 +38,12 @@ #include #include #include -#include "../lib/platform/threads.h" -#include "../lib/util/StdString.h" +#include "../lib/platform/os.h" #include "../lib/implementations/CECCommandHandler.h" using namespace CEC; using namespace std; +using namespace PLATFORM; #define CEC_TEST_CLIENT_VERSION 1 @@ -62,7 +62,7 @@ ICECCallbacks g_callbacks; inline void PrintToStdOut(const char *strOut) { - CLockObject lock(&g_outputMutex); + CLockObject lock(g_outputMutex); cout << strOut << endl; } @@ -123,7 +123,7 @@ bool GetWord(string& data, string& word) return true; } -int CecLogMessage(const cec_log_message &message) +int CecLogMessage(void *UNUSED(cbParam), const cec_log_message &message) { if ((message.level & g_cecLogLevel) == message.level) { @@ -165,12 +165,12 @@ int CecLogMessage(const cec_log_message &message) return 0; } -int CecKeyPress(const cec_keypress &UNUSED(key)) +int CecKeyPress(void *UNUSED(cbParam), const cec_keypress &UNUSED(key)) { return 0; } -int CecCommand(const cec_command &UNUSED(command)) +int CecCommand(void *UNUSED(cbParam), const cec_command &UNUSED(command)) { return 0; } @@ -180,7 +180,7 @@ void EnableCallbacks(ICECAdapter *adapter) g_callbacks.CBCecLogMessage = &CecLogMessage; g_callbacks.CBCecKeyPress = &CecKeyPress; g_callbacks.CBCecCommand = &CecCommand; - adapter->EnableCallbacks(&g_callbacks); + adapter->EnableCallbacks(NULL, &g_callbacks); } void ListDevices(ICECAdapter *parser) @@ -207,7 +207,7 @@ void ListDevices(ICECAdapter *parser) void ShowHelpCommandLine(const char* strExec) { - CLockObject lock(&g_outputMutex); + CLockObject lock(g_outputMutex); cout << endl << strExec << " {-h|--help|-l|--list-devices|[COM PORT]}" << endl << endl << @@ -254,7 +254,7 @@ ICECAdapter *CreateParser(cec_device_type_list typeList) void ShowHelpConsole(void) { - CLockObject lock(&g_outputMutex); + CLockObject lock(g_outputMutex); cout << endl << "================================================================================" << endl << "Available commands:" << endl <<