2
Copyright 2008 Will Stephenson <wstephenson@kde.org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) version 3, or any
8
later version accepted by the membership of KDE e.V. (or its
9
successor approved by the membership of KDE e.V.), which shall
10
act as a proxy defined in Section 6 of version 3 of the license.
12
This library is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public
18
License along with this library. If not, see <http://www.gnu.org/licenses/>.
21
#include "wirelessaccesspoint.h"
22
#include "frontendobject_p.h"
23
#include "soliddefs_p.h"
24
#include "ifaces/wirelessaccesspoint.h"
30
class AccessPointPrivate : public FrontendObjectPrivate
33
AccessPointPrivate(QObject *parent)
34
: FrontendObjectPrivate(parent) { }
36
void setBackendObject(QObject *object);
41
Solid::Control::AccessPoint::AccessPoint(QObject *backendObject)
42
: QObject(), d_ptr(new AccessPointPrivate(this))
45
d->setBackendObject(backendObject);
48
Solid::Control::AccessPoint::AccessPoint(const AccessPoint &network)
49
: QObject(), d_ptr(new AccessPointPrivate(this))
52
d->setBackendObject(network.d_ptr->backendObject());
55
Solid::Control::AccessPoint::AccessPoint(AccessPointPrivate &dd, QObject *backendObject)
56
: QObject(), d_ptr(&dd)
59
d->setBackendObject(backendObject);
62
Solid::Control::AccessPoint::AccessPoint(AccessPointPrivate &dd, const AccessPoint &ap)
66
d->setBackendObject(ap.d_ptr->backendObject());
69
Solid::Control::AccessPoint::~AccessPoint()
74
QString Solid::Control::AccessPoint::uni() const
76
Q_D(const AccessPoint);
77
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QString(), uni());
80
Solid::Control::AccessPoint::Capabilities Solid::Control::AccessPoint::capabilities() const
82
Q_D(const AccessPoint);
83
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, capabilities());
87
Solid::Control::AccessPoint::WpaFlags Solid::Control::AccessPoint::wpaFlags() const
89
Q_D(const AccessPoint);
90
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, wpaFlags());
94
Solid::Control::AccessPoint::WpaFlags Solid::Control::AccessPoint::rsnFlags() const
96
Q_D(const AccessPoint);
97
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, rsnFlags());
101
QString Solid::Control::AccessPoint::ssid() const
103
Q_D(const AccessPoint);
104
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QString(), ssid());
107
QByteArray Solid::Control::AccessPoint::rawSsid() const
109
Q_D(const AccessPoint);
110
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QByteArray(), rawSsid());
113
uint Solid::Control::AccessPoint::frequency() const
115
Q_D(const AccessPoint);
116
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, frequency());
120
QString Solid::Control::AccessPoint::hardwareAddress() const
122
Q_D(const AccessPoint);
123
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), QString(), hardwareAddress());
127
uint Solid::Control::AccessPoint::maxBitRate() const
129
Q_D(const AccessPoint);
130
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, maxBitRate());
133
Solid::Control::WirelessNetworkInterface::OperationMode Solid::Control::AccessPoint::mode() const
135
Q_D(const AccessPoint);
136
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), (Solid::Control::WirelessNetworkInterface::OperationMode)0, mode());
139
int Solid::Control::AccessPoint::signalStrength() const
141
Q_D(const AccessPoint);
142
return_SOLID_CALL(Ifaces::AccessPoint *, d->backendObject(), 0, signalStrength());
145
void Solid::Control::AccessPointPrivate::setBackendObject(QObject *object)
147
FrontendObjectPrivate::setBackendObject(object);
150
QObject::connect(object, SIGNAL(signalStrengthChanged(int)),
151
parent(), SIGNAL(signalStrengthChanged(int)));
152
QObject::connect(object, SIGNAL(bitRateChanged(int)),
153
parent(), SIGNAL(bitRateChanged(int)));
154
QObject::connect(object, SIGNAL(wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags)),
155
parent(), SIGNAL(wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags)));
156
QObject::connect(object, SIGNAL(rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags)),
157
parent(), SIGNAL(rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags)));
158
QObject::connect(object, SIGNAL(ssidChanged(const QString&)),
159
parent(), SIGNAL(ssidChanged(const QString&)));
160
QObject::connect(object, SIGNAL(frequencyChanged(uint)),
161
parent(), SIGNAL(frequencyChanged(uint)));
165
void Solid::Control::AccessPoint::_k_destroyed(QObject *object)
171
#include "wirelessaccesspoint.moc"