X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=c6082921bf1844c22b70f86f114f211bd3cf7c67;hb=a5a5f6f5437c662e7f8d8e52d32e5cddacc89784;hp=945935afc86d9946feb9ff36f1ebc039fc3efbf3;hpb=d3caa81bbff5c84e49cdc9c4c1de5d0b583eb45d;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 945935a..c608292 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -48,7 +48,7 @@ using namespace CEC; using namespace std; using namespace PLATFORM; -#define CEC_CONFIG_VERSION CEC_CLIENT_VERSION_2_0_3; +#define CEC_CONFIG_VERSION CEC_CLIENT_VERSION_CURRENT; #include "../../include/cecloader.h" @@ -285,6 +285,7 @@ void ShowHelpConsole(void) "[p] {device} {port} change the HDMI port number of the CEC adapter." << endl << "[pa] {physical address} change the physical address of the CEC adapter." << endl << "[as] make the CEC adapter the active source." << endl << + "[is] mark the CEC adapter as inactive source." << endl << "[osd] {addr} {string} set OSD message on the specified device." << endl << "[ver] {addr} get the CEC version of the specified device." << endl << "[ven] {addr} get the vendor ID of the specified device." << endl << @@ -381,6 +382,10 @@ bool ProcessCommandTX(ICECAdapter *parser, const string &command, string &argume cec_command bytes; bytes.Clear(); + CStdString strArguments(arguments); + strArguments.Replace(':', ' '); + arguments = strArguments; + while (GetWord(arguments, strvalue) && HexStrToInt(strvalue, ivalue)) bytes.PushBack(ivalue); @@ -555,6 +560,13 @@ bool ProcessCommandAS(ICECAdapter *parser, const string &command, string & UNUSE return false; } +bool ProcessCommandIS(ICECAdapter *parser, const string &command, string & UNUSED(arguments)) +{ + if (command == "is") + return parser->SetInactiveView(); + + return false; +} bool ProcessCommandPING(ICECAdapter *parser, const string &command, string & UNUSED(arguments)) { @@ -916,6 +928,7 @@ bool ProcessConsoleCommand(ICECAdapter *parser, string &input) ProcessCommandP(parser, command, input) || ProcessCommandPA(parser, command, input) || ProcessCommandAS(parser, command, input) || + ProcessCommandIS(parser, command, input) || ProcessCommandOSD(parser, command, input) || ProcessCommandPING(parser, command, input) || ProcessCommandVOLUP(parser, command, input) ||