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

#include "cdmadbus.h"

#include "cdma.h"

CdmaDbus::CdmaDbus(Knm::CdmaSetting * setting) : SettingDbus(setting)
{
}

CdmaDbus::~CdmaDbus()
{
}

void CdmaDbus::fromMap(const QVariantMap & map)
{
  Knm::CdmaSetting * setting = static_cast<Knm::CdmaSetting *>(m_setting);
  if (map.contains("number")) {
    setting->setNumber(map.value("number").value<QString>());
  }
  if (map.contains("username")) {
    setting->setUsername(map.value("username").value<QString>());
  }
  // SECRET
  if (map.contains("password")) {
    setting->setPassword(map.value("password").value<QString>());
  }
}

QVariantMap CdmaDbus::toMap()
{
  QVariantMap map;
  Knm::CdmaSetting * setting = static_cast<Knm::CdmaSetting *>(m_setting);
  map.insert("number", setting->number());
  map.insert("username", setting->username());
  return map;
}

QVariantMap CdmaDbus::toSecretsMap()
{
  QVariantMap map;
  Knm::CdmaSetting * setting = static_cast<Knm::CdmaSetting *>(m_setting);
  map.insert("password", setting->password());
  return map;
}

