bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */)
{
- CLockObject lock(m_mutex);
+ CTryLockObject lock(m_mutex);
+ if (!lock.IsLocked())
+ return false;
+
CLockObject handlerLock(m_handlerMutex);
if (m_vendor != m_handler->GetVendorId())
return m_handler->ActivateSource();
}
+void CCECBusDevice::HandlePoll(cec_logical_address iDestination)
+{
+ CLockObject lock(m_mutex);
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "<< POLL: %s (%x) -> %s (%x)", ToString(m_iLogicalAddress), m_iLogicalAddress, ToString(iDestination), iDestination);
+ m_bAwaitingReceiveFailed = true;
+}
+
+bool CCECBusDevice::HandleReceiveFailed(void)
+{
+ CLockObject lock(m_handlerMutex);
+ bool bReturn = m_bAwaitingReceiveFailed;
+ m_bAwaitingReceiveFailed = false;
+ return bReturn;
+}
+
//@}