cec: set lib interface version back to 1.0 and rename GetLibVersion() to GetLibVersio...
[deb_libcec.git] / src / testclient / main.cpp
index 33cbd88e2cec3ebec16cf97394061723a40ea14a..8efffedc4165c47fa01c7d57a747a76cdad765ad 100644 (file)
@@ -44,7 +44,7 @@
 using namespace CEC;
 using namespace std;
 
-#define CEC_TEST_CLIENT_VERSION 8
+#define CEC_TEST_CLIENT_VERSION 1
 
 #include <cecloader.h>
 
@@ -200,7 +200,7 @@ void show_console_help(void)
   "Available commands:" << endl <<
   endl <<
   "tx {bytes}                transfer bytes over the CEC line." << endl <<
-  "txn {bytes}               transfer bytes and don't wait for an ACK reply." << endl <<
+  "txn {bytes}               transfer bytes but don't wait for transmission ACK." << endl <<
   "[tx 40 00 FF 11 22 33]    sends bytes 0x40 0x00 0xFF 0x11 0x22 0x33" << endl <<
   endl <<
   "on {address}              power on the device with the given logical address." << endl <<
@@ -245,7 +245,7 @@ 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->GetMinLibVersion() > CEC_TEST_CLIENT_VERSION)
   {
 #ifdef __WINDOWS__
     cout << "Cannot load libcec.dll" << endl;
@@ -255,7 +255,7 @@ int main (int argc, char *argv[])
     return 1;
   }
   CStdString strLog;
-  strLog.Format("CEC Parser created - libcec version %d", parser->GetLibVersion());
+  strLog.Format("CEC Parser created - libcec version %d.%d", parser->GetLibVersionMajor(), parser->GetLibVersionMinor());
   cout << strLog.c_str() << endl;
 
   //make stdin non-blocking
@@ -421,7 +421,7 @@ int main (int argc, char *argv[])
             bytes.push_back(ivalue);
 
           if (command == "txn")
-            bytes.ack_timeout = 0;
+            bytes.transmit_timeout = 0;
 
           parser->Transmit(bytes);
         }