10#include "wimaxdevice.h"
11#include "wimaxnsp_p.h"
19 return NetworkManager::WimaxNsp::Unknown;
21 return NetworkManager::WimaxNsp::Home;
23 return NetworkManager::WimaxNsp::Partner;
25 return NetworkManager::WimaxNsp::RoamingPartner;
27 return NetworkManager::WimaxNsp::Unknown;
32NetworkManager::WimaxNspPrivate::WimaxNspPrivate(
const QString &path, WimaxNsp *q)
38 , networkType(WimaxNsp::Unknown)
44NetworkManager::WimaxNsp::WimaxNsp(
const QString &path,
QObject *parent)
46 , d_ptr(new WimaxNspPrivate(
path, this))
50 if (d->iface.isValid()) {
51 connect(&d->iface, &OrgFreedesktopNetworkManagerWiMaxNspInterface::PropertiesChanged, d, &WimaxNspPrivate::propertiesChanged);
52 d->networkType = convertNetworkType(d->iface.networkType());
53 d->name = d->iface.name();
54 d->signalQuality = d->iface.signalQuality();
58NetworkManager::WimaxNsp::~WimaxNsp()
64QString NetworkManager::WimaxNsp::uni()
const
73 return d->networkType;
85 return d->signalQuality;
88void NetworkManager::WimaxNspPrivate::propertiesChanged(
const QVariantMap &properties)
92 QVariantMap::const_iterator it = properties.constBegin();
93 while (it != properties.constEnd()) {
94 const QString property = it.key();
96 name = it->toString();
97 Q_EMIT q->nameChanged(name);
99 networkType = convertNetworkType(it->toUInt());
100 Q_EMIT q->networkTypeChanged(networkType);
102 signalQuality = it->toUInt();
103 Q_EMIT q->signalQualityChanged(signalQuality);
105 qCWarning(NMQT) << Q_FUNC_INFO <<
"Unhandled property" << property;
111#include "moc_wimaxnsp.cpp"
112#include "moc_wimaxnsp_p.cpp"
Wimax network service provider (access point)
QString name() const
The name of the NSP.
NetworkType
network types a NSP can have
NetworkType networkType() const
The network type of the NSP.
uint signalQuality() const
The current signal quality of the NSP, in percent.
QString path(const QString &relativePath)
This class allows querying the underlying system to discover the available network interfaces and rea...
QDBusConnection sessionBus()
QDBusConnection systemBus()
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)