File indexing completed on 2024-05-19 07:49:15
0001 /* 0002 SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef MODEMMANAGERQT_FAKE_MODEM_MODEM_3GPP_USSD_H 0008 #define MODEMMANAGERQT_FAKE_MODEM_MODEM_3GPP_USSD_H 0009 0010 #include "generictypes.h" 0011 0012 #include <QDBusAbstractAdaptor> 0013 0014 class Modem3gppUssd : public QDBusAbstractAdaptor 0015 { 0016 Q_OBJECT 0017 Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Modem3gpp.Ussd") 0018 public: 0019 explicit Modem3gppUssd(QObject *parent = nullptr); 0020 ~Modem3gppUssd() override; 0021 0022 Q_PROPERTY(QString NetworkNotification READ networkNotification) 0023 Q_PROPERTY(QString NetworkRequest READ networkRequest) 0024 Q_PROPERTY(uint State READ state) 0025 0026 QString networkNotification() const; 0027 QString networkRequest() const; 0028 uint state() const; 0029 0030 /* Not part of dbus interface */ 0031 void setModemPath(const QString &path); 0032 void setEnableNotifications(bool enable); 0033 void setNetworkNotification(const QString &networkNotification); 0034 void setNetworkRequest(const QString &networkRequest); 0035 void setState(uint state); 0036 0037 QVariantMap toMap() const; 0038 0039 public Q_SLOTS: 0040 Q_SCRIPTABLE void Cancel(); 0041 Q_SCRIPTABLE QString Initiate(const QString &command); 0042 Q_SCRIPTABLE QString Respond(const QString &response); 0043 0044 private: 0045 QString m_modemPath; 0046 bool m_enabledNotifications; 0047 QString m_networkNotification; 0048 QString m_networkRequest; 0049 uint m_state; 0050 }; 0051 0052 #endif