X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fdevices%2FCECBusDevice.h;h=a4350da4bc7f93162d78fc0e5c2c682f7ae8e8ae;hb=6bbfc3f7460c5806ffd80834b3c3c68e0738a2d5;hp=ba686322ca3fe9dab6c87b3817b3afa1f1306477;hpb=5477a250b595adb296ed42a88abab002981f4761;p=deb_libcec.git diff --git a/src/lib/devices/CECBusDevice.h b/src/lib/devices/CECBusDevice.h index ba68632..a4350da 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 { @@ -75,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); @@ -93,6 +96,7 @@ namespace CEC virtual bool TransmitActiveSource(void); virtual bool TransmitCECVersion(cec_logical_address dest); + virtual bool TransmitImageViewOn(void); virtual bool TransmitInactiveSource(void); virtual bool TransmitMenuState(cec_logical_address dest); virtual bool TransmitOSDName(cec_logical_address dest); @@ -105,7 +109,9 @@ namespace CEC virtual bool TransmitKeyRelease(bool bWait = true); protected: - bool ReplaceHandler(bool bInitHandler = true); + bool ReplaceHandler(bool bActivateSource = true); + void MarkBusy(void); + void MarkReady(void); bool RequestCecVersion(void); bool RequestMenuLanguage(void); @@ -136,5 +142,8 @@ namespace CEC std::set m_unsupportedFeatures; PLATFORM::CMutex m_mutex; PLATFORM::CMutex m_handlerMutex; + PLATFORM::CEvent m_replacing; + unsigned m_iHandlerUseCount; + bool m_bAwaitingReceiveFailed; }; };