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

#include "pppoedbus.h"

#include "pppoe.h"

PppoeDbus::PppoeDbus(Knm::PppoeSetting * setting) : SettingDbus(setting)
{
}

PppoeDbus::~PppoeDbus()
{
}

void PppoeDbus::fromMap(const QVariantMap & map)
{
  Knm::PppoeSetting * setting = static_cast<Knm::PppoeSetting *>(m_setting);
  if (map.contains("service")) {
    setting->setService(map.value("service").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 PppoeDbus::toMap()
{
  QVariantMap map;
  Knm::PppoeSetting * setting = static_cast<Knm::PppoeSetting *>(m_setting);
  map.insert("service", setting->service());
  map.insert("username", setting->username());
  return map;
}

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

