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 | |
17 | namespace NetworkManager |
18 | { |
19 | class WimaxDevicePrivate; |
20 | |
21 | /** |
22 | * Wimax network interface |
23 | */ |
24 | class NETWORKMANAGERQT_EXPORT WimaxDevice : public Device |
25 | { |
26 | Q_OBJECT |
27 | |
28 | public: |
29 | typedef QSharedPointer<WimaxDevice> Ptr; |
30 | typedef QList<Ptr> List; |
31 | |
32 | /** |
33 | * Creates a new WimaxDevice object. |
34 | * |
35 | * @param path the DBus path of the device |
36 | */ |
37 | explicit WimaxDevice(const QString &path, QObject *parent = nullptr); |
38 | /** |
39 | * Destroys a WimaxDevice object. |
40 | */ |
41 | ~WimaxDevice() override; |
42 | /** |
43 | * Return the type |
44 | */ |
45 | Type type() const override; |
46 | /** |
47 | * List of network service providers currently visible to the hardware |
48 | */ |
49 | QStringList nsps() const; |
50 | /** |
51 | * Identifier of the NSP this interface is currently associated with |
52 | */ |
53 | WimaxNsp::Ptr activeNsp() const; |
54 | /** |
55 | * The ID of the serving base station as received from the network. |
56 | */ |
57 | QString bsid() const; |
58 | /** |
59 | * The hardware address currently used by the network interface |
60 | */ |
61 | QString hardwareAddress() const; |
62 | /** |
63 | * Center frequency (in KHz) of the radio channel the device is using to communicate with the network when connected. |
64 | */ |
65 | uint centerFrequency() const; |
66 | /** |
67 | * CINR (Carrier to Interference + Noise Ratio) of the current radio link in dB. |
68 | */ |
69 | int cinr() const; |
70 | /** |
71 | * 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 |
72 | * overall quality of the radio link. |
73 | */ |
74 | int () const; |
75 | /** |
76 | * 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. |
77 | */ |
78 | int txPower() const; |
79 | |
80 | /** |
81 | * Finds NSP object given its Unique Network Identifier. |
82 | * |
83 | * @param uni the identifier of the AP to find from this network interface |
84 | * @returns a valid WimaxNsp object if a network having the given UNI for this device is known to the system, 0 otherwise |
85 | */ |
86 | NetworkManager::WimaxNsp::Ptr findNsp(const QString &uni) const; |
87 | |
88 | Q_SIGNALS: |
89 | /** |
90 | * This signal is emitted when the bitrate of this network has changed. |
91 | * |
92 | * @param bitrate the new bitrate value for this network |
93 | */ |
94 | void bitRateChanged(int bitrate); |
95 | /** |
96 | * The active NSP changed. |
97 | */ |
98 | void activeNspChanged(const QString &); |
99 | /** |
100 | * The BSID changed. |
101 | */ |
102 | void bsidChanged(const QString &); |
103 | /** |
104 | * The device changed its hardware address |
105 | */ |
106 | void hardwareAddressChanged(const QString &); |
107 | /** |
108 | * The device changed its center frequency |
109 | */ |
110 | void centerFrequencyChanged(uint); |
111 | /** |
112 | * The device changed its signal/noise ratio |
113 | */ |
114 | void cinrChanged(int); |
115 | /** |
116 | * The device changed its RSSI |
117 | */ |
118 | void (int); |
119 | /** |
120 | * The device changed its TxPower. |
121 | */ |
122 | void txPowerChanged(int); |
123 | /** |
124 | * A new NSP appeared |
125 | */ |
126 | void nspAppeared(const QString &); |
127 | /** |
128 | * A wireless access point disappeared |
129 | */ |
130 | void nspDisappeared(const QString &); |
131 | |
132 | private: |
133 | Q_DECLARE_PRIVATE(WimaxDevice) |
134 | }; |
135 | |
136 | } // namespace NetworkManager |
137 | #endif // NETWORKMANAGERQT_WIMAXDEVICE_H |
138 | |