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

#include "bluetoothdbus.h"

#include "bluetooth.h"

BluetoothDbus::BluetoothDbus(Knm::BluetoothSetting * setting) : SettingDbus(setting)
{
}

BluetoothDbus::~BluetoothDbus()
{
}

void BluetoothDbus::fromMap(const QVariantMap & map)
{
  Knm::BluetoothSetting * setting = static_cast<Knm::BluetoothSetting *>(m_setting);
  if (map.contains(NM_SETTING_BLUETOOTH_BDADDR)) {
    setting->setBdaddr(map.value(NM_SETTING_BLUETOOTH_BDADDR).value<QByteArray>());
  }
  if (map.contains(NM_SETTING_BLUETOOTH_TYPE)) {
    setting->setNetworktype(map.value(NM_SETTING_BLUETOOTH_TYPE).value<QString>());
  }
}

QVariantMap BluetoothDbus::toMap()
{
  QVariantMap map;
  Knm::BluetoothSetting * setting = static_cast<Knm::BluetoothSetting *>(m_setting);
  if (!setting->bdaddr().isEmpty())
      map.insert(NM_SETTING_BLUETOOTH_BDADDR, setting->bdaddr());
  if (!setting->networktype().isEmpty())
      map.insert(NM_SETTING_BLUETOOTH_TYPE, setting->networktype());
  return map;
}

QVariantMap BluetoothDbus::toSecretsMap()
{
  QVariantMap map;
  return map;
}

