* http://www.pulse-eight.net/
*/
-#include "USBCECAdapterCommunication.h"
-
namespace CEC
{
+ class CUSBCECAdapterCommunication;
+
class CUSBCECAdapterCommands
{
public:
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);
*/
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.
/*!
* @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);
/*!
* @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);
/*!
* @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);
/*!
* @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);
/*!
* @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);
/*!
* @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);
*/
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 */