return bReturn;
}
-bool CCECProcessor::TransmitKeypress(cec_logical_address iDestination, cec_user_control_code key)
+bool CCECProcessor::TransmitKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = true */)
{
return m_busDevices[iDestination]->TransmitKeypress(key);
}
-bool CCECProcessor::TransmitKeyRelease(cec_logical_address iDestination)
+bool CCECProcessor::TransmitKeyRelease(cec_logical_address iDestination, bool bWait /* = true */)
{
return m_busDevices[iDestination]->TransmitKeyRelease();
}
virtual uint8_t VolumeUp(bool bSendRelease = true);
virtual uint8_t VolumeDown(bool bSendRelease = true);
virtual uint8_t MuteAudio(bool bSendRelease = true);
- virtual bool TransmitKeypress(cec_logical_address iDestination, cec_user_control_code key);
- virtual bool TransmitKeyRelease(cec_logical_address iDestination);
+ virtual bool TransmitKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = true);
+ virtual bool TransmitKeyRelease(cec_logical_address iDestination, bool bWait = true);
virtual bool EnablePhysicalAddressDetection(void) { return false; };
void SetStandardLineTimeout(uint8_t iTimeout);
void SetRetryLineTimeout(uint8_t iTimeout);
return 0;
}
-bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = false */)
+bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = true */)
{
if (m_cec)
- return m_cec->TransmitKeypress(iDestination, key);
+ return m_cec->TransmitKeypress(iDestination, key, bWait);
return false;
}
-bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = false */)
+bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = true */)
{
if (m_cec)
- return m_cec->TransmitKeyRelease(iDestination);
+ return m_cec->TransmitKeyRelease(iDestination, bWait);
return false;
}
virtual uint8_t VolumeUp(bool bSendRelease = true);
virtual uint8_t VolumeDown(bool bSendRelease = true);
virtual uint8_t MuteAudio(bool bSendRelease = true);
- virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = false);
- virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = false);
+ virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = true);
+ virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = true);
virtual cec_osd_name GetDeviceOSDName(cec_logical_address iAddress);
virtual bool EnablePhysicalAddressDetection(void);
virtual cec_logical_address GetActiveSource(void);
}
}
-bool CCECBusDevice::TransmitKeypress(cec_user_control_code key)
+bool CCECBusDevice::TransmitKeypress(cec_user_control_code key, bool bWait /* = true */)
{
- return m_handler->TransmitKeypress(m_processor->GetLogicalAddress(), m_iLogicalAddress, key);
+ return m_handler->TransmitKeypress(m_processor->GetLogicalAddress(), m_iLogicalAddress, key, bWait);
}
-bool CCECBusDevice::TransmitKeyRelease(void)
+bool CCECBusDevice::TransmitKeyRelease(bool bWait /* = true */)
{
- return m_handler->TransmitKeyRelease(m_processor->GetLogicalAddress(), m_iLogicalAddress);
+ return m_handler->TransmitKeyRelease(m_processor->GetLogicalAddress(), m_iLogicalAddress, bWait);
}
//@}
virtual bool TransmitPowerState(cec_logical_address dest);
virtual bool TransmitPoll(cec_logical_address dest);
virtual bool TransmitVendorID(cec_logical_address dest, bool bSendAbort = true);
- virtual bool TransmitKeypress(cec_user_control_code key);
- virtual bool TransmitKeyRelease(void);
+ virtual bool TransmitKeypress(cec_user_control_code key, bool bWait = true);
+ virtual bool TransmitKeyRelease(bool bWait = true);
protected:
bool RequestCecVersion(void);
}
}
}
-
m_processor->SetCurrentButton((cec_user_control_code) command.parameters[0]);
return true;
}
return Transmit(command);
}
-bool CCECCommandHandler::TransmitKeypress(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_user_control_code key)
+bool CCECCommandHandler::TransmitKeypress(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = true */)
{
cec_command command;
cec_command::Format(command, iInitiator, iDestination, CEC_OPCODE_USER_CONTROL_PRESSED);
command.parameters.PushBack((uint8_t)key);
- return Transmit(command);
+ return Transmit(command, bWait);
}
-bool CCECCommandHandler::TransmitKeyRelease(const cec_logical_address iInitiator, const cec_logical_address iDestination)
+bool CCECCommandHandler::TransmitKeyRelease(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWait /* = true */)
{
cec_command command;
cec_command::Format(command, iInitiator, iDestination, CEC_OPCODE_USER_CONTROL_RELEASE);
- return Transmit(command);
+ return Transmit(command, bWait);
}
bool CCECCommandHandler::Transmit(cec_command &command, bool bExpectResponse /* = true */)
virtual bool TransmitSetSystemAudioMode(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_system_audio_status state);
virtual bool TransmitSystemAudioModeStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_system_audio_status state);
virtual bool TransmitDeckStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_deck_info state);
- virtual bool TransmitKeypress(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_user_control_code key);
- virtual bool TransmitKeyRelease(const cec_logical_address iInitiator, const cec_logical_address iDestination);
+ virtual bool TransmitKeypress(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_user_control_code key, bool bWait = true);
+ virtual bool TransmitKeyRelease(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWait = true);
protected:
virtual bool HandleActiveSource(const cec_command &command);