repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec-config-gui: fixed application exit when the user clicked 'no' when asked to recon...
[deb_libcec.git]
/
src
/
lib
/
devices
/
CECBusDevice.h
diff --git
a/src/lib/devices/CECBusDevice.h
b/src/lib/devices/CECBusDevice.h
index 23b6c15cd5ec0d8cc51946b205be920140dda12c..30ac2dc788df51c50251eaae0c8a4488799ccc03 100644
(file)
--- 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.
*
/*
* 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.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
@@
-31,26
+31,24
@@
* http://www.pulse-eight.net/
*/
* http://www.pulse-eight.net/
*/
-#include <cectypes.h>
-#include "../platform/threads.h"
-#include "../util/StdString.h"
+#include "../../../include/cectypes.h"
+#include <set>
+#include "../platform/threads/mutex.h"
+#include "../platform/util/StdString.h"
namespace CEC
{
class CCECProcessor;
class CCECCommandHandler;
namespace CEC
{
class CCECProcessor;
class CCECCommandHandler;
- class CSLCommandHandler;
class CCECBusDevice
{
friend class CCECProcessor;
class CCECBusDevice
{
friend class CCECProcessor;
- friend class CSLCommandHandler;
public:
CCECBusDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress = 0);
virtual ~CCECBusDevice(void);
public:
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);
virtual bool HandleCommand(const cec_command &command);
virtual bool PowerOn(void);
virtual bool Standby(void);
@@
-61,6
+59,7
@@
namespace CEC
virtual cec_logical_address GetLogicalAddress(void) const { return m_iLogicalAddress; }
virtual const char* GetLogicalAddressName(void) const;
virtual cec_menu_language & GetMenuLanguage(bool bUpdate = false);
virtual cec_logical_address GetLogicalAddress(void) const { return m_iLogicalAddress; }
virtual const char* GetLogicalAddressName(void) const;
virtual cec_menu_language & GetMenuLanguage(bool bUpdate = false);
+ virtual cec_menu_state GetMenuState(void);
virtual cec_logical_address GetMyLogicalAddress(void) const;
virtual uint16_t GetMyPhysicalAddress(void) const;
virtual CStdString GetOSDName(bool bUpdate = false);
virtual cec_logical_address GetMyLogicalAddress(void) const;
virtual uint16_t GetMyPhysicalAddress(void) const;
virtual CStdString GetOSDName(bool bUpdate = false);
@@
-73,11
+72,15
@@
namespace CEC
virtual bool MyLogicalAddressContains(cec_logical_address address) const;
virtual cec_bus_device_status GetStatus(bool bForcePoll = false);
virtual bool IsActiveSource(void) const { return m_bActiveSource; }
virtual bool MyLogicalAddressContains(cec_logical_address address) const;
virtual cec_bus_device_status GetStatus(bool bForcePoll = false);
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);
virtual bool TryLogicalAddress(void);
virtual void SetInactiveSource(void);
virtual void SetActiveSource(void);
virtual bool TryLogicalAddress(void);
+ virtual bool ActivateSource(void);
virtual void SetDeviceStatus(const cec_bus_device_status newStatus);
virtual void SetPhysicalAddress(uint16_t iNewAddress);
virtual void SetDeviceStatus(const cec_bus_device_status newStatus);
virtual void SetPhysicalAddress(uint16_t iNewAddress);
@@
-86,11
+89,12
@@
namespace CEC
virtual void SetMenuLanguage(const cec_menu_language &menuLanguage);
virtual void SetOSDName(CStdString strName);
virtual void SetMenuState(const cec_menu_state state);
virtual void SetMenuLanguage(const cec_menu_language &menuLanguage);
virtual void SetOSDName(CStdString strName);
virtual void SetMenuState(const cec_menu_state state);
- virtual bool SetVendorId(uint64_t iVendorId
, bool bInitHandler = true
);
+ virtual bool SetVendorId(uint64_t iVendorId);
virtual void SetPowerStatus(const cec_power_status powerStatus);
virtual bool TransmitActiveSource(void);
virtual bool TransmitCECVersion(cec_logical_address dest);
virtual void SetPowerStatus(const cec_power_status powerStatus);
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);
virtual bool TransmitInactiveSource(void);
virtual bool TransmitMenuState(cec_logical_address dest);
virtual bool TransmitOSDName(cec_logical_address dest);
@@
-102,7
+106,13
@@
namespace CEC
virtual bool TransmitKeypress(cec_user_control_code key, bool bWait = true);
virtual bool TransmitKeyRelease(bool bWait = true);
virtual bool TransmitKeypress(cec_user_control_code key, bool bWait = true);
virtual bool TransmitKeyRelease(bool bWait = true);
+ bool ReplaceHandler(bool bActivateSource = true);
+
protected:
protected:
+ void CheckVendorIdRequested(void);
+ void MarkBusy(void);
+ void MarkReady(void);
+
bool RequestCecVersion(void);
bool RequestMenuLanguage(void);
bool RequestPowerStatus(void);
bool RequestCecVersion(void);
bool RequestMenuLanguage(void);
bool RequestPowerStatus(void);
@@
-122,12
+132,19
@@
namespace CEC
CCECProcessor * m_processor;
CCECCommandHandler * m_handler;
cec_vendor_id m_vendor;
CCECProcessor * m_processor;
CCECCommandHandler * m_handler;
cec_vendor_id m_vendor;
+ bool m_bReplaceHandler;
cec_menu_state m_menuState;
bool m_bActiveSource;
uint64_t m_iLastActive;
cec_menu_state m_menuState;
bool m_bActiveSource;
uint64_t m_iLastActive;
+ uint64_t m_iLastPowerStateUpdate;
cec_version m_cecVersion;
cec_bus_device_status m_deviceStatus;
cec_version m_cecVersion;
cec_bus_device_status m_deviceStatus;
- CMutex m_writeMutex;
- CMutex m_mutex;
+ std::set<cec_opcode> m_unsupportedFeatures;
+ PLATFORM::CMutex m_mutex;
+ PLATFORM::CMutex m_handlerMutex;
+ PLATFORM::CEvent m_replacing;
+ unsigned m_iHandlerUseCount;
+ bool m_bAwaitingReceiveFailed;
+ bool m_bVendorIdRequested;
};
};
};
};