9#include "gredevice_p.h"
12NetworkManager::GreDevicePrivate::GreDevicePrivate(
const QString &path, GreDevice *q)
13 : DevicePrivate(
path, q)
22NetworkManager::GreDevicePrivate::~GreDevicePrivate()
26NetworkManager::GreDevice::GreDevice(
const QString &path,
QObject *parent)
27 : Device(*new GreDevicePrivate(
path, this), parent)
31 QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
32 if (!initialProperties.isEmpty()) {
33 d->propertiesChanged(initialProperties);
38NetworkManager::GreDevice::~GreDevice()
47ushort NetworkManager::GreDevice::inputFlags()
const
53ushort NetworkManager::GreDevice::outputFlags()
const
56 return d->outputFlags;
59uint NetworkManager::GreDevice::inputKey()
const
65uint NetworkManager::GreDevice::outputKey()
const
71QString NetworkManager::GreDevice::localEnd()
const
77QString NetworkManager::GreDevice::remoteEnd()
const
83QString NetworkManager::GreDevice::parent()
const
89bool NetworkManager::GreDevice::pathMtuDiscovery()
const
92 return d->pathMtuDiscovery;
95uchar NetworkManager::GreDevice::tos()
const
101uchar NetworkManager::GreDevice::ttl()
const
103 Q_D(
const GreDevice);
107void NetworkManager::GreDevicePrivate::propertyChanged(
const QString &property,
const QVariant &value)
112 inputFlags =
static_cast<ushort
>(value.
toUInt());
113 Q_EMIT q->inputFlagsChanged(inputFlags);
115 outputFlags =
static_cast<ushort
>(value.
toUInt());
116 Q_EMIT q->outputFlagsChanged(outputFlags);
118 inputKey = value.
toUInt();
119 Q_EMIT q->inputKeyChanged(inputKey);
121 outputKey = value.
toUInt();
122 Q_EMIT q->outputKeyChanged(outputKey);
125 Q_EMIT q->localEndChanged(localEnd);
128 Q_EMIT q->remoteEndChanged(remoteEnd);
131 Q_EMIT q->parentChanged(parent);
133 pathMtuDiscovery = value.
toBool();
134 Q_EMIT q->pathMtuDiscoveryChanged(pathMtuDiscovery);
136 tos =
static_cast<uchar
>(value.
toUInt());
137 Q_EMIT q->tosChanged(tos);
139 ttl =
static_cast<uchar
>(value.
toUInt());
140 Q_EMIT q->ttlChanged(ttl);
142 DevicePrivate::propertyChanged(property, value);
146#include "moc_gredevice.cpp"
147#include "moc_gredevice_p.cpp"
Type type() const override
Retrieves the interface type.
QString path(const QString &relativePath)
bool toBool() const const
QString toString() const const
uint toUInt(bool *ok) const const