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

Method HandleGiveDeckStatus

src/libcec/implementations/SLCommandHandler.cpp:233–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233int CSLCommandHandler::HandleGiveDeckStatus(const cec_command &command)
234{
235 if (!m_processor->CECInitialised() ||
236 !m_processor->IsHandledByLibCEC(command.destination))
237 return CEC_ABORT_REASON_NOT_IN_CORRECT_MODE_TO_RESPOND;
238
239 CCECPlaybackDevice *device = CCECBusDevice::AsPlaybackDevice(GetDevice(command.destination));
240 if (!device || command.parameters.size == 0)
241 return CEC_ABORT_REASON_INVALID_OPERAND;
242
243 device->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
244 if (command.parameters[0] == CEC_STATUS_REQUEST_ON)
245 {
246 device->TransmitDeckStatus(command.initiator, true);
247 ActivateSource();
248 return COMMAND_HANDLED;
249 }
250 else if (command.parameters[0] == CEC_STATUS_REQUEST_ONCE)
251 {
252 device->TransmitDeckStatus(command.initiator, true);
253 return COMMAND_HANDLED;
254 }
255
256 return CCECCommandHandler::HandleGiveDeckStatus(command);
257}
258
259int CSLCommandHandler::HandleGiveDevicePowerStatus(const cec_command &command)
260{

Callers

nothing calls this directly

Calls 4

CECInitialisedMethod · 0.80
SetDeckStatusMethod · 0.80
IsHandledByLibCECMethod · 0.45
TransmitDeckStatusMethod · 0.45

Tested by

no test coverage detected