/usr/include/NetworkManagerQt/accesspoint.h is in libnetworkmanagerqt-dev 0.9.8.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | /*
Copyright 2008 Will Stephenson <wstephenson@kde.org>
Copyright 2011-2013 Lamarque V. Souza <lamarque@kde.org>
Copyright 2013 Jan Grulich <jgrulich@redhat.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETWORKMANAGERQT_ACCESSPOINT_H
#define NETWORKMANAGERQT_ACCESSPOINT_H
#include "NetworkManagerQt-export.h"
#include <QObject>
#include <QSharedPointer>
#include <QVariantMap>
namespace NetworkManager {
class AccessPointPrivate;
class NETWORKMANAGERQT_EXPORT AccessPoint : public QObject
{
Q_OBJECT
Q_FLAGS(Capabilities WpaFlags)
public:
typedef QSharedPointer<AccessPoint> Ptr;
typedef QList<Ptr> List;
/**
* The access point's current operating mode
*/
enum OperationMode {
Unknown = 0, /**< not associated with a network */
Adhoc, /**< part of an adhoc network */
Infra, /**< a station in an infrastructure wireless network */
ApMode /**< access point in an infrastructure network */
};
/**
* General capabilities of an access point
*/
enum Capability {
None = 0x0, /**< Null capability - says nothing about the access point */
Privacy = 0x1 /**< Access point supports privacy measures */
};
/**
* Flags describing the access point's capabilities according to WPA (Wifi Protected Access)
*/
enum WpaFlag { PairWep40 = 0x1, PairWep104 = 0x2, PairTkip = 0x4, PairCcmp = 0x8,
GroupWep40 = 0x10, GroupWep104 = 0x20, GroupTkip = 0x40, GroupCcmp = 0x80,
KeyMgmtPsk = 0x100, KeyMgmt8021x = 0x200
};
Q_DECLARE_FLAGS(Capabilities, Capability)
Q_DECLARE_FLAGS(WpaFlags, WpaFlag)
explicit AccessPoint(const QString &path, QObject *parent = 0);
virtual ~AccessPoint();
/**
* @return path of the access point
*/
QString uni() const;
/**
* @return capabilities of an access point
*/
Capabilities capabilities() const;
/**
* @return flags describing the access point's capabilities according to WPA (Wifi Protected Access).
* @see WpaFlag
*/
AccessPoint::WpaFlags wpaFlags() const;
/**
* @return Flags describing the access point's capabilities according to the RSN (Robust Secure Network) protocol.
* @see WpaFlag
*/
AccessPoint::WpaFlags rsnFlags() const;
/**
* @return The Service Set Identifier identifying the access point.
*/
QString ssid() const;
/**
* @return raw SSID, encoded as a byte array
*/
QByteArray rawSsid() const;
/**
* @return The radio channel frequency in use by the access point, in MHz.
*/
uint frequency() const;
/**
* @return The hardware address (BSSID) of the access point.
*/
QString hardwareAddress() const;
/**
* @return The maximum bitrate this access point is capable of, in kilobits/second (Kb/s).
*/
uint maxBitRate() const;
/**
* @return Describes the operating mode of the access point.
*/
OperationMode mode() const;
/**
* @return The current signal quality of the access point, in percent.
*/
int signalStrength() const;
/**
* Helper method to convert wire representation of operation @p mode to enum
*/
static OperationMode convertOperationMode(uint mode);
Q_SIGNALS:
/**
* This signal is emitted when the signal strength of this network has changed.
*
* @param strength the new signal strength value for this network
*/
void signalStrengthChanged(int strength);
/**
* This signal is emitted when the bitrate of this network has changed.
*
* @param bitrate the new bitrate value for this network
*/
void bitRateChanged(int bitrate);
/**
* This signal is emitted when the capabilities of this network have changed.
*
* @param caps the new capabilities
*/
void capabilitiesChanged(AccessPoint::Capabilities caps);
/**
* This signal is emitted when the WPA flags in use by this access point change
*
* @param flags the new flags
*/
void wpaFlagsChanged(AccessPoint::WpaFlags flags);
/**
* This signal is emitted when the RSN(WPA2) flags in use by this access point change
*
* @param flags the new flags
*/
void rsnFlagsChanged(AccessPoint::WpaFlags flags);
/**
* This signal is emitted when the ssid of this Access Point changes
*
* @param ssid the new SSID
*/
void ssidChanged(const QString &ssid);
/**
* This signal is emitted when the frequency used by this Access Point changes
*
* @param frequency the new frequency
*/
void frequencyChanged(uint frequency);
protected Q_SLOTS:
void propertiesChanged(const QVariantMap &properties);
private:
Q_DECLARE_PRIVATE(AccessPoint)
AccessPointPrivate *const d_ptr;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(AccessPoint::WpaFlags)
}
#endif
|