File indexing completed on 2025-02-16 13:12:31
0001 /* 0002 SPDX-FileCopyrightText: 2014 Lukas Tinkl <ltinkl@redhat.com> 0003 SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef MODEMMANAGERQT_MODEMSIGNAL_H 0009 #define MODEMMANAGERQT_MODEMSIGNAL_H 0010 0011 #include "interface.h" 0012 #include <modemmanagerqt_export.h> 0013 0014 #include <QObject> 0015 #include <QSharedPointer> 0016 0017 namespace ModemManager 0018 { 0019 class ModemSignalPrivate; 0020 0021 /** 0022 * @brief The ModemSignal class 0023 * 0024 * This class provides access to extended signal quality information. 0025 * 0026 * @since 1.1.94 0027 */ 0028 class MODEMMANAGERQT_EXPORT ModemSignal : public Interface 0029 { 0030 Q_OBJECT 0031 Q_DECLARE_PRIVATE(ModemSignal) 0032 0033 public: 0034 typedef QSharedPointer<ModemSignal> Ptr; 0035 typedef QList<Ptr> List; 0036 0037 explicit ModemSignal(const QString &path, QObject *parent = nullptr); 0038 ~ModemSignal() override; 0039 0040 /** 0041 * @return refresh rate for the extended signal quality information updates, in seconds. 0042 * A value of 0 disables the retrieval of the values. 0043 */ 0044 uint rate() const; 0045 0046 /** 0047 * @return Dictionary of available signal information for the CDMA1x access technology. 0048 * 0049 * This dictionary is composed of a string key, with an associated data which contains type-specific information. 0050 * @param rssi The CDMA1x RSSI (Received Signal Strength Indication), in dBm, given as a floating point value (signature "d"). 0051 * @param ecio The CDMA1x Ec/Io, in dBm, given as a floating point value (signature "d"). 0052 */ 0053 QVariantMap cdma() const; 0054 0055 /** 0056 * @return Dictionary of available signal information for the CDMA EV-DO access technology. 0057 * 0058 * This dictionary is composed of a string key, with an associated data which contains type-specific information. 0059 * @param rssi The CDMA EV-DO RSSI (Received Signal Strength Indication), in dBm, given as a floating point value (signature "d"). 0060 * @param ecio The CDMA EV-DO Ec/Io, in dBm, given as a floating point value (signature "d"). 0061 * @param sinr CDMA EV-DO SINR level, in dB, given as a floating point value (signature "d"). 0062 * @param io The CDMA EV-DO Io, in dBm, given as a floating point value (signature "d"). 0063 */ 0064 QVariantMap evdo() const; 0065 0066 /** 0067 * @return Dictionary of available signal information for the GSM/GPRS access technology. 0068 * 0069 * This dictionary is composed of a string key, with an associated data which contains type-specific information. 0070 * @param rssi The GSM RSSI (Received Signal Strength Indication), in dBm, given as a floating point value (signature "d"). 0071 */ 0072 QVariantMap gsm() const; 0073 0074 /** 0075 * @return Dictionary of available signal information for the UMTS (WCDMA) access technology. 0076 * 0077 * This dictionary is composed of a string key, with an associated data which contains type-specific information. 0078 * @param rssi The LTE RSSI (Received Signal Strength Indication), in dBm, given as a floating point value (signature "d"). 0079 * @param rsrq The LTE RSRQ (Reference Signal Received Quality), in dB, given as a floating point value (signature "d"). 0080 * @param rsrp The LTE RSRP (Reference Signal Received Power), in dBm, given as a floating point value (signature "d"). 0081 * @param snr The LTE S/R ratio, in dB, given as a floating point value (signature "d"). 0082 */ 0083 QVariantMap lte() const; 0084 0085 /** 0086 * @return Dictionary of available signal information for the UMTS (WCDMA) access technology. 0087 * 0088 * This dictionary is composed of a string key, with an associated data which contains type-specific information. 0089 * @param rssi The UMTS RSSI (Received Signal Strength Indication), in dBm, given as a floating point value (signature "d"). 0090 * @param ecio The UMTS Ec/Io, in dBm, given as a floating point value (signature "d"). 0091 */ 0092 QVariantMap umts() const; 0093 0094 /** 0095 * Setup extended signal quality information retrieval. 0096 * @param rate refresh rate to set, in seconds. 0 to disable retrieval. 0097 */ 0098 QDBusPendingReply<void> setup(uint rate); 0099 0100 /** 0101 * Sets the timeout in milliseconds for all async method DBus calls. 0102 * -1 means the default DBus timeout (usually 25 seconds). 0103 */ 0104 void setTimeout(int timeout); 0105 0106 /** 0107 * Returns the current value of the DBus timeout in milliseconds. 0108 * -1 means the default DBus timeout (usually 25 seconds). 0109 */ 0110 int timeout() const; 0111 0112 Q_SIGNALS: 0113 void rateChanged(uint rate); 0114 void cdmaChanged(const QVariantMap &cdma); 0115 void evdoChanged(const QVariantMap &evdo); 0116 void gsmChanged(const QVariantMap &gsm); 0117 void umtsChanged(const QVariantMap &umts); 0118 void lteChanged(const QString <e); 0119 }; 0120 0121 } // namespace ModemManager 0122 0123 #endif