X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.h;h=0eb6c8656e25170519279e9035c0bce66930da89;hb=36cc67e083b00ccd6c74be13f5dbf61601dc2795;hp=6a91df4c1e7a6d1d62c4e8dd2ef20543141e342a;hpb=9a0d7b9f744c551930928fee6d3dac0d90507cd1;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index 6a91df4..0eb6c86 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -2,7 +2,7 @@ /* * 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-2012 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -32,6 +32,7 @@ */ #include "CECCommandHandler.h" +#include "../platform/util/timeutils.h" namespace CEC { @@ -40,28 +41,39 @@ namespace CEC public: CSLCommandHandler(CCECBusDevice *busDevice); virtual ~CSLCommandHandler(void) {}; - virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_LG; }; - virtual bool HandleCommand(const cec_command &command); - virtual void HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination); - virtual bool HandleReceiveFailed(void); - virtual bool InitHandler(void); - virtual bool TransmitLGVendorId(const cec_logical_address iInitiator, const cec_logical_address iDestination); - virtual bool TransmitPowerOn(const cec_logical_address iInitiator, const cec_logical_address iDestination); + bool InitHandler(void); protected: - virtual void HandleVendorCommand01(const cec_command &command); - virtual void HandleVendorCommand03(const cec_command &command); - virtual void HandleVendorCommand04(const cec_command &command); - virtual void HandleVendorCommandA0(const cec_command &command); + bool HandleActiveSource(const cec_command &command); + bool HandleDeviceVendorId(const cec_command &command); + bool HandleVendorCommand(const cec_command &command); - virtual void TransmitDeckStatus(const cec_logical_address iDestination); - virtual bool HandleGiveDeviceVendorId(const cec_command &command); - virtual bool HandleVendorCommand(const cec_command &command); - virtual bool HandleGiveDeckStatus(const cec_command &command); + void HandleVendorCommand01(const cec_command &command); + void TransmitVendorCommand0205(const cec_logical_address iSource, const cec_logical_address iDestination); - bool m_bAwaitingReceiveFailed; - bool m_bSLEnabled; - bool m_bVendorIdSent; + 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); + + bool HandleGiveDevicePowerStatus(const cec_command &command); + bool HandleGiveDeckStatus(const cec_command &command); + bool HandleRequestActiveSource(const cec_command &command); + bool HandleFeatureAbort(const cec_command &command); + bool HandleStandby(const cec_command &command); + bool TransmitMenuState(const cec_logical_address UNUSED(iInitiator), const cec_logical_address UNUSED(iDestination), cec_menu_state UNUSED(menuState)) { 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); + + bool m_bSLEnabled; + bool m_bActiveSourceSent; + PLATFORM::CTimeout m_resetPowerState; + PLATFORM::CMutex m_SLMutex; }; };