X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.h;h=e26530214617e4d90165fe86202ac1d20de72edc;hb=2f08d7b06c6d80e191b4343eafa7731a3d6a6017;hp=afd1315afa02d473a3ed24fe691b99d083cd1079;hpb=cf4931be43a04e39ae7041e115f5a07cec530031;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.h b/src/lib/implementations/CECCommandHandler.h index afd1315..e265302 100644 --- a/src/lib/implementations/CECCommandHandler.h +++ b/src/lib/implementations/CECCommandHandler.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. @@ -33,8 +33,8 @@ #include #include -#include "../util/StdString.h" -#include "../platform/threads.h" +#include "../platform/threads/mutex.h" +#include "../platform/util/StdString.h" namespace CEC { @@ -50,8 +50,7 @@ namespace CEC virtual bool HandleCommand(const cec_command &command); virtual cec_vendor_id GetVendorId(void) { return m_vendorId; }; virtual void SetVendorId(cec_vendor_id vendorId) { m_vendorId = vendorId; } - virtual void HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination); - virtual bool HandleReceiveFailed(void); + static bool HasSpecificHandler(cec_vendor_id vendorId) { return vendorId == CEC_VENDOR_LG || vendorId == CEC_VENDOR_SAMSUNG || vendorId == CEC_VENDOR_PANASONIC;} virtual bool InitHandler(void) { return true; } virtual bool ActivateSource(void); @@ -81,6 +80,7 @@ namespace CEC virtual bool TransmitDeckStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_deck_info state); virtual bool TransmitKeypress(const cec_logical_address iInitiator, const cec_logical_address iDestination, cec_user_control_code key, bool bWait = true); virtual bool TransmitKeyRelease(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWait = true); + virtual bool TransmitSetStreamPath(uint16_t iStreamPath); virtual void MarkBusy(void); virtual bool MarkReady(void); @@ -121,10 +121,10 @@ namespace CEC virtual bool HandleTextViewOn(const cec_command &command); virtual bool HandleUserControlPressed(const cec_command &command); virtual bool HandleUserControlRelease(const cec_command &command); - virtual bool HandleVendorCommand(const cec_command &command) { return true; } + virtual bool HandleVendorCommand(const cec_command &command); virtual void UnhandledCommand(const cec_command &command); - virtual unsigned int GetMyDevices(std::vector &devices) const; + virtual size_t GetMyDevices(std::vector &devices) const; virtual CCECBusDevice *GetDevice(cec_logical_address iLogicalAddress) const; virtual CCECBusDevice *GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress) const; virtual CCECBusDevice *GetDeviceByType(cec_device_type type) const; @@ -134,17 +134,17 @@ namespace CEC virtual bool Transmit(cec_command &command, bool bExpectResponse = true, cec_opcode expectedResponse = CEC_OPCODE_NONE); - CCECBusDevice *m_busDevice; - CCECProcessor *m_processor; - int32_t m_iTransmitTimeout; - int32_t m_iTransmitWait; - int8_t m_iTransmitRetries; - bool m_bHandlerInited; - uint8_t m_iUseCounter; - cec_opcode m_expectedResponse; - bool m_bOPTSendDeckStatusUpdateOnActiveSource; - cec_vendor_id m_vendorId; - CMutex m_receiveMutex; - CCondition m_condition; + CCECBusDevice * m_busDevice; + CCECProcessor * m_processor; + int32_t m_iTransmitTimeout; + int32_t m_iTransmitWait; + int8_t m_iTransmitRetries; + bool m_bHandlerInited; + uint8_t m_iUseCounter; + cec_opcode m_expectedResponse; + bool m_bOPTSendDeckStatusUpdateOnActiveSource; + cec_vendor_id m_vendorId; + PLATFORM::CMutex m_receiveMutex; + PLATFORM::CCondition m_condition; }; };