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
#ifndef SOLID_CONTROL_WIRELESSAP_H
22
#define SOLID_CONTROL_WIRELESSAP_H
24
#include <QtCore/QObject>
26
#include "wirelessnetworkinterface.h"
32
class AccessPointPrivate;
33
class SOLIDCONTROL_EXPORT AccessPoint : public QObject
36
Q_DECLARE_PRIVATE(AccessPoint)
37
Q_FLAGS(Capabilities WpaFlags)
40
* General capabilities of an access point
42
enum Capability { Privacy = 0x1 };
44
* Flags describing the access point's capabilities according to WPA (Wifi Protected Access)
46
enum WpaFlag { PairWep40 = 0x1, PairWep104 = 0x2, PairTkip = 0x4, PairCcmp = 0x8,
47
GroupWep40 = 0x10, GroupWep104 = 0x20, GroupTkip = 0x40, GroupCcmp = 0x80,
48
KeyMgmtPsk = 0x100, KeyMgmt8021x = 0x200 };
49
Q_DECLARE_FLAGS(Capabilities, Capability)
50
Q_DECLARE_FLAGS(WpaFlags, WpaFlag)
53
* Creates a new Network object.
55
* @param backendObject the network object provided by the backend
57
AccessPoint(QObject *backendObject = 0);
61
AccessPoint(const AccessPoint &);
63
virtual ~AccessPoint();
66
* Opaque and unique string identifier for this access point
71
* Flags describing the capabilities of the access point
73
Solid::Control::AccessPoint::Capabilities capabilities() const;
76
* Flags describing the access point's capabilities according to WPA (Wifi Protected Access)
78
Solid::Control::AccessPoint::WpaFlags wpaFlags() const;
81
* Flags describing the access point's capabilities according to RSN (Robust Secure Network)
84
Solid::Control::AccessPoint::WpaFlags rsnFlags() const;
87
* The Service Set Identifier of the access point
92
* The raw bytes of the Service Set Identifier of the access point
94
QByteArray rawSsid() const;
97
* Retrieves the frequency in MHz of the radio channel that this access point is operating on
99
* @return the frequency
101
uint frequency() const;
104
* The hardware address assigned to the access point's wireless interface
106
QString hardwareAddress() const;
109
* Retrieves the maximum bit rate currently attainable with this access point
111
* @return the maximum bitrate in kilobit/s
113
uint maxBitRate() const;
116
* Retrieves the operation mode of this access point
118
* @return the current mode
119
* @see Solid::Control::WirelessNetworkInterface::OperationMode
121
Solid::Control::WirelessNetworkInterface::OperationMode mode() const;
124
* Retrieves the current signal strength of this access point
126
* @return the signal strength as a percentage
128
int signalStrength() const;
132
* This signal is emitted when the signal strength of this access point has changed.
134
* @param strength the new signal strength value for this access point.
136
void signalStrengthChanged(int strength);
139
* This signal is emitted when the bitrate of this access point has changed.
141
* @param bitrate the new bitrate value for this access point
143
void bitRateChanged(int bitrate);
146
* This signal is emitted when the WPA flags in use by this access point change
148
* @param flags the new flags
150
void wpaFlagsChanged(Solid::Control::AccessPoint::WpaFlags flags) const;
153
* This signal is emitted when the RSN(WPA2) flags in use by this access point change
155
* @param flags the new flags
157
void rsnFlagsChanged(Solid::Control::AccessPoint::WpaFlags flags) const;
159
* This signal is emitted when the ssid of this Access Point changes
161
* @param ssid the new SSID
163
void ssidChanged(const QString & ssid) const;
166
* This signal is emitted when the frequency used by this Access Point changes
168
* @param frequency the new frequency
170
void frequencyChanged(uint frequency) const;
175
AccessPoint(AccessPointPrivate &dd, QObject *backendObject);
179
AccessPoint(AccessPointPrivate &dd, const AccessPoint & ap);
180
AccessPointPrivate * d_ptr;
182
void _k_destroyed(QObject *object);
184
typedef QStringList AccessPointList;
188
Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Control::AccessPoint::Capabilities)
189
Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Control::AccessPoint::WpaFlags)
190
#endif // SOLID_CONTROL_WIRELESSAP_H