X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.h;h=166bac02609e9027515d8e3cf658dd9affb978e5;hb=5d71f08c3211791a51f6d7b0bde3d41f2e56d71f;hp=e5edac52116f57376d897157ce88c147666c3289;hpb=1b5cc4a2517ee8e6cebb44063ea03eb4128b4ab1;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index e5edac5..166bac0 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-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. @@ -38,7 +38,42 @@ namespace CEC 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) {}; + + bool InitHandler(void); + bool ActivateSource(bool bTransmitDelayedCommandsOnly = false); + + protected: + int HandleVendorCommand(const cec_command &command); + + void HandleVendorCommandSLInit(const cec_command &command); + void TransmitVendorCommandSLAckInit(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 m_bSLEnabled; + PLATFORM::CTimeout m_resetPowerState; + PLATFORM::CMutex m_SLMutex; }; };