cec: only switch handlers once when using the generic handler
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.h
index 70763c8e3182cb15508f83d2cf144f2b2250a871..afd1315afa02d473a3ed24fe691b99d083cd1079 100644 (file)
@@ -48,7 +48,8 @@ namespace CEC
     virtual ~CCECCommandHandler(void);
 
     virtual bool HandleCommand(const cec_command &command);
-    virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_UNKNOWN; };
+    virtual cec_vendor_id GetVendorId(void) { return m_vendorId; };
+    virtual void SetVendorId(cec_vendor_id vendorId) { m_vendorId = vendorId; }
     virtual void HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination);
     virtual bool HandleReceiveFailed(void);
 
@@ -142,6 +143,7 @@ namespace CEC
     uint8_t        m_iUseCounter;
     cec_opcode     m_expectedResponse;
     bool           m_bOPTSendDeckStatusUpdateOnActiveSource;
+    cec_vendor_id  m_vendorId;
     CMutex         m_receiveMutex;
     CCondition     m_condition;
   };