7#include "activeconnection.h"
10#include <QDBusConnection>
12ActiveConnection::ActiveConnection(
QObject *parent)
28ActiveConnection::~ActiveConnection()
37bool ActiveConnection::default4()
const
42bool ActiveConnection::default6()
const
62QString ActiveConnection::id()
const
84 return m_specificObject;
87uint ActiveConnection::state()
const
92QString ActiveConnection::type()
const
97bool ActiveConnection::vpn()
const
102QString ActiveConnection::uuid()
const
114 m_devices.removeAll(device);
117QString ActiveConnection::activeConnectionPath()
const
119 return m_activeConnectionPath;
122void ActiveConnection::setActiveConnectionPath(
const QString &path)
124 m_activeConnectionPath =
path;
129 m_connection = connection;
132 if (usedConnection) {
133 NMVariantMapMap settings = usedConnection->GetSettings();
134 setId(settings.
value(QLatin1String(
"connection")).value(QLatin1String(
"id")).
toString());
135 setUuid(settings.
value(QLatin1String(
"connection")).value(QLatin1String(
"uuid")).
toString());
136 setType(settings.
value(QLatin1String(
"connection")).value(QLatin1String(
"type")).
toString());
140void ActiveConnection::setDefault4(
bool default4)
142 m_default4 = default4;
145void ActiveConnection::setDefault6(
bool default6)
147 m_default6 = default6;
150void ActiveConnection::setDhcp4Config(
const QDBusObjectPath &dhcp4Config)
152 m_dhcp4Config = dhcp4Config;
155void ActiveConnection::setDhcp6Config(
const QDBusObjectPath &dhcp6Config)
157 m_dhcp6Config = dhcp6Config;
160void ActiveConnection::setId(
const QString &
id)
167 m_ip4Config = ipv4Config;
172 m_ip6Config = ipv6Config;
180void ActiveConnection::setSpecificObject(
const QDBusObjectPath &specificObject)
182 m_specificObject = specificObject;
185void ActiveConnection::setState(uint state)
190void ActiveConnection::setType(
const QString &type)
194 if (type == QLatin1String(
"vpn")) {
199void ActiveConnection::setUuid(
const QString &uuid)
204#include "moc_activeconnection.cpp"
char * toString(const EngineQuery &query)
QString path(const QString &relativePath)
QObject * objectRegisteredAt(const QString &path) const const
QDBusConnection sessionBus()
T value(const Key &key, const T &defaultValue) const const