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