+ CStdString strLog;
+ strLog.Format("<< %x -> broadcast: inactive view", m_iLogicalAddress);
+ AddLog(CEC_LOG_NOTICE, strLog);
+
+ cec_command command;
+ cec_command::format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_INACTIVE_SOURCE);
+ command.parameters.push_back((m_iPhysicalAddress >> 8) & 0xFF);
+ command.parameters.push_back(m_iPhysicalAddress & 0xFF);
+
+ return m_processor->Transmit(command);
+}
+
+bool CCECBusDevice::TransmitMenuState(cec_logical_address dest)
+{
+ CStdString strLog;
+ strLog.Format("<< %x -> %x: ", m_iLogicalAddress, dest);
+ if (m_bMenuActive)
+ strLog.append("menu active");
+ else
+ strLog.append("menu inactive");
+ AddLog(CEC_LOG_NOTICE, strLog);
+
+ cec_command command;
+ cec_command::format(command, m_iLogicalAddress, dest, CEC_OPCODE_MENU_STATUS);
+ command.parameters.push_back(m_bMenuActive ? (uint8_t) CEC_MENU_STATE_ACTIVATED : (uint8_t) CEC_MENU_STATE_DEACTIVATED);
+
+ return m_processor->Transmit(command);
+}
+
+bool CCECBusDevice::TransmitOSDName(cec_logical_address dest)
+{
+ CStdString strLog;
+ strLog.Format("<< %x -> %x: OSD name '%s'", m_iLogicalAddress, dest, m_strDeviceName.c_str());
+ AddLog(CEC_LOG_NOTICE, strLog.c_str());
+
+ cec_command command;
+ cec_command::format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_NAME);
+ for (unsigned int iPtr = 0; iPtr < m_strDeviceName.length(); iPtr++)
+ command.parameters.push_back(m_strDeviceName.at(iPtr));
+
+ return m_processor->Transmit(command);
+}
+
+bool CCECBusDevice::TransmitOSDString(cec_logical_address dest, cec_display_control duration, const char *strMessage)
+{
+ CStdString strLog;
+ strLog.Format("<< %x -> %x: display OSD message '%s'", m_iLogicalAddress, dest, strMessage);
+ AddLog(CEC_LOG_NOTICE, strLog.c_str());
+
+ cec_command command;
+ cec_command::format(command, m_iLogicalAddress, dest, CEC_OPCODE_SET_OSD_STRING);
+ command.parameters.push_back((uint8_t)duration);
+
+ unsigned int iLen = strlen(strMessage);
+ if (iLen > 13) iLen = 13;
+
+ for (unsigned int iPtr = 0; iPtr < iLen; iPtr++)
+ command.parameters.push_back(strMessage[iPtr]);
+
+ return m_processor->Transmit(command);
+}
+
+bool CCECBusDevice::TransmitPhysicalAddress(void)
+{
+ CStdString strLog;
+ strLog.Format("<< %x -> broadcast: physical adddress %4x", m_iLogicalAddress, m_iPhysicalAddress);
+ 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) (m_type));
+
+ return m_processor->Transmit(command);
+}
+
+bool CCECBusDevice::TransmitPoll(cec_logical_address dest)
+{
+ bool bReturn(false);
+
+ if (dest == CECDEVICE_UNKNOWN)
+ dest = m_iLogicalAddress;
+
+ CStdString strLog;
+ strLog.Format("<< %x -> %x: POLL", m_iLogicalAddress, dest);
+ AddLog(CEC_LOG_NOTICE, strLog.c_str());
+
+ cec_command command;
+ cec_command::format(command, m_iLogicalAddress, dest, CEC_OPCODE_NONE);
+ CLockObject lock(&m_mutex);
+
+ bReturn = m_processor->Transmit(command);
+ AddLog(CEC_LOG_DEBUG, bReturn ? ">> POLL sent" : ">> POLL not sent");
+ return bReturn;
+}
+
+bool CCECBusDevice::TransmitPowerState(cec_logical_address dest)
+{
+ CStdString strLog;
+ strLog.Format("<< %x -> %x: ", m_iLogicalAddress, dest);
+
+ switch (m_powerStatus)