cec: don't replace a command handler when it's being used
[deb_libcec.git] / src / lib / CECProcessor.h
index e039ce49707d47c9a10c900539f1274ecea0915b..9cb1bf9fe9982a1bc936b8e5d9d0877991bd8320 100644 (file)
@@ -59,6 +59,7 @@ namespace CEC
       virtual bool                  IsMonitoring(void) const { return m_bMonitor; }
       virtual CCECBusDevice *       GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress, bool bRefresh = false) const;
       virtual CCECBusDevice *       GetDeviceByType(cec_device_type type) const;
+      virtual CCECBusDevice *       GetPrimaryDevice(void) const;
       virtual cec_version           GetDeviceCecVersion(cec_logical_address iAddress);
       virtual bool                  GetDeviceMenuLanguage(cec_logical_address iAddress, cec_menu_language *language);
       virtual const std::string &   GetDeviceName(void) { return m_strDeviceName; }
@@ -77,6 +78,7 @@ namespace CEC
       virtual bool                  IsStarted(void) const { return m_bStarted; }
       virtual cec_logical_address   GetActiveSource(void);
       virtual bool                  IsActiveSource(cec_logical_address iAddress);
+      virtual bool                  IsInitialised(void) const { return m_bInitialised; }
 
       virtual bool SetActiveView(void);
       virtual bool SetActiveSource(cec_device_type type = CEC_DEVICE_TYPE_RESERVED);
@@ -93,8 +95,8 @@ namespace CEC
       virtual uint8_t VolumeUp(bool bSendRelease = true);
       virtual uint8_t VolumeDown(bool bSendRelease = true);
       virtual uint8_t MuteAudio(bool bSendRelease = true);
-      virtual bool TransmitKeypress(cec_logical_address iDestination, cec_user_control_code key);
-      virtual bool TransmitKeyRelease(cec_logical_address iDestination);
+      virtual bool TransmitKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = true);
+      virtual bool TransmitKeyRelease(cec_logical_address iDestination, bool bWait = true);
       virtual bool EnablePhysicalAddressDetection(void) { return false; };
       void SetStandardLineTimeout(uint8_t iTimeout);
       void SetRetryLineTimeout(uint8_t iTimeout);
@@ -146,6 +148,7 @@ namespace CEC
       void ParseCommand(cec_command &command);
 
       bool                   m_bStarted;
+      bool                   m_bInitialised;
       uint8_t                m_iHDMIPort;
       cec_logical_address    m_iBaseDevice;
       cec_command            m_currentframe;