X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.h;h=60b293a034b3430b2c596c2fe9520781b7efd251;hb=1344fd1a7e86aa1bbc8b1e78eed6be8cd59c4b3b;hp=412504e1987286b1d849eebee53c2de7b4516b61;hpb=f00ff009cfc5dfefdf09ca241b9560e74575b3f5;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.h b/src/lib/devices/CECBusDevice.h index 412504e..60b293a 100644 --- a/src/lib/devices/CECBusDevice.h +++ b/src/lib/devices/CECBusDevice.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. @@ -31,9 +31,10 @@ * http://www.pulse-eight.net/ */ -#include +#include "../../../include/cectypes.h" #include -#include "../platform/os.h" +#include "../platform/threads/mutex.h" +#include "../platform/util/StdString.h" namespace CEC { @@ -50,7 +51,6 @@ namespace CEC CCECBusDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress = 0); virtual ~CCECBusDevice(void); - virtual void AddLog(cec_log_level level, const CStdString &strMessage); virtual bool HandleCommand(const cec_command &command); virtual bool PowerOn(void); virtual bool Standby(void); @@ -76,6 +76,8 @@ namespace CEC virtual bool IsActiveSource(void) const { return m_bActiveSource; } virtual bool IsUnsupportedFeature(cec_opcode opcode) const; virtual void SetUnsupportedFeature(cec_opcode opcode); + virtual void HandlePoll(cec_logical_address initiator); + virtual bool HandleReceiveFailed(void); virtual void SetInactiveSource(void); virtual void SetActiveSource(void); @@ -107,6 +109,8 @@ namespace CEC protected: bool ReplaceHandler(bool bInitHandler = true); + void MarkBusy(void); + void MarkReady(void); bool RequestCecVersion(void); bool RequestMenuLanguage(void); @@ -137,5 +141,7 @@ namespace CEC std::set m_unsupportedFeatures; PLATFORM::CMutex m_mutex; PLATFORM::CMutex m_handlerMutex; + unsigned m_iHandlerUseCount; + bool m_bAwaitingReceiveFailed; }; };