| 231 | } |
| 232 | |
| 233 | int 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 | |
| 259 | int CSLCommandHandler::HandleGiveDevicePowerStatus(const cec_command &command) |
| 260 | { |
nothing calls this directly
no test coverage detected