repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: split up CEC processing and the public interface. removed obsolete methods from...
[deb_libcec.git]
/
src
/
testclient
/
main.cpp
diff --git
a/src/testclient/main.cpp
b/src/testclient/main.cpp
index 458c73404b4750062329526ec6cf3582e74975b6..90158edbec031ac5fb0ef0dc4fefe28d9b27e4eb 100644
(file)
--- a/
src/testclient/main.cpp
+++ b/
src/testclient/main.cpp
@@
-44,7
+44,7
@@
using namespace std;
#define CEC_TEST_CLIENT_VERSION 3
#define CEC_TEST_CLIENT_VERSION 3
-void flush_log(ICEC
Device
*cecParser)
+void flush_log(ICEC
Adapter
*cecParser)
{
cec_log_message message;
while (cecParser && cecParser->GetNextLogMessage(&message))
{
cec_log_message message;
while (cecParser && cecParser->GetNextLogMessage(&message))
@@
-67,11
+67,11
@@
void flush_log(ICECDevice *cecParser)
}
}
}
}
-void list_devices(ICEC
Device
*parser)
+void list_devices(ICEC
Adapter
*parser)
{
cout << "Found devices: ";
{
cout << "Found devices: ";
- vector<cec_
device
> devices;
- int iDevicesFound = parser->Find
Device
s(devices);
+ vector<cec_
adapter
> devices;
+ int iDevicesFound = parser->Find
Adapter
s(devices);
if (iDevicesFound <= 0)
{
#ifdef __WINDOWS__
if (iDevicesFound <= 0)
{
#ifdef __WINDOWS__
@@
-114,9
+114,6
@@
void show_console_help(void)
"tx {bytes} transfer bytes over the CEC line." << endl <<
"[tx 40 00 FF 11 22 33] sends bytes 0x40 0x00 0xFF 0x11 0x22 0x33" << endl <<
endl <<
"tx {bytes} transfer bytes over the CEC line." << endl <<
"[tx 40 00 FF 11 22 33] sends bytes 0x40 0x00 0xFF 0x11 0x22 0x33" << endl <<
endl <<
- "am {ackmack} change the ackmask of the CEC adapter." << endl <<
- "[am 10] ackmask 0x10 (logical address 4)" << endl <<
- endl <<
"la {logical_address} change the logical address of the CEC adapter." << endl <<
"[la 4] logical address 4" << endl <<
endl <<
"la {logical_address} change the logical address of the CEC adapter." << endl <<
"[la 4] logical address 4" << endl <<
endl <<
@@
-129,7
+126,7
@@
void show_console_help(void)
int main (int argc, char *argv[])
{
int main (int argc, char *argv[])
{
- ICEC
Device
*parser = LoadLibCec("CEC Tester");
+ ICEC
Adapter
*parser = LoadLibCec("CEC Tester");
if (!parser && parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION)
{
cout << "Unable to create parser. Is libcec.dll present?" << endl;
if (!parser && parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION)
{
cout << "Unable to create parser. Is libcec.dll present?" << endl;
@@
-150,8
+147,8
@@
int main (int argc, char *argv[])
if (argc < 2)
{
cout << "no serial port given. trying autodetect: ";
if (argc < 2)
{
cout << "no serial port given. trying autodetect: ";
- vector<cec_
device
> devices;
- int iDevicesFound = parser->Find
Device
s(devices);
+ vector<cec_
adapter
> devices;
+ int iDevicesFound = parser->Find
Adapter
s(devices);
if (iDevicesFound <= 0)
{
cout << "FAILED" << endl;
if (iDevicesFound <= 0)
{
cout << "FAILED" << endl;
@@
-223,15
+220,6
@@
int main (int argc, char *argv[])
parser->Transmit(bytes);
}
parser->Transmit(bytes);
}
- else if (command == "am")
- {
- string strvalue;
- int ackmask;
- if (GetWord(input, strvalue) && HexStrToInt(strvalue, ackmask))
- {
- parser->SetAckMask(ackmask);
- }
- }
else if (command == "la")
{
string strvalue;
else if (command == "la")
{
string strvalue;
@@
-242,7
+230,7
@@
int main (int argc, char *argv[])
}
else if (command == "ping")
{
}
else if (command == "ping")
{
- parser->Ping();
+ parser->Ping
Adapter
();
}
else if (command == "bl")
{
}
else if (command == "bl")
{
@@
-263,7
+251,7
@@
int main (int argc, char *argv[])
CCondition::Sleep(50);
}
CCondition::Sleep(50);
}
- parser->
PowerOff
Devices(CECDEVICE_BROADCAST);
+ parser->
Standby
Devices(CECDEVICE_BROADCAST);
parser->Close();
flush_log(parser);
UnloadLibCec(parser);
parser->Close();
flush_log(parser);
UnloadLibCec(parser);