cec: added Toshiba's vendor id, and set the device ID of the primary device to Toshib...
[deb_libcec.git] / src / lib / devices / CECBusDevice.h
index 79ae987b654b1a72399cd0a2dd08b521bea8b3ce..30ac2dc788df51c50251eaae0c8a4488799ccc03 100644 (file)
@@ -31,7 +31,7 @@
  *     http://www.pulse-eight.net/
  */
 
-#include <cectypes.h>
+#include "../../../include/cectypes.h"
 #include <set>
 #include "../platform/threads/mutex.h"
 #include "../platform/util/StdString.h"
@@ -40,12 +40,10 @@ namespace CEC
 {
   class CCECProcessor;
   class CCECCommandHandler;
-  class CSLCommandHandler;
 
   class CCECBusDevice
   {
     friend class CCECProcessor;
-    friend class CSLCommandHandler;
 
   public:
     CCECBusDevice(CCECProcessor *processor, cec_logical_address address, uint16_t iPhysicalAddress = 0);
@@ -96,6 +94,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);
@@ -107,8 +106,12 @@ namespace CEC
     virtual bool TransmitKeypress(cec_user_control_code key, bool bWait = true);
     virtual bool TransmitKeyRelease(bool bWait = true);
 
+    bool ReplaceHandler(bool bActivateSource = true);
+
   protected:
-    bool ReplaceHandler(bool bInitHandler = true);
+    void CheckVendorIdRequested(void);
+    void MarkBusy(void);
+    void MarkReady(void);
 
     bool RequestCecVersion(void);
     bool RequestMenuLanguage(void);
@@ -139,6 +142,9 @@ namespace CEC
     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;
   };
 };