8#include "iptunneldevice_p.h"
11NetworkManager::IpTunnelDevicePrivate::IpTunnelDevicePrivate(
const QString &path, IpTunnelDevice *q)
12 : DevicePrivate(
path, q)
21NetworkManager::IpTunnelDevicePrivate::~IpTunnelDevicePrivate()
25NetworkManager::IpTunnelDevice::IpTunnelDevice(
const QString &path,
QObject *parent)
26 : Device(*new IpTunnelDevicePrivate(
path, this), parent)
30 QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
31 if (!initialProperties.isEmpty()) {
32 d->propertiesChanged(initialProperties);
37NetworkManager::IpTunnelDevice::~IpTunnelDevice()
46uchar NetworkManager::IpTunnelDevice::encapsulationLimit()
const
49 return d->encapsulationLimit;
52uint NetworkManager::IpTunnelDevice::flowLabel()
const
58QString NetworkManager::IpTunnelDevice::inputKey()
const
64QString NetworkManager::IpTunnelDevice::local()
const
70uint NetworkManager::IpTunnelDevice::mode()
const
76QString NetworkManager::IpTunnelDevice::outputKey()
const
88bool NetworkManager::IpTunnelDevice::pathMtuDiscovery()
const
91 return d->pathMtuDiscovery;
94QString NetworkManager::IpTunnelDevice::remote()
const
100uchar NetworkManager::IpTunnelDevice::tos()
const
106uchar NetworkManager::IpTunnelDevice::ttl()
const
112void NetworkManager::IpTunnelDevicePrivate::propertyChanged(
const QString &property,
const QVariant &value)
117 encapsulationLimit =
static_cast<ushort
>(value.
toUInt());
118 Q_EMIT q->encapsulationLimitChanged(encapsulationLimit);
120 flowLabel = value.
toUInt();
121 Q_EMIT q->flowLabelChanged(flowLabel);
124 Q_EMIT q->inputKeyChanged(inputKey);
127 Q_EMIT q->localChanged(local);
130 Q_EMIT q->modeChanged(mode);
133 Q_EMIT q->outputKeyChanged(outputKey);
136 Q_EMIT q->parentChanged(parent);
138 pathMtuDiscovery = value.
toBool();
139 Q_EMIT q->pathMtuDiscoveryChanged(pathMtuDiscovery);
142 Q_EMIT q->remoteChanged(remote);
144 tos =
static_cast<ushort
>(value.
toUInt());
145 Q_EMIT q->tosChanged(tos);
147 ttl =
static_cast<ushort
>(value.
toUInt());
148 Q_EMIT q->ttlChanged(ttl);
150 DevicePrivate::propertyChanged(property, value);
154#include "moc_iptunneldevice.cpp"
155#include "moc_iptunneldevice_p.cpp"
@ IpTunnel
IP Tunneling Device.
A Ip Tunnel device interface.
Type type() const override
Retrieves the interface type.
QString path(const QString &relativePath)
NETWORKMANAGERQT_EXPORT Device::Ptr findNetworkInterface(const QString &uni)
Find a new NetworkInterface object given its UNI.
bool toBool() const const
QString toString() const const
uint toUInt(bool *ok) const const