8#include "dhcp4config.h"
9#include "dhcp4config_p.h"
13NetworkManager::Dhcp4ConfigPrivate::Dhcp4ConfigPrivate(
const QString &path, Dhcp4Config *q)
24NetworkManager::Dhcp4ConfigPrivate::~Dhcp4ConfigPrivate()
28NetworkManager::Dhcp4Config::Dhcp4Config(
const QString &path,
QObject *owner)
29 : d_ptr(new Dhcp4ConfigPrivate(
path, this))
36 NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
40 d->options = d->dhcp4Iface.options();
43NetworkManager::Dhcp4Config::~Dhcp4Config()
48QString NetworkManager::Dhcp4Config::path()
const
50 Q_D(
const Dhcp4Config);
54QVariantMap NetworkManager::Dhcp4Config::options()
const
56 Q_D(
const Dhcp4Config);
60QString NetworkManager::Dhcp4Config::optionValue(
const QString &key)
const
62 Q_D(
const Dhcp4Config);
64 if (d->options.contains(key)) {
65 value = d->options.value(key).toString();
70void NetworkManager::Dhcp4ConfigPrivate::dbusPropertiesChanged(
const QString &interfaceName,
71 const QVariantMap &properties,
74 Q_UNUSED(invalidatedProperties);
75 if (interfaceName ==
QLatin1String(
"org.freedesktop.NetworkManager.DHCP4Config")) {
76 dhcp4PropertiesChanged(properties);
80void NetworkManager::Dhcp4ConfigPrivate::dhcp4PropertiesChanged(
const QVariantMap &properties)
84 QVariantMap::const_iterator it =
properties.constBegin();
86 const QString property = it.key();
88 options = it.value().toMap();
89 Q_EMIT q->optionsChanged(options);
91 qCWarning(NMQT) << Q_FUNC_INFO <<
"Unhandled property" << property;
97#include "moc_dhcp4config.cpp"
98#include "moc_dhcp4config_p.cpp"
QString path(const QString &relativePath)
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
QDBusConnection sessionBus()
QDBusConnection systemBus()