removed deprecated methods and fields
[deb_libcec.git] / src / lib / LibCEC.h
index 6b23dacc55f2c84c487bc069690ccfddd303df7e..8ce02ab3043c87c91d2545c8a442aefb570635bf 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 #include <string>
-#include "../../include/cec.h"
+#include "cec.h"
 #include "platform/util/buffer.h"
 
 namespace CEC
@@ -44,7 +44,8 @@ namespace CEC
   class CLibCEC : public ICECAdapter
   {
     public:
-      CLibCEC(void);
+      CLibCEC(const char *strDeviceName, cec_device_type_list types, uint16_t iPhysicalAddress = 0);
+      CLibCEC(libcec_configuration *configuration);
       virtual ~CLibCEC(void);
 
     /*!
@@ -58,21 +59,12 @@ namespace CEC
       bool PingAdapter(void);
       bool StartBootloader(void);
 
-      int8_t GetMinLibVersion(void) const   { return CEC_MIN_LIB_VERSION; };
-      int8_t GetLibVersionMajor(void) const { return CEC_LIB_VERSION_MAJOR; };
-      int8_t GetLibVersionMinor(void) const { return CEC_LIB_VERSION_MINOR; };
-
-      bool GetNextLogMessage(cec_log_message *message);
-      bool GetNextKeypress(cec_keypress *key);
-      bool GetNextCommand(cec_command *command);
-
       bool Transmit(const cec_command &data);
       bool SetLogicalAddress(cec_logical_address iLogicalAddress = CECDEVICE_PLAYBACKDEVICE1);
       bool SetPhysicalAddress(uint16_t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS);
 
       bool PowerOnDevices(cec_logical_address address = CECDEVICE_TV);
       bool StandbyDevices(cec_logical_address address = CECDEVICE_BROADCAST);
-      bool SetActiveView(void);
       bool SetActiveSource(cec_device_type type = CEC_DEVICE_TYPE_RESERVED);
       bool SetDeckControlMode(cec_deck_control_mode mode, bool bSendUpdate = true);
       bool SetDeckInfo(cec_deck_info info, bool bSendUpdate = true);
@@ -80,14 +72,11 @@ namespace CEC
       bool SetMenuState(cec_menu_state state, bool bSendUpdate = true);
       bool SetOSDString(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage);
       bool SwitchMonitoring(bool bEnable);
-
       cec_version GetDeviceCecVersion(cec_logical_address iAddress);
       bool GetDeviceMenuLanguage(cec_logical_address iAddress, cec_menu_language *language);
       uint64_t GetDeviceVendorId(cec_logical_address iAddress);
       uint16_t GetDevicePhysicalAddress(cec_logical_address iAddress);
       cec_power_status GetDevicePowerStatus(cec_logical_address iAddress);
-      cec_osd_name GetDeviceOSDName(cec_logical_address iAddress);
-
       bool PollDevice(cec_logical_address iAddress);
       cec_logical_addresses GetActiveDevices(void);
       bool IsActiveDevice(cec_logical_address iAddress);
@@ -98,7 +87,7 @@ namespace CEC
       uint8_t MuteAudio(bool bSendRelease = true);
       bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = true);
       bool SendKeyRelease(cec_logical_address iDestination, bool bWait = true);
-      bool EnablePhysicalAddressDetection(void);
+      cec_osd_name GetDeviceOSDName(cec_logical_address iAddress);
       cec_logical_address GetActiveSource(void);
       bool IsActiveSource(cec_logical_address iAddress);
       bool SetStreamPath(cec_logical_address iAddress);
@@ -125,27 +114,33 @@ namespace CEC
       const char *ToString(const cec_server_version version);
       const char *ToString(const cec_device_type type);
 
-      static bool IsValidPhysicalAddress(uint16_t iPhysicalAddress);
-
       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);
 
       bool GetDeviceInformation(const char *strPort, libcec_configuration *config, uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT);
     //@}
-      void AddLog(const cec_log_level level, const char *strFormat, ...);
 
+      void AddLog(const cec_log_level level, const char *strFormat, ...);
+      void AddCommand(const cec_command &command);
       void CheckKeypressTimeout(void);
       void Alert(const libcec_alert type, const libcec_parameter &param);
 
-      CCECClient *RegisterClient(libcec_configuration *configuration);
+      static bool IsValidPhysicalAddress(uint16_t iPhysicalAddress);
+      CCECClient *RegisterClient(libcec_configuration &configuration);
       void UnregisterClients(void);
-    protected:
+      std::vector<CCECClient *> GetClients(void) { return m_clients; };
+      const char *GetLibInfo(void);
+      const char *ToString(const cec_user_control_code key);
+      void InitVideoStandalone(void);
+      const char *ToString(const cec_adapter_type type);
+
       CCECProcessor *           m_cec;
-      CCECClient *              m_client;
 
+    protected:
       int64_t                   m_iStartTime;
       PLATFORM::CMutex          m_mutex;
+      CCECClient *              m_client;
       std::vector<CCECClient *> m_clients;
   };
 };