/*
* This file is part of the libCEC(R) library.
*
- * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
class CSLCommandHandler : public CCECCommandHandler
{
public:
- CSLCommandHandler(CCECBusDevice *busDevice);
+ CSLCommandHandler(CCECBusDevice *busDevice,
+ int32_t iTransmitTimeout = CEC_DEFAULT_TRANSMIT_TIMEOUT,
+ int32_t iTransmitWait = CEC_DEFAULT_TRANSMIT_WAIT,
+ int8_t iTransmitRetries = CEC_DEFAULT_TRANSMIT_RETRIES,
+ int64_t iActiveSourcePending = 0);
virtual ~CSLCommandHandler(void) {};
- virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_LG; };
+
+ bool InitHandler(void);
+
+ protected:
+ int HandleActiveSource(const cec_command &command);
+ int HandleDeviceVendorId(const cec_command &command);
+ int HandleVendorCommand(const cec_command &command);
+
+ void HandleVendorCommand01(const cec_command &command);
+ void TransmitVendorCommand0205(const cec_logical_address iSource, const cec_logical_address iDestination);
+
+ void HandleVendorCommandPowerOn(const cec_command &command);
+ void HandleVendorCommandPowerOnStatus(const cec_command &command);
+
+ void HandleVendorCommandSLConnect(const cec_command &command);
+ void TransmitVendorCommandSetDeviceMode(const cec_logical_address iSource, const cec_logical_address iDestination, const cec_device_type type);
+
+ int HandleGiveDevicePowerStatus(const cec_command &command);
+ int HandleGiveDeckStatus(const cec_command &command);
+ int HandleRequestActiveSource(const cec_command &command);
+ int HandleFeatureAbort(const cec_command &command);
+ int HandleStandby(const cec_command &command);
+ bool TransmitMenuState(const cec_logical_address UNUSED(iInitiator), const cec_logical_address UNUSED(iDestination), cec_menu_state UNUSED(menuState), bool UNUSED(bIsReply)) { return true; }
+ bool PowerOn(const cec_logical_address iInitiator, const cec_logical_address iDestination);
+
+ void ResetSLState(void);
+ bool SLInitialised(void);
+ void SetSLInitialised(void);
+ bool ActiveSourceSent(void);
+
+ void VendorPreActivateSourceHook(void);
+
+ bool m_bSLEnabled;
+ bool m_bActiveSourceSent;
+ PLATFORM::CTimeout m_resetPowerState;
+ PLATFORM::CMutex m_SLMutex;
};
};