9#include "tundevice_p.h"
11NetworkManager::TunDevicePrivate::TunDevicePrivate(
const QString &path, TunDevice *q)
12 : DevicePrivate(
path, q)
21NetworkManager::TunDevicePrivate::~TunDevicePrivate()
25NetworkManager::TunDevice::TunDevice(
const QString &path,
QObject *parent)
26 : Device(*new TunDevicePrivate(
path, this), parent)
30 QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
31 if (!initialProperties.isEmpty()) {
32 d->propertiesChanged(initialProperties);
36NetworkManager::TunDevice::~TunDevice()
45qlonglong NetworkManager::TunDevice::owner()
const
51qlonglong NetworkManager::TunDevice::group()
const
57QString NetworkManager::TunDevice::mode()
const
63bool NetworkManager::TunDevice::multiQueue()
const
69bool NetworkManager::TunDevice::noPi()
const
75bool NetworkManager::TunDevice::vnetHdr()
const
81QString NetworkManager::TunDevice::hwAddress()
const
87void NetworkManager::TunDevicePrivate::propertyChanged(
const QString &property,
const QVariant &value)
93 Q_EMIT q->ownerChanged(owner);
96 Q_EMIT q->groupChanged(group);
97 }
else if (property == QLatin1String(
"Mode")) {
99 Q_EMIT q->modeChanged(mode);
100 }
else if (property == QLatin1String(
"MultiQueue")) {
101 multiQueue = value.
toBool();
102 Q_EMIT q->multiQueueChanged(multiQueue);
103 }
else if (property == QLatin1String(
"NoPi")) {
105 Q_EMIT q->noPiChanged(noPi);
106 }
else if (property == QLatin1String(
"VnetHdr")) {
108 Q_EMIT q->vnetHdrChanged(vnetHdr);
109 }
else if (property == QLatin1String(
"HwAddress")) {
111 Q_EMIT q->hwAddressChanged(hwAddress);
113 DevicePrivate::propertyChanged(property, value);
117#include "moc_tundevice.cpp"
118#include "moc_tundevice_p.cpp"
Type type() const override
Retrieves the interface type.
QString path(const QString &relativePath)
bool toBool() const const
qlonglong toLongLong(bool *ok) const const
QString toString() const const