8#include "wimaxsetting.h"
9#include "wimaxsetting_p.h"
13NetworkManager::WimaxSettingPrivate::WimaxSettingPrivate()
14 : name(NM_SETTING_WIMAX_SETTING_NAME)
18NetworkManager::WimaxSetting::WimaxSetting()
19 : Setting(Setting::Wimax)
20 , d_ptr(new WimaxSettingPrivate())
24NetworkManager::WimaxSetting::WimaxSetting(
const Ptr &other)
26 , d_ptr(new WimaxSettingPrivate())
28 setNetworkName(other->networkName());
29 setMacAddress(other->macAddress());
32NetworkManager::WimaxSetting::~WimaxSetting()
44void NetworkManager::WimaxSetting::setNetworkName(
const QString &name)
48 d->networkName = name;
51QString NetworkManager::WimaxSetting::networkName()
const
53 Q_D(
const WimaxSetting);
55 return d->networkName;
58void NetworkManager::WimaxSetting::setMacAddress(
const QByteArray &address)
65QByteArray NetworkManager::WimaxSetting::macAddress()
const
67 Q_D(
const WimaxSetting);
74 if (setting.contains(
QLatin1String(NM_SETTING_WIMAX_NETWORK_NAME))) {
75 setNetworkName(setting.value(
QLatin1String(NM_SETTING_WIMAX_NETWORK_NAME)).toString());
78 if (setting.contains(
QLatin1String(NM_SETTING_WIMAX_MAC_ADDRESS))) {
79 setMacAddress(setting.value(
QLatin1String(NM_SETTING_WIMAX_MAC_ADDRESS)).toByteArray());
87 if (!networkName().isEmpty()) {
88 setting.insert(
QLatin1String(NM_SETTING_WIMAX_NETWORK_NAME), networkName());
91 if (!macAddress().isEmpty()) {
92 setting.insert(
QLatin1String(NM_SETTING_WIMAX_MAC_ADDRESS), macAddress());
100 dbg.
nospace() <<
"type: " << setting.typeAsString(setting.type()) <<
'\n';
101 dbg.
nospace() <<
"initialized: " << !setting.isNull() <<
'\n';
103 dbg.
nospace() << NM_SETTING_WIMAX_NETWORK_NAME <<
": " << setting.networkName() <<
'\n';
104 dbg.
nospace() << NM_SETTING_WIMAX_MAC_ADDRESS <<
": " << setting.macAddress() <<
'\n';
Represents wimax setting.
void fromMap(const QVariantMap &setting) override
Must be reimplemented, default implementation does nothing.
QVariantMap toMap() const override
Must be reimplemented, default implementationd does nothing.
QString name() const override
Must be reimplemented, default implementationd does nothing.
PostalAddress address(const QVariant &location)