+bool CSLCommandHandler::HandleGiveDeckStatus(const cec_command &command)
+{
+ if (command.parameters.size == 1)
+ {
+ if (command.parameters[0] == CEC_STATUS_REQUEST_ONCE ||
+ command.parameters[0] == CEC_STATUS_REQUEST_ON)
+ {
+ TransmitDeckStatus(command.initiator);
+ }
+ else
+ {
+ CCECCommandHandler::HandleGiveDeckStatus(command);
+ }
+ }
+ return true;
+}
+
+void CSLCommandHandler::HandleVendorCommand01(const cec_command &command)
+{
+ cec_command response;
+ cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_VENDOR_COMMAND);
+ response.PushBack(SL_COMMAND_UNKNOWN_02);
+ response.PushBack(SL_COMMAND_UNKNOWN_03);
+
+ Transmit(response);
+
+ /* transmit power status */
+ if (command.destination != CECDEVICE_BROADCAST)
+ m_processor->m_busDevices[command.destination]->TransmitPowerState(command.initiator);
+}
+
+void CSLCommandHandler::HandleVendorCommand04(const cec_command &command)
+{
+ cec_command response;
+ cec_command::Format(response, command.destination, command.initiator, CEC_OPCODE_VENDOR_COMMAND);
+ response.PushBack(SL_COMMAND_CONNECT_ACCEPT);
+ response.PushBack((uint8_t)m_processor->GetLogicalAddresses().primary);
+ Transmit(response);
+
+ TransmitDeckStatus(command.initiator);
+}
+
+void CSLCommandHandler::HandleVendorCommandA0(const cec_command &command)
+{
+ if (command.destination != CECDEVICE_BROADCAST)
+ {
+ CCECBusDevice *device = m_processor->m_busDevices[m_processor->GetLogicalAddresses().primary];
+ device->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+ device->TransmitPowerState(command.initiator);
+ device->SetPowerStatus(CEC_POWER_STATUS_ON);
+ }
+}
+