- CStdString strLog;
- strLog.Format("<< %s (%X) -> %s (%X): vendor id %s (%x)", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, ToString(m_vendor), (uint64_t)m_vendor);
- AddLog(CEC_LOG_NOTICE, strLog);
+ CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> %s (%X): vendor id %s (%x)", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, ToString((cec_vendor_id)iVendorId), iVendorId);
+ bReturn = m_handler->TransmitVendorID(m_iLogicalAddress, iVendorId);
+ }
+ MarkReady();
+ return bReturn;
+}
+
+bool CCECBusDevice::TransmitKeypress(cec_user_control_code key, bool bWait /* = true */)
+{
+ MarkBusy();
+ bool bReturn = m_handler->TransmitKeypress(m_processor->GetLogicalAddress(), m_iLogicalAddress, key, bWait);
+ MarkReady();
+ return bReturn;
+}
+
+bool CCECBusDevice::TransmitKeyRelease(bool bWait /* = true */)
+{
+ MarkBusy();
+ bool bReturn = m_handler->TransmitKeyRelease(m_processor->GetLogicalAddress(), m_iLogicalAddress, bWait);
+ MarkReady();
+ return bReturn;
+}
+
+bool CCECBusDevice::IsUnsupportedFeature(cec_opcode opcode) const
+{
+ bool bUnsupported = (m_unsupportedFeatures.find(opcode) != m_unsupportedFeatures.end());
+ if (bUnsupported)
+ CLibCEC::AddLog(CEC_LOG_NOTICE, "'%s' is marked as unsupported feature for device '%s'", ToString(opcode), GetLogicalAddressName());
+ return bUnsupported;
+}
+
+void CCECBusDevice::SetUnsupportedFeature(cec_opcode opcode)
+{
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "marking opcode '%s' as unsupported feature for device '%s'", ToString(opcode), GetLogicalAddressName());
+ m_unsupportedFeatures.insert(opcode);
+}
+
+bool CCECBusDevice::ActivateSource(void)
+{
+ MarkBusy();
+ bool bReturn = m_handler->ActivateSource();
+ MarkReady();
+ return bReturn;
+}
+
+void CCECBusDevice::HandlePoll(cec_logical_address iDestination)
+{
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "<< POLL: %s (%x) -> %s (%x)", ToString(m_iLogicalAddress), m_iLogicalAddress, ToString(iDestination), iDestination);
+ m_bAwaitingReceiveFailed = true;
+}