File indexing completed on 2025-04-20 12:29:47
0001 /* 0002 SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net> 0003 SPDX-FileCopyrightText: 2011-2013 Lamarque V. Souza <lamarque@kde.org> 0004 SPDX-FileCopyrightText: 2013 Daniel Nicoletti <dantti12@gmail.com> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef NETWORKMANAGERQT_WIMAXDEVICE_H 0010 #define NETWORKMANAGERQT_WIMAXDEVICE_H 0011 0012 #include <networkmanagerqt/networkmanagerqt_export.h> 0013 0014 #include "device.h" 0015 #include "wimaxnsp.h" 0016 0017 #include <QDBusObjectPath> 0018 0019 namespace NetworkManager 0020 { 0021 class WimaxDevicePrivate; 0022 0023 /** 0024 * Wimax network interface 0025 */ 0026 class NETWORKMANAGERQT_EXPORT WimaxDevice : public Device 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 typedef QSharedPointer<WimaxDevice> Ptr; 0032 typedef QList<Ptr> List; 0033 0034 /** 0035 * Creates a new WimaxDevice object. 0036 * 0037 * @param path the DBus path of the device 0038 */ 0039 explicit WimaxDevice(const QString &path, QObject *parent = nullptr); 0040 /** 0041 * Destroys a WimaxDevice object. 0042 */ 0043 ~WimaxDevice() override; 0044 /** 0045 * Return the type 0046 */ 0047 Type type() const override; 0048 /** 0049 * List of network service providers currently visible to the hardware 0050 */ 0051 QStringList nsps() const; 0052 /** 0053 * Identifier of the NSP this interface is currently associated with 0054 */ 0055 WimaxNsp::Ptr activeNsp() const; 0056 /** 0057 * The ID of the serving base station as received from the network. 0058 */ 0059 QString bsid() const; 0060 /** 0061 * The hardware address currently used by the network interface 0062 */ 0063 QString hardwareAddress() const; 0064 /** 0065 * Center frequency (in KHz) of the radio channel the device is using to communicate with the network when connected. 0066 */ 0067 uint centerFrequency() const; 0068 /** 0069 * CINR (Carrier to Interference + Noise Ratio) of the current radio link in dB. 0070 */ 0071 int cinr() const; 0072 /** 0073 * 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 0074 * overall quality of the radio link. 0075 */ 0076 int rssi() const; 0077 /** 0078 * 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. 0079 */ 0080 int txPower() const; 0081 0082 /** 0083 * Finds NSP object given its Unique Network Identifier. 0084 * 0085 * @param uni the identifier of the AP to find from this network interface 0086 * @returns a valid WimaxNsp object if a network having the given UNI for this device is known to the system, 0 otherwise 0087 */ 0088 NetworkManager::WimaxNsp::Ptr findNsp(const QString &uni) const; 0089 0090 Q_SIGNALS: 0091 /** 0092 * This signal is emitted when the bitrate of this network has changed. 0093 * 0094 * @param bitrate the new bitrate value for this network 0095 */ 0096 void bitRateChanged(int bitrate); 0097 /** 0098 * The active NSP changed. 0099 */ 0100 void activeNspChanged(const QString &); 0101 /** 0102 * The BSID changed. 0103 */ 0104 void bsidChanged(const QString &); 0105 /** 0106 * The device changed its hardware address 0107 */ 0108 void hardwareAddressChanged(const QString &); 0109 /** 0110 * The device changed its center frequency 0111 */ 0112 void centerFrequencyChanged(uint); 0113 /** 0114 * The device changed its signal/noise ratio 0115 */ 0116 void cinrChanged(int); 0117 /** 0118 * The device changed its RSSI 0119 */ 0120 void rssiChanged(int); 0121 /** 0122 * The device changed its TxPower. 0123 */ 0124 void txPowerChanged(int); 0125 /** 0126 * A new NSP appeared 0127 */ 0128 void nspAppeared(const QString &); 0129 /** 0130 * A wireless access point disappeared 0131 */ 0132 void nspDisappeared(const QString &); 0133 0134 private: 0135 Q_DECLARE_PRIVATE(WimaxDevice) 0136 }; 0137 0138 } // namespace NetworkManager 0139 #endif // NETWORKMANAGERQT_WIMAXDEVICE_H