MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / AddCommand

Method AddCommand

src/libcec/CECClient.cpp:1010–1028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010void CCECClient::AddCommand(const cec_command &command)
1011{
1012 // don't forward the standby opcode more than once every 10 seconds
1013 if (command.opcode == CEC_OPCODE_STANDBY)
1014 {
1015 CLockObject lock(m_mutex);
1016 if (m_iPreventForwardingPowerOffCommand != 0 &&
1017 m_iPreventForwardingPowerOffCommand > GetTimeMs())
1018 return;
1019 else
1020 m_iPreventForwardingPowerOffCommand = GetTimeMs() + CEC_FORWARD_STANDBY_MIN_INTERVAL;
1021 }
1022
1023 if (command.destination == CECDEVICE_BROADCAST || GetLogicalAddresses().IsSet(command.destination))
1024 {
1025 LIB_CEC->AddLog(CEC_LOG_DEBUG, ">> %s (%X) -> %s (%X): %s (%2X)", ToString(command.initiator), command.initiator, ToString(command.destination), command.destination, ToString(command.opcode), command.opcode);
1026 CallbackAddCommand(command);
1027 }
1028}
1029
1030void CCECClient::AddKey(bool bSendComboKey /* = false */, bool bButtonRelease /* = false */)
1031{

Callers

nothing calls this directly

Calls 3

ToStringFunction · 0.85
IsSetMethod · 0.45
AddLogMethod · 0.45

Tested by

no test coverage detected