1/*
2 SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net>
3 SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <lamarque@kde.org>
4 SPDX-FileCopyrightText: 2013 Daniel Nicoletti <dantti12@gmail.com>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef NETWORKMANAGERQT_WIMAXDEVICE_H
10#define NETWORKMANAGERQT_WIMAXDEVICE_H
11
12#include <networkmanagerqt/networkmanagerqt_export.h>
13
14#include "device.h"
15#include "wimaxnsp.h"
16
17namespace NetworkManager
18{
19class WimaxDevicePrivate;
20
21/*!
22 * \class NetworkManager::WimaxDevice
23 * \inheaderfile NetworkManagerQt/WimaxDevice
24 * \inmodule NetworkManagerQt
25 *
26 * \brief Wimax network interface.
27 */
28class NETWORKMANAGERQT_EXPORT WimaxDevice : public Device
29{
30 Q_OBJECT
31
32public:
33 /*!
34 * \typedef NetworkManager::WimaxDevice::Ptr
35 */
36 typedef QSharedPointer<WimaxDevice> Ptr;
37 /*!
38 * \typedef NetworkManager::WimaxDevice::List
39 */
40 typedef QList<Ptr> List;
41
42 /*!
43 * Creates a new WimaxDevice object.
44 *
45 * \a path the DBus path of the device
46 */
47 explicit WimaxDevice(const QString &path, QObject *parent = nullptr);
48 /*!
49 * Destroys a WimaxDevice object.
50 */
51 ~WimaxDevice() override;
52 /*!
53 * Return the type
54 */
55 Type type() const override;
56 /*!
57 * List of network service providers currently visible to the hardware
58 */
59 QStringList nsps() const;
60 /*!
61 * Identifier of the NSP this interface is currently associated with
62 */
63 WimaxNsp::Ptr activeNsp() const;
64 /*!
65 * The ID of the serving base station as received from the network.
66 */
67 QString bsid() const;
68 /*!
69 * The hardware address currently used by the network interface
70 */
71 QString hardwareAddress() const;
72 /*!
73 * Center frequency (in KHz) of the radio channel the device is using to communicate with the network when connected.
74 */
75 uint centerFrequency() const;
76 /*!
77 * CINR (Carrier to Interference + Noise Ratio) of the current radio link in dB.
78 */
79 int cinr() const;
80 /*!
81 * RSSI of the current radio link in dBm. This value indicates how strong the raw received RF signal from the base station is, but does not indicate the
82 * overall quality of the radio link.
83 */
84 int rssi() const;
85 /*!
86 * Average power of the last burst transmitted by the device, in units of 0.5 dBm. i.e. a TxPower of -11 represents an actual device TX power of -5.5 dBm.
87 */
88 int txPower() const;
89
90 /*!
91 * Finds NSP object given its Unique Network Identifier.
92 *
93 * \a uni the identifier of the AP to find from this network interface
94 * Returns a valid WimaxNsp object if a network having the given UNI for this device is known to the system, 0 otherwise
95 */
96 NetworkManager::WimaxNsp::Ptr findNsp(const QString &uni) const;
97
98Q_SIGNALS:
99 /*!
100 * This signal is emitted when the bitrate of this network has changed.
101 *
102 * \a bitrate the new bitrate value for this network
103 */
104 void bitRateChanged(int bitrate);
105 /*!
106 * The active NSP changed.
107 */
108 void activeNspChanged(const QString &);
109 /*!
110 * The BSID changed.
111 */
112 void bsidChanged(const QString &);
113 /*!
114 * The device changed its hardware address
115 */
116 void hardwareAddressChanged(const QString &);
117 /*!
118 * The device changed its center frequency
119 */
120 void centerFrequencyChanged(uint);
121 /*!
122 * The device changed its signal/noise ratio
123 */
124 void cinrChanged(int);
125 /*!
126 * The device changed its RSSI
127 */
128 void rssiChanged(int);
129 /*!
130 * The device changed its TxPower.
131 */
132 void txPowerChanged(int);
133 /*!
134 * A new NSP appeared
135 */
136 void nspAppeared(const QString &);
137 /*!
138 * A wireless access point disappeared
139 */
140 void nspDisappeared(const QString &);
141
142private:
143 Q_DECLARE_PRIVATE(WimaxDevice)
144};
145
146} // namespace NetworkManager
147#endif // NETWORKMANAGERQT_WIMAXDEVICE_H
148

source code of networkmanager-qt/src/wimaxdevice.h