// This file is generated by kconfig_compiler from cdma.kcfg.
// All changes you do to this file will be lost.

#include "cdmapersistence.h"

using namespace Knm;

CdmaPersistence::CdmaPersistence(CdmaSetting * setting, KSharedConfig::Ptr config, SettingPersistence::SecretStorageMode mode) : SettingPersistence(setting, config, mode)
{
}

CdmaPersistence::~CdmaPersistence()
{
}

void CdmaPersistence::load()
{
  CdmaSetting * setting = static_cast<CdmaSetting *>(m_setting);
  setting->setNumber(m_config->readEntry("number", ""));
  setting->setUsername(m_config->readEntry("username", ""));
  // SECRET
  if (m_storageMode == SettingPersistence::PlainText) {
    setting->setPassword(m_config->readEntry("password", ""));
    setting->setSecretsAvailable(true);
  }
  setting->setPasswordflags(Setting::AgentOwned);
}
