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