cec: async writes for CUSBCECAdapterCommunication. less locks and polls, more speed
[deb_libcec.git] / src / lib / LibCEC.h
index e2e815392d1bef72bd31b5ef4998b3cc35a1a722..e45980075b51cdee4d6ce32b9e2a3acaa0bf367b 100644 (file)
@@ -121,6 +121,13 @@ namespace CEC
       const char *ToString(const cec_vendor_id vendor);
       const char *ToString(const cec_client_version version);
       const char *ToString(const cec_server_version version);
+      const char *ToString(const cec_device_type type);
+
+      static cec_device_type GetType(cec_logical_address address);
+      static uint16_t GetMaskForType(cec_logical_address address);
+      static uint16_t GetMaskForType(cec_device_type type);
+
+      virtual bool GetDeviceInformation(const char *strPort, libcec_configuration *config, uint32_t iTimeoutMs = 10000);
     //@}
 
       static void AddLog(const cec_log_level level, const char *strFormat, ...);
@@ -130,20 +137,23 @@ namespace CEC
       static void ConfigurationChanged(const libcec_configuration &config);
       static void SetCurrentButton(cec_user_control_code iButtonCode);
       virtual void CheckKeypressTimeout(void);
+      static int MenuStateChanged(const cec_menu_state newState);
+      static void Alert(const libcec_alert type, const libcec_parameter &param);
 
       static CLibCEC *GetInstance(void);
       static void SetInstance(CLibCEC *instance);
 
+      CCECProcessor *                         m_cec;
     protected:
       int64_t                                 m_iStartTime;
       cec_user_control_code                   m_iCurrentButton;
       int64_t                                 m_buttontime;
-      CCECProcessor *                         m_cec;
       PLATFORM::SyncedBuffer<cec_log_message> m_logBuffer;
       PLATFORM::SyncedBuffer<cec_keypress>    m_keyBuffer;
       PLATFORM::SyncedBuffer<cec_command>     m_commandBuffer;
       ICECCallbacks *                         m_callbacks;
       void *                                  m_cbParam;
       PLATFORM::CMutex                        m_mutex;
+      PLATFORM::CMutex                        m_logMutex;
   };
 };