X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FVLCommandHandler.h;h=cbf6ba63b2cb6602bd8c32abe6bf322bcc3336c2;hb=eb9465c95e465d884ad4db3b39ba207913936cea;hp=9ed71cb04f5b5b2b809fd0d8c1cab91936186ca3;hpb=3e61b35032f69fb93869796e2f985de8cff2ae33;p=deb_libcec.git diff --git a/src/lib/implementations/VLCommandHandler.h b/src/lib/implementations/VLCommandHandler.h index 9ed71cb..cbf6ba6 100644 --- a/src/lib/implementations/VLCommandHandler.h +++ b/src/lib/implementations/VLCommandHandler.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,9 +38,33 @@ namespace CEC class CVLCommandHandler : public CCECCommandHandler { public: - CVLCommandHandler(CCECBusDevice *busDevice); + CVLCommandHandler(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 ~CVLCommandHandler(void) {}; - virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_PANASONIC; }; - virtual bool InitHandler(void); + + bool InitHandler(void); + + int HandleDeviceVendorCommandWithId(const cec_command &command); + int HandleStandby(const cec_command &command); + int HandleSystemAudioModeRequest(const cec_command &command); + + int HandleVendorCommand(const cec_command &command); + bool PowerUpEventReceived(void); + bool SupportsDeviceType(const cec_device_type type) const { return type != CEC_DEVICE_TYPE_RECORDING_DEVICE; }; + cec_device_type GetReplacementDeviceType(const cec_device_type type) const { return type == CEC_DEVICE_TYPE_RECORDING_DEVICE ? CEC_DEVICE_TYPE_PLAYBACK_DEVICE : type; } + + bool SourceSwitchAllowed(void); + + protected: + void VendorPreActivateSourceHook(void); + void SendVendorCommandCapabilities(const cec_logical_address initiator, const cec_logical_address destination); + int HandleReportPowerStatus(const cec_command &command); + + PLATFORM::CMutex m_mutex; + uint64_t m_iPowerUpEventReceived; + bool m_bCapabilitiesSent; }; };