LibCecSharp: fixed - set the primary LA in CecLogicalAddresses
[deb_libcec.git] / src / lib / adapter / Pulse-Eight / USBCECAdapterCommands.h
similarity index 93%
rename from src/lib/adapter/USBCECAdapterCommands.h
rename to src/lib/adapter/Pulse-Eight/USBCECAdapterCommands.h
index 70feae9c70c1795e835b7390401cf12c4501921d..ff0c187e89fc9e7e76544e68d69f37730238fda3 100644 (file)
  *     http://www.pulse-eight.net/
  */
 
-#include "USBCECAdapterCommunication.h"
-
 namespace CEC
 {
+  class CUSBCECAdapterCommunication;
+
   class CUSBCECAdapterCommands
   {
   public:
@@ -52,10 +52,10 @@ namespace CEC
     uint16_t GetFirmwareVersion(void) const { return m_persistedConfiguration.iFirmwareVersion; };
 
     /*!
-     * @brief Persist the current configuration in the EEPROM.
+     * @brief Update the current configuration in the adapter. Does not do an eeprom update.
      * @attention Not all settings are persisted at this time.
      * @param configuration The configuration to persist.
-     * @return True when persisted, false otherwise.
+     * @return True when something changed, false otherwise.
      */
     bool PersistConfiguration(const libcec_configuration &configuration);
 
@@ -111,6 +111,12 @@ namespace CEC
      */
     uint32_t GetPersistedBuildDate(void) const { return m_iBuildDate; };
 
+    /*!
+     * @brief Persist the current settings in the EEPROM
+     * @return True when persisted, false otherwise.
+     */
+    bool WriteEEPROM(void);
+
   private:
     /*!
      * @brief Reads all settings from the eeprom.
@@ -128,7 +134,7 @@ namespace CEC
     /*!
      * @brief Change the value of the "auto enabled" setting.
      * @param enabled The new value.
-     * @return True when set, false otherwise.
+     * @return True when changed and set, false otherwise.
      */
     bool SetSettingAutoEnabled(bool enabled);
 
@@ -141,7 +147,7 @@ namespace CEC
     /*!
      * @brief Change the value of the "device type" setting, used when the device is in autonomous mode.
      * @param type The new value.
-     * @return True when set, false otherwise.
+     * @return True when changed and set, false otherwise.
      */
     bool SetSettingDeviceType(cec_device_type type);
 
@@ -154,7 +160,7 @@ namespace CEC
     /*!
      * @brief Change the value of the "default logical address" setting, used when the device is in autonomous mode.
      * @param address The new value.
-     * @return True when set, false otherwise.
+     * @return True when changed and set, false otherwise.
      */
     bool SetSettingDefaultLogicalAddress(cec_logical_address address);
 
@@ -167,7 +173,7 @@ namespace CEC
     /*!
      * @brief Change the value of the "logical address mask" setting, used when the device is in autonomous mode.
      * @param iMask The new value.
-     * @return True when set, false otherwise.
+     * @return True when changed and set, false otherwise.
      */
     bool SetSettingLogicalAddressMask(uint16_t iMask);
 
@@ -180,7 +186,7 @@ namespace CEC
     /*!
      * @brief Change the value of the "physical address" setting, used when the device is in autonomous mode.
      * @param iPhysicalAddress The new value.
-     * @return True when set, false otherwise.
+     * @return True when changed and set, false otherwise.
      */
     bool SetSettingPhysicalAddress(uint16_t iPhysicalAddress);
 
@@ -193,7 +199,7 @@ namespace CEC
     /*!
      * @brief Change the value of the "CEC version" setting, used when the device is in autonomous mode.
      * @param version The new value.
-     * @return True when set, false otherwise.
+     * @return True when changed and set, false otherwise.
      */
     bool SetSettingCECVersion(cec_version version);
 
@@ -216,12 +222,6 @@ namespace CEC
      */
     bool RequestSettingOSDName(void);
 
-    /*!
-     * @brief Persist the current settings in the EEPROM
-     * @return True when persisted, false otherwise.
-     */
-    bool WriteEEPROM(void);
-
     CUSBCECAdapterCommunication *m_comm;                   /**< the communication handler */
     bool                         m_bSettingsRetrieved;     /**< true when the settings were read from the eeprom, false otherwise */
     bool                         m_bSettingAutoEnabled;    /**< the value of the auto-enabled setting */