- m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting CEC version as 1.3a");
-
- cec_command command;
- cec_command::format(command, m_iLogicalAddress, address, CEC_OPCODE_CEC_VERSION);
- command.parameters.push_back(CEC_VERSION_1_3A);
-
- Transmit(command);
-}
-
-void CCECProcessor::ReportPowerState(cec_logical_address address /*= CECDEVICE_TV */, bool bOn /* = true */)
-{
- if (bOn)
- m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting \"On\" power status");
- else
- m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting \"Off\" power status");
-
- cec_command command;
- cec_command::format(command, m_iLogicalAddress, address, CEC_OPCODE_REPORT_POWER_STATUS);
- command.parameters.push_back(bOn ? (uint8_t) CEC_POWER_STATUS_ON : (uint8_t) CEC_POWER_STATUS_STANDBY);
-
- Transmit(command);
-}
-
-void CCECProcessor::ReportMenuState(cec_logical_address address /* = CECDEVICE_TV */, bool bActive /* = true */)
-{
- if (bActive)
- m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting menu state as active");
- else
- m_controller->AddLog(CEC_LOG_NOTICE, "<< reporting menu state as inactive");
-
- cec_command command;
- cec_command::format(command, m_iLogicalAddress, address, CEC_OPCODE_MENU_STATUS);
- command.parameters.push_back(bActive ? (uint8_t) CEC_MENU_STATE_ACTIVATED : (uint8_t) CEC_MENU_STATE_DEACTIVATED);
-
- Transmit(command);
-}
-
-void CCECProcessor::ReportVendorID(cec_logical_address address /* = CECDEVICE_TV */)
-{
- m_controller->AddLog(CEC_LOG_NOTICE, "<< vendor ID requested, feature abort");
- TransmitAbort(address, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID);
-}
-
-void CCECProcessor::ReportOSDName(cec_logical_address address /* = CECDEVICE_TV */)
-{
- const char *osdname = m_strDeviceName.c_str();
- CStdString strLog;
- strLog.Format("<< reporting OSD name as %s", osdname);
- m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
-
- cec_command command;
- cec_command::format(command, m_iLogicalAddress, address, CEC_OPCODE_SET_OSD_NAME);
- for (unsigned int iPtr = 0; iPtr < strlen(osdname); iPtr++)
- command.parameters.push_back(osdname[iPtr]);
-
- Transmit(command);
-}
-
-void CCECProcessor::ReportPhysicalAddress(void)
-{
- CStdString strLog;
- strLog.Format("<< reporting physical address as %04x", m_iPhysicalAddress);
- m_controller->AddLog(CEC_LOG_NOTICE, strLog.c_str());
-
- cec_command command;
- cec_command::format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_REPORT_PHYSICAL_ADDRESS);
- command.parameters.push_back((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
- command.parameters.push_back((uint8_t) (m_iPhysicalAddress & 0xFF));
- command.parameters.push_back((uint8_t) (CEC_DEVICE_TYPE_PLAYBACK_DEVICE));
-
- Transmit(command);
-}
-
-void CCECProcessor::BroadcastActiveSource(void)
-{
- m_controller->AddLog(CEC_LOG_NOTICE, "<< broadcasting active source");
-
- cec_command command;
- cec_command::format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_ACTIVE_SOURCE);
- command.parameters.push_back((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
- command.parameters.push_back((uint8_t) (m_iPhysicalAddress & 0xFF));
-
- Transmit(command);
-}
-
-bool CCECProcessor::WaitForAck(bool *bError, uint32_t iTimeout /* = 1000 */)
-{
- bool bTransmitSucceeded = false, bEom = false;