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 uint
Solid::Control::AccessPoint::frequency() const
109 Q_D(const AccessPoint
);
110 return_SOLID_CALL(Ifaces::AccessPoint
*, d
->backendObject(), 0, frequency());
114 QString
Solid::Control::AccessPoint::hardwareAddress() const
116 Q_D(const AccessPoint
);
117 return_SOLID_CALL(Ifaces::AccessPoint
*, d
->backendObject(), QString(), hardwareAddress());
121 uint
Solid::Control::AccessPoint::maxBitRate() const
123 Q_D(const AccessPoint
);
124 return_SOLID_CALL(Ifaces::AccessPoint
*, d
->backendObject(), 0, maxBitRate());
127 Solid::Control::WirelessNetworkInterface::OperationMode
Solid::Control::AccessPoint::mode() const
129 Q_D(const AccessPoint
);
130 return_SOLID_CALL(Ifaces::AccessPoint
*, d
->backendObject(), (Solid::Control::WirelessNetworkInterface::OperationMode
)0, mode());
133 int Solid::Control::AccessPoint::signalStrength() const
135 Q_D(const AccessPoint
);
136 return_SOLID_CALL(Ifaces::AccessPoint
*, d
->backendObject(), 0, signalStrength());
139 void Solid::Control::AccessPointPrivate::setBackendObject(QObject
*object
)
141 FrontendObjectPrivate::setBackendObject(object
);
144 QObject::connect(object
, SIGNAL(signalStrengthChanged(int)),
145 parent(), SIGNAL(signalStrengthChanged(int)));
146 QObject::connect(object
, SIGNAL(bitRateChanged(int)),
147 parent(), SIGNAL(bitRateChanged(int)));
148 QObject::connect(object
, SIGNAL(wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags
)),
149 parent(), SIGNAL(wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags
)));
150 QObject::connect(object
, SIGNAL(rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags
)),
151 parent(), SIGNAL(rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags
)));
152 QObject::connect(object
, SIGNAL(ssidChanged(const QString
&)),
153 parent(), SIGNAL(ssidChanged(const QString
&)));
154 QObject::connect(object
, SIGNAL(frequencyChanged(uint
)),
155 parent(), SIGNAL(frequencyChanged(uint
)));
159 void Solid::Control::AccessPoint::_k_destroyed(QObject
*object
)
165 #include "wirelessaccesspoint.moc"