+void CSLCommandHandler::HandleVendorCommandPowerOnStatus(const cec_command &command)
+{
+ if (command.destination != CECDEVICE_BROADCAST)
+ {
+ CCECBusDevice *device = m_processor->GetPrimaryDevice();
+ if (device)
+ {
+ device->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+ device->TransmitPowerState(command.initiator, true);
+ device->SetPowerStatus(CEC_POWER_STATUS_ON);
+ }
+ }
+}
+
+void CSLCommandHandler::HandleVendorCommandSLConnect(const cec_command &command)
+{
+ SetSLInitialised();
+ TransmitVendorCommandSetDeviceMode(command.destination, command.initiator, CEC_DEVICE_TYPE_RECORDING_DEVICE);
+
+ ActivateSource();
+}
+
+void CSLCommandHandler::TransmitVendorCommandSetDeviceMode(const cec_logical_address iSource, const cec_logical_address iDestination, const cec_device_type type)
+{
+ cec_command response;
+ cec_command::Format(response, iSource, iDestination, CEC_OPCODE_VENDOR_COMMAND);
+ response.PushBack(SL_COMMAND_SET_DEVICE_MODE);
+ response.PushBack((uint8_t)type);
+ Transmit(response, false, true);
+}
+
+int CSLCommandHandler::HandleGiveDeckStatus(const cec_command &command)
+{
+ if (!m_processor->CECInitialised() ||
+ !m_processor->IsHandledByLibCEC(command.destination))
+ return CEC_ABORT_REASON_NOT_IN_CORRECT_MODE_TO_RESPOND;