added protection against standby without a notification from XBMC and clock changes...
[deb_libcec.git] / src / lib / CECProcessor.h
index 69586a7cb8fd47f7f010223ad40eb58d5195b0a4..44f1fc170bf1d22d674e7d057c44fa4024b5afb6 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * This file is part of the libCEC(R) library.
  *
- * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited.  All rights reserved.
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited.  All rights reserved.
  * libCEC(R) is an original work, containing original code.
  *
  * libCEC(R) is a trademark of Pulse-Eight Limited.
@@ -52,6 +52,7 @@ namespace CEC
   class CCECTV;
   class CCECClient;
   class CCECProcessor;
+  class CCECStandbyProtection;
 
   class CCECAllocateLogicalAddress : public PLATFORM::CThread
   {
@@ -83,6 +84,7 @@ namespace CEC
 
       bool                  OnCommandReceived(const cec_command &command);
       void                  HandleLogicalAddressLost(cec_logical_address oldAddress);
+      void                  HandlePhysicalAddressChanged(uint16_t iNewAddress);
 
       CCECBusDevice *       GetDevice(cec_logical_address address) const;
       CCECAudioSystem *     GetAudioSystem(void) const;
@@ -176,5 +178,17 @@ namespace CEC
       bool                                        m_bMonitor;
       CCECAllocateLogicalAddress*                 m_addrAllocator;
       bool                                        m_bStallCommunication;
+      CCECStandbyProtection*                      m_connCheck;
+  };
+
+  class CCECStandbyProtection : public PLATFORM::CThread
+  {
+  public:
+    CCECStandbyProtection(CCECProcessor* processor);
+    virtual ~CCECStandbyProtection(void);
+    void* Process(void);
+
+  private:
+    CCECProcessor* m_processor;
   };
 };