cec: fixed missing virtual keyword in CCECCommandHandler::GetReplacementDeviceType...
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.h
index 93892709ff0fa01534b5d4c7c24b518d6f0387bc..1ede44210f97c8e6a56c1f22631a5c15e3952f33 100644 (file)
@@ -77,7 +77,7 @@ namespace CEC
       m_waitingFor.clear();
     }
 
-    bool Wait(cec_opcode opcode, uint32_t iTimeout = 2000)
+    bool Wait(cec_opcode opcode, uint32_t iTimeout = CEC_DEFAULT_TRANSMIT_WAIT)
     {
       CResponse *response = GetEvent(opcode);
       return response ? response->Wait(iTimeout) : false;
@@ -132,6 +132,7 @@ namespace CEC
     virtual bool PowerOn(const cec_logical_address iInitiator, const cec_logical_address iDestination);
     virtual bool TransmitImageViewOn(const cec_logical_address iInitiator, const cec_logical_address iDestination);
     virtual bool TransmitStandby(const cec_logical_address iInitiator, const cec_logical_address iDestination);
+    virtual bool TransmitRequestActiveSource(const cec_logical_address iInitiator, bool bWaitForResponse = true);
     virtual bool TransmitRequestCecVersion(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWaitForResponse = true);
     virtual bool TransmitRequestMenuLanguage(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWaitForResponse = true);
     virtual bool TransmitRequestOSDName(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWaitForResponse = true);
@@ -157,6 +158,13 @@ namespace CEC
     virtual bool TransmitKeyRelease(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWait = true);
     virtual bool TransmitSetStreamPath(uint16_t iStreamPath);
     virtual bool SendDeckStatusUpdateOnActiveSource(void) const { return m_bOPTSendDeckStatusUpdateOnActiveSource; };
+    virtual bool TransmitPendingActiveSourceCommands(void) { return true; }
+
+    virtual void SignalOpcode(cec_opcode opcode);
+
+    virtual bool ActiveSourcePending(void);
+    virtual bool SupportsDeviceType(const cec_device_type UNUSED(type)) const { return true; };
+    virtual cec_device_type GetReplacementDeviceType(const cec_device_type type) const { return type; }
 
   protected:
     virtual bool HandleActiveSource(const cec_command &command);
@@ -199,12 +207,11 @@ namespace CEC
     virtual size_t GetMyDevices(std::vector<CCECBusDevice *> &devices) const;
     virtual CCECBusDevice *GetDevice(cec_logical_address iLogicalAddress) const;
     virtual CCECBusDevice *GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress) const;
-    virtual CCECBusDevice *GetDeviceByType(cec_device_type type) const;
 
     virtual bool SetVendorId(const cec_command &command);
     virtual void SetPhysicalAddress(cec_logical_address iAddress, uint16_t iNewAddress);
 
-    virtual bool Transmit(cec_command &command, bool bExpectResponse = true, cec_opcode expectedResponse = CEC_OPCODE_NONE);
+    virtual bool Transmit(cec_command &command, bool bSuppressWait = false);
 
     CCECBusDevice *                       m_busDevice;
     CCECProcessor *                       m_processor;
@@ -215,5 +222,7 @@ namespace CEC
     bool                                  m_bOPTSendDeckStatusUpdateOnActiveSource;
     cec_vendor_id                         m_vendorId;
     CWaitForResponse                     *m_waitForResponse;
+    bool                                  m_bActiveSourcePending;
+    PLATFORM::CMutex                      m_mutex;
   };
 };