X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fimplementations%2FVLCommandHandler.h;h=3ad80b49150b53749bc61d0f306f972631a5a00c;hb=496897540ebcc6fc13b346aa5e08f2148a2770c7;hp=6770947ab892f2407708f5f00eda9b58db71298e;hpb=b47f66afc453fb3fdbad051aceb44941a49965ba;p=deb_libcec.git diff --git a/src/lib/implementations/VLCommandHandler.h b/src/lib/implementations/VLCommandHandler.h index 6770947..3ad80b4 100644 --- a/src/lib/implementations/VLCommandHandler.h +++ b/src/lib/implementations/VLCommandHandler.h @@ -38,19 +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 bool InitHandler(void); - virtual bool HandleDeviceVendorCommandWithId(const cec_command &command); - virtual bool TransmitActiveSource(const cec_logical_address iInitiator, uint16_t iPhysicalAddress); - virtual bool TransmitPendingActiveSourceCommands(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); - private: PLATFORM::CMutex m_mutex; - bool m_bActiveSourcePending; - bool m_bPowerUpEventReceived; + uint64_t m_iPowerUpEventReceived; + bool m_bCapabilitiesSent; }; };