X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=817d26797cf7c139cf2977d611083574fadb3b7a;hb=a75a882fccb18fcf74d8df3a9306eb78cfeca619;hp=52a5af462b2becc356ca4ca5541e138c4e7bb711;hpb=88f45c9b0ef4f03bf78ad3abc8996c0dcc95010b;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 52a5af4..817d267 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -30,20 +30,22 @@ * http://www.pulse-eight.net/ */ -#include "../../include/CECExports.h" -#include "../lib/platform/threads.h" -#include "../lib/util/StdString.h" +#include + #include #include #include #include #include +#include "../lib/platform/threads.h" +#include "../lib/util/StdString.h" using namespace CEC; using namespace std; -#define CEC_TEST_CLIENT_VERSION 5 +#define CEC_TEST_CLIENT_VERSION 7 +#include inline bool HexStrToInt(const std::string& data, uint8_t& value) { @@ -190,9 +192,13 @@ void show_console_help(void) int main (int argc, char *argv[]) { ICECAdapter *parser = LoadLibCec("CECTester"); - if (!parser && parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION) + if (!parser || parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION) { - cout << "Unable to create parser. Is libcec.dll present?" << endl; +#ifdef __WINDOWS__ + cout << "Cannot load libcec.dll" << endl; +#else + cout << "Cannot load libcec.so" << endl; +#endif return 1; } CStdString strLog; @@ -276,7 +282,7 @@ int main (int argc, char *argv[]) { string strvalue; uint8_t ivalue; - cec_frame bytes; + cec_command bytes; bytes.clear(); while (GetWord(input, strvalue) && HexStrToInt(strvalue, ivalue))