cec: don't use shared_ptr when not needed in CCECProcessor
[deb_libcec.git] / src / lib / CECProcessor.cpp
CommitLineData
abbca718
LOK
1/*
2 * This file is part of the libCEC(R) library.
3 *
4 * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved.
5 * libCEC(R) is an original work, containing original code.
6 *
7 * libCEC(R) is a trademark of Pulse-Eight Limited.
8 *
9 * This program is dual-licensed; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 *
23 *
24 * Alternatively, you can license this library under a commercial license,
25 * please contact Pulse-Eight Licensing for more information.
26 *
27 * For more information contact:
28 * Pulse-Eight Licensing <license@pulse-eight.com>
29 * http://www.pulse-eight.com/
30 * http://www.pulse-eight.net/
31 */
32
2abe74eb 33#include "CECProcessor.h"
abbca718 34
2abe74eb 35#include "AdapterCommunication.h"
eafa9d46 36#include "devices/CECBusDevice.h"
2abe74eb 37#include "LibCEC.h"
abbca718 38#include "util/StdString.h"
b9187cc6 39#include "platform/timeutils.h"
abbca718
LOK
40
41using namespace CEC;
42using namespace std;
43
2b4d8297 44CCECProcessor::CCECProcessor(CLibCEC *controller, CAdapterCommunication *serComm, const char *strDeviceName, cec_logical_address iLogicalAddress /* = CECDEVICE_PLAYBACKDEVICE1 */, uint16_t iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS*/) :
179efe86 45 m_iLogicalAddress(iLogicalAddress),
2abe74eb
LOK
46 m_strDeviceName(strDeviceName),
47 m_communication(serComm),
8b7e5ff6 48 m_controller(controller),
179efe86
LOK
49 m_bMonitor(false),
50 m_bLogicalAddressSet(false)
abbca718 51{
7ea0d558 52 for (int iPtr = 0; iPtr < 16; iPtr++)
09c10b66 53 m_busDevices[iPtr] = new CCECBusDevice(this, (cec_logical_address) iPtr, iPtr == iLogicalAddress ? iPhysicalAddress : 0);
abbca718
LOK
54}
55
2abe74eb 56CCECProcessor::~CCECProcessor(void)
abbca718 57{
8b0ee2cc 58 m_startCondition.Broadcast();
2abe74eb
LOK
59 StopThread();
60 m_communication = NULL;
61 m_controller = NULL;
d1998c7b
LOK
62 for (unsigned int iPtr = 0; iPtr < 16; iPtr++)
63 delete m_busDevices[iPtr];
abbca718
LOK
64}
65
2abe74eb 66bool CCECProcessor::Start(void)
abbca718 67{
8b0ee2cc 68 CLockObject lock(&m_mutex);
2abe74eb 69 if (!m_communication || !m_communication->IsOpen())
13fd6a66
LOK
70 {
71 m_controller->AddLog(CEC_LOG_ERROR, "connection is closed");
a8f0bd18 72 return false;
13fd6a66 73 }
abbca718 74
a8f0bd18 75 if (!SetLogicalAddress(m_iLogicalAddress))
abbca718 76 {
2abe74eb 77 m_controller->AddLog(CEC_LOG_ERROR, "could not set the logical address");
a8f0bd18 78 return false;
abbca718
LOK
79 }
80
60fa4578 81 if (CreateThread())
8b0ee2cc
LOK
82 {
83 if (!m_startCondition.Wait(&m_mutex))
84 {
85 m_controller->AddLog(CEC_LOG_ERROR, "could not create a processor thread");
86 return false;
87 }
a8f0bd18 88 return true;
8b0ee2cc 89 }
a8f0bd18 90 else
2abe74eb 91 m_controller->AddLog(CEC_LOG_ERROR, "could not create a processor thread");
abbca718 92
a8f0bd18 93 return false;
abbca718
LOK
94}
95
2abe74eb 96void *CCECProcessor::Process(void)
f99bc831 97{
8b0ee2cc
LOK
98 {
99 CLockObject lock(&m_mutex);
100 m_controller->AddLog(CEC_LOG_DEBUG, "processor thread started");
101 m_startCondition.Signal();
102 }
abbca718 103
271e7778
LOK
104 cec_command command;
105 CCECAdapterMessage msg;
9dee1670 106
b9eea66d
LOK
107 m_communication->SetAckMask(0x1 << (uint8_t)m_iLogicalAddress);
108
13fd6a66 109 while (!IsStopped())
abbca718 110 {
60fa4578 111 bool bParseFrame(false);
9dee1670 112 command.clear();
76321de4
LOK
113 msg.clear();
114
60fa4578
LOK
115 {
116 CLockObject lock(&m_mutex);
0e7b6c54 117 CCECAdapterMessagePtr msgPtr;
271e7778 118 if (m_frameBuffer.Pop(msgPtr))
0e7b6c54 119 bParseFrame = ParseMessage(*msgPtr.get());
271e7778 120 else if (m_communication->IsOpen() && m_communication->Read(msg, 50))
0e7b6c54 121 bParseFrame = ParseMessage(msg);
76321de4 122
78e8010a 123 bParseFrame &= !IsStopped();
76321de4 124 if (bParseFrame)
9dee1670 125 command = m_currentframe;
60fa4578
LOK
126 }
127
13fd6a66 128 if (bParseFrame)
9dee1670 129 ParseCommand(command);
abbca718 130
13fd6a66
LOK
131 m_controller->CheckKeypressTimeout();
132
0ab58650
LOK
133 for (unsigned int iDevicePtr = 0; iDevicePtr < 16; iDevicePtr++)
134 m_busDevices[iDevicePtr]->PollVendorId();
135
13fd6a66 136 if (!IsStopped())
d5bffd3c 137 Sleep(5);
abbca718
LOK
138 }
139
60fa4578 140 return NULL;
abbca718
LOK
141}
142
2abe74eb 143bool CCECProcessor::SetActiveView(void)
abbca718 144{
60fa4578 145 if (!IsRunning())
f99bc831
LOK
146 return false;
147
cc60ab1c
LOK
148 if (m_iLogicalAddress != CECDEVICE_UNKNOWN && m_busDevices[m_iLogicalAddress])
149 return m_busDevices[m_iLogicalAddress]->BroadcastActiveView();
150 return false;
abbca718
LOK
151}
152
2abe74eb 153bool CCECProcessor::SetInactiveView(void)
abbca718 154{
60fa4578 155 if (!IsRunning())
f99bc831
LOK
156 return false;
157
cc60ab1c
LOK
158 if (m_iLogicalAddress != CECDEVICE_UNKNOWN && m_busDevices[m_iLogicalAddress])
159 return m_busDevices[m_iLogicalAddress]->BroadcastInactiveView();
160 return false;
abbca718
LOK
161}
162
9dee1670 163void CCECProcessor::LogOutput(const cec_command &data)
abbca718 164{
1d3ca3de
LOK
165 CStdString strTx;
166 strTx.Format("<< %02x:%02x", ((uint8_t)data.initiator << 4) + (uint8_t)data.destination, (uint8_t)data.opcode);
9dee1670 167
06a1f7ce 168 for (uint8_t iPtr = 0; iPtr < data.parameters.size; iPtr++)
1d3ca3de
LOK
169 strTx.AppendFormat(":%02x", data.parameters[iPtr]);
170 m_controller->AddLog(CEC_LOG_TRAFFIC, strTx.c_str());
9dee1670 171}
2abe74eb 172
179efe86 173bool CCECProcessor::SetLogicalAddress(cec_logical_address iLogicalAddress /* = CECDEVICE_UNKNOWN */)
abbca718 174{
179efe86 175 if (iLogicalAddress != CECDEVICE_UNKNOWN)
06775107
LOK
176 {
177 CStdString strLog;
178 strLog.Format("<< setting logical address to %1x", iLogicalAddress);
179 m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
06775107 180 m_iLogicalAddress = iLogicalAddress;
179efe86 181 m_bLogicalAddressSet = false;
06775107 182 }
2abe74eb 183
179efe86
LOK
184 if (!m_bLogicalAddressSet && m_iLogicalAddress != CECDEVICE_UNKNOWN)
185 m_bLogicalAddressSet = m_communication && m_communication->SetAckMask(0x1 << (uint8_t)m_iLogicalAddress);
186
187 return m_bLogicalAddressSet;
abbca718 188}
825ddb96 189
2492216a
LOK
190bool CCECProcessor::SetPhysicalAddress(uint16_t iPhysicalAddress)
191{
cc60ab1c
LOK
192 if (m_iLogicalAddress != CECDEVICE_UNKNOWN && m_busDevices[m_iLogicalAddress])
193 {
194 m_busDevices[m_iLogicalAddress]->SetPhysicalAddress(iPhysicalAddress);
195 return m_busDevices[m_iLogicalAddress]->BroadcastActiveView();
196 }
197 return false;
1969b140
LOK
198}
199
8b7e5ff6
LOK
200bool CCECProcessor::SwitchMonitoring(bool bEnable)
201{
202 CStdString strLog;
203 strLog.Format("== %s monitoring mode ==", bEnable ? "enabling" : "disabling");
204 m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
205
206 m_bMonitor = bEnable;
207 if (bEnable)
208 return m_communication && m_communication->SetAckMask(0);
209 else
210 return m_communication && m_communication->SetAckMask(0x1 << (uint8_t)m_iLogicalAddress);
211}
212
6a1c0009
LOK
213cec_version CCECProcessor::GetDeviceCecVersion(cec_logical_address iAddress)
214{
215 return m_busDevices[iAddress]->GetCecVersion();
216}
217
a3269a0a
LOK
218bool CCECProcessor::GetDeviceMenuLanguage(cec_logical_address iAddress, cec_menu_language *language)
219{
cc60ab1c
LOK
220 if (m_busDevices[iAddress])
221 {
222 *language = m_busDevices[iAddress]->GetMenuLanguage();
223 return (strcmp(language->language, "???") == 0);
224 }
225 return false;
a3269a0a
LOK
226}
227
44c74256
LOK
228uint64_t CCECProcessor::GetDeviceVendorId(cec_logical_address iAddress)
229{
cc60ab1c
LOK
230 if (m_busDevices[iAddress])
231 return m_busDevices[iAddress]->GetVendorId();
232 return false;
44c74256
LOK
233}
234
e55f3f70
LOK
235cec_power_status CCECProcessor::GetDevicePowerStatus(cec_logical_address iAddress)
236{
cc60ab1c
LOK
237 if (m_busDevices[iAddress])
238 return m_busDevices[iAddress]->GetPowerStatus();
239 return CEC_POWER_STATUS_UNKNOWN;
e55f3f70
LOK
240}
241
8d84e2c0 242bool CCECProcessor::Transmit(const cec_command &data)
825ddb96 243{
179efe86
LOK
244 SetLogicalAddress();
245
7ea0d558 246 bool bReturn(false);
13929cff
LOK
247 LogOutput(data);
248
5a1e87c8 249 CCECAdapterMessagePtr output(new CCECAdapterMessage(data));
13929cff 250
2abe74eb 251 CLockObject lock(&m_mutex);
eb35e4ca
LOK
252 {
253 CLockObject msgLock(&output->mutex);
254 if (!m_communication || !m_communication->Write(output))
255 return bReturn;
256 else
0e31a62c 257 {
e4613795 258 output->condition.Wait(&output->mutex, 1000);
0e31a62c
LOK
259 if (output->state != ADAPTER_MESSAGE_STATE_SENT)
260 {
261 m_controller->AddLog(CEC_LOG_ERROR, "command was not sent");
262 return bReturn;
263 }
264 }
2abe74eb 265
cd505625
LOK
266 if (data.ack_timeout > 0)
267 {
268 bool bError(false);
269 if ((bReturn = WaitForAck(&bError, output->size(), data.ack_timeout)) == false)
270 m_controller->AddLog(CEC_LOG_ERROR, "did not receive ack");
271 }
272 else
273 {
274 bReturn = true;
275 }
2abe74eb
LOK
276 }
277
7ea0d558 278 return bReturn;
825ddb96 279}
abbca718 280
2abe74eb 281void CCECProcessor::TransmitAbort(cec_logical_address address, cec_opcode opcode, ECecAbortReason reason /* = CEC_ABORT_REASON_UNRECOGNIZED_OPCODE */)
abbca718 282{
9dee1670
LOK
283 m_controller->AddLog(CEC_LOG_DEBUG, "<< transmitting abort message");
284
06a1f7ce
LOK
285 cec_command command;
286 cec_command::format(command, m_iLogicalAddress, address, CEC_OPCODE_FEATURE_ABORT);
9dee1670
LOK
287 command.parameters.push_back((uint8_t)opcode);
288 command.parameters.push_back((uint8_t)reason);
289
290 Transmit(command);
abbca718
LOK
291}
292
7ea0d558 293bool CCECProcessor::WaitForAck(bool *bError, uint8_t iLength, uint32_t iTimeout /* = 1000 */)
abbca718 294{
7ea0d558
LOK
295 bool bTransmitSucceeded = false;
296 uint8_t iPacketsLeft(iLength / 4);
050df0f9 297 *bError = false;
abbca718
LOK
298
299 int64_t iNow = GetTimeMs();
25701fa6 300 int64_t iTargetTime = iNow + (uint64_t) iTimeout;
abbca718 301
78e8010a 302 while (!bTransmitSucceeded && !*bError && (iTimeout == 0 || iNow < iTargetTime))
abbca718 303 {
220537f2 304 CCECAdapterMessage msg;
25701fa6 305
06a1f7ce 306 if (!m_communication->Read(msg, iTimeout > 0 ? (int32_t)(iTargetTime - iNow) : 1000))
abbca718 307 {
abbca718 308 iNow = GetTimeMs();
5d38b0b6
LOK
309 continue;
310 }
311
7ea0d558
LOK
312 switch(msg.message())
313 {
314 case MSGCODE_TIMEOUT_ERROR:
315 case MSGCODE_HIGH_ERROR:
316 case MSGCODE_LOW_ERROR:
317 {
318 CStdString logStr;
319 if (msg.message() == MSGCODE_TIMEOUT_ERROR)
320 logStr = "MSGCODE_TIMEOUT";
321 else if (msg.message() == MSGCODE_HIGH_ERROR)
322 logStr = "MSGCODE_HIGH_ERROR";
323 else
324 logStr = "MSGCODE_LOW_ERROR";
325
326 int iLine = (msg.size() >= 3) ? (msg[1] << 8) | (msg[2]) : 0;
327 uint32_t iTime = (msg.size() >= 7) ? (msg[3] << 24) | (msg[4] << 16) | (msg[5] << 8) | (msg[6]) : 0;
328 logStr.AppendFormat(" line:%i", iLine);
329 logStr.AppendFormat(" time:%u", iTime);
330 m_controller->AddLog(CEC_LOG_WARNING, logStr.c_str());
331 *bError = true;
332 }
333 break;
334 case MSGCODE_COMMAND_ACCEPTED:
335 m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_COMMAND_ACCEPTED");
336 iPacketsLeft--;
337 break;
338 case MSGCODE_TRANSMIT_SUCCEEDED:
339 m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_TRANSMIT_SUCCEEDED");
340 bTransmitSucceeded = (iPacketsLeft == 0);
341 *bError = !bTransmitSucceeded;
342 break;
343 case MSGCODE_RECEIVE_FAILED:
344 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_RECEIVE_FAILED");
345 *bError = true;
346 break;
347 case MSGCODE_COMMAND_REJECTED:
348 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_COMMAND_REJECTED");
349 *bError = true;
350 break;
351 case MSGCODE_TRANSMIT_FAILED_LINE:
352 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_LINE");
353 *bError = true;
354 break;
355 case MSGCODE_TRANSMIT_FAILED_ACK:
356 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_ACK");
357 *bError = true;
358 break;
359 case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
360 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA");
361 *bError = true;
362 break;
363 case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
364 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE");
365 *bError = true;
366 break;
367 default:
271e7778
LOK
368 CCECAdapterMessagePtr msgPtr = CCECAdapterMessagePtr(new CCECAdapterMessage(msg));
369 m_frameBuffer.Push(msgPtr);
7ea0d558
LOK
370 break;
371 }
372
5d38b0b6 373 iNow = GetTimeMs();
abbca718
LOK
374 }
375
78e8010a 376 return bTransmitSucceeded && !*bError;
abbca718
LOK
377}
378
0e7b6c54 379bool CCECProcessor::ParseMessage(const CCECAdapterMessage &msg)
abbca718 380{
7ea0d558 381 bool bEom = false;
60fa4578 382
0e7b6c54 383 if (msg.empty())
7ea0d558 384 return bEom;
abbca718
LOK
385
386 CStdString logStr;
abbca718 387
0e7b6c54 388 switch(msg.message())
abbca718
LOK
389 {
390 case MSGCODE_NOTHING:
2abe74eb 391 m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_NOTHING");
abbca718
LOK
392 break;
393 case MSGCODE_TIMEOUT_ERROR:
394 case MSGCODE_HIGH_ERROR:
395 case MSGCODE_LOW_ERROR:
396 {
0e7b6c54 397 if (msg.message() == MSGCODE_TIMEOUT_ERROR)
abbca718 398 logStr = "MSGCODE_TIMEOUT";
0e7b6c54 399 else if (msg.message() == MSGCODE_HIGH_ERROR)
abbca718
LOK
400 logStr = "MSGCODE_HIGH_ERROR";
401 else
402 logStr = "MSGCODE_LOW_ERROR";
403
0e7b6c54
LOK
404 int iLine = (msg.size() >= 3) ? (msg[1] << 8) | (msg[2]) : 0;
405 uint32_t iTime = (msg.size() >= 7) ? (msg[3] << 24) | (msg[4] << 16) | (msg[5] << 8) | (msg[6]) : 0;
abbca718
LOK
406 logStr.AppendFormat(" line:%i", iLine);
407 logStr.AppendFormat(" time:%u", iTime);
2abe74eb 408 m_controller->AddLog(CEC_LOG_WARNING, logStr.c_str());
abbca718
LOK
409 }
410 break;
411 case MSGCODE_FRAME_START:
412 {
7ea0d558
LOK
413 logStr = "MSGCODE_FRAME_START";
414 m_currentframe.clear();
0e7b6c54 415 if (msg.size() >= 2)
abbca718 416 {
0e7b6c54
LOK
417 logStr.AppendFormat(" initiator:%1x destination:%1x ack:%s %s", msg.initiator(), msg.destination(), msg.ack() ? "high" : "low", msg.eom() ? "eom" : "");
418 m_currentframe.initiator = msg.initiator();
419 m_currentframe.destination = msg.destination();
420 m_currentframe.ack = msg.ack();
421 m_currentframe.eom = msg.eom();
abbca718 422 }
7ea0d558 423 m_controller->AddLog(CEC_LOG_DEBUG, logStr.c_str());
abbca718
LOK
424 }
425 break;
426 case MSGCODE_FRAME_DATA:
427 {
7ea0d558 428 logStr = "MSGCODE_FRAME_DATA";
0e7b6c54 429 if (msg.size() >= 2)
78e8010a 430 {
0e7b6c54 431 uint8_t iData = msg[1];
7ea0d558
LOK
432 logStr.AppendFormat(" %02x", iData);
433 m_currentframe.push_back(iData);
0e7b6c54 434 m_currentframe.eom = msg.eom();
abbca718 435 }
7ea0d558 436 m_controller->AddLog(CEC_LOG_DEBUG, logStr.c_str());
78e8010a 437
0e7b6c54 438 bEom = msg.eom();
abbca718 439 }
78e8010a
LOK
440 break;
441 case MSGCODE_COMMAND_ACCEPTED:
442 m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_COMMAND_ACCEPTED");
443 break;
444 case MSGCODE_TRANSMIT_SUCCEEDED:
445 m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_TRANSMIT_SUCCEEDED");
78e8010a
LOK
446 break;
447 case MSGCODE_RECEIVE_FAILED:
448 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_RECEIVE_FAILED");
78e8010a
LOK
449 break;
450 case MSGCODE_COMMAND_REJECTED:
451 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_COMMAND_REJECTED");
78e8010a
LOK
452 break;
453 case MSGCODE_TRANSMIT_FAILED_LINE:
454 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_LINE");
78e8010a
LOK
455 break;
456 case MSGCODE_TRANSMIT_FAILED_ACK:
457 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_ACK");
78e8010a
LOK
458 break;
459 case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
460 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA");
78e8010a
LOK
461 break;
462 case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
463 m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE");
abbca718
LOK
464 break;
465 default:
466 break;
467 }
7ea0d558
LOK
468
469 return bEom;
abbca718
LOK
470}
471
e9de9629 472void CCECProcessor::ParseCommand(cec_command &command)
abbca718 473{
e9de9629 474 CStdString dataStr;
1d3ca3de 475 dataStr.Format(">> %1x%1x:%02x", command.initiator, command.destination, command.opcode);
e9de9629
LOK
476 for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++)
477 dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]);
1d3ca3de 478 m_controller->AddLog(CEC_LOG_TRAFFIC, dataStr.c_str());
dc113aca 479
e9de9629
LOK
480 if (!m_bMonitor)
481 m_busDevices[(uint8_t)command.initiator]->HandleCommand(command);
dc113aca
LOK
482}
483
0f23c85c
LOK
484uint16_t CCECProcessor::GetPhysicalAddress(void) const
485{
cc60ab1c
LOK
486 if (m_iLogicalAddress != CECDEVICE_UNKNOWN && m_busDevices[m_iLogicalAddress])
487 return m_busDevices[m_iLogicalAddress]->GetPhysicalAddress();
488 return false;
0f23c85c
LOK
489}
490
e9de9629 491void CCECProcessor::SetCurrentButton(cec_user_control_code iButtonCode)
dc113aca 492{
e9de9629 493 m_controller->SetCurrentButton(iButtonCode);
dc113aca
LOK
494}
495
e9de9629 496void CCECProcessor::AddCommand(const cec_command &command)
dc113aca 497{
e9de9629 498 m_controller->AddCommand(command);
dc113aca
LOK
499}
500
e9de9629 501void CCECProcessor::AddKey(void)
dc113aca 502{
e9de9629 503 m_controller->AddKey();
abbca718 504}
acec5f48 505
e9de9629 506void CCECProcessor::AddLog(cec_log_level level, const CStdString &strMessage)
acec5f48 507{
e9de9629 508 m_controller->AddLog(level, strMessage);
acec5f48 509}