X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FSLCommandHandler.h;h=9ce444b7acc385f877b6de862e6b172a5d445dcf;hb=3befc9811e59359c014c33c1276f869d5b59ac09;hp=fefb8b387dea30d8bf49b477279b19ee08847e9e;hpb=466925f5c43536e5fd96632615810da783b78096;p=deb_libcec.git diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index fefb8b3..9ce444b 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-2012 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. @@ -32,23 +32,25 @@ */ #include "CECCommandHandler.h" -#include "../platform/util/timeutils.h" 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(void); protected: - bool HandleActiveSource(const cec_command &command); - bool HandleDeviceVendorId(const cec_command &command); - bool HandleVendorCommand(const cec_command &command); + 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); @@ -59,12 +61,12 @@ namespace CEC 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; } + 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); @@ -72,6 +74,8 @@ namespace CEC void SetSLInitialised(void); bool ActiveSourceSent(void); + void VendorPreActivateSourceHook(void); + bool m_bSLEnabled; bool m_bActiveSourceSent; PLATFORM::CTimeout m_resetPowerState;