File indexing completed on 2024-05-19 15:21:41

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 <QObject>
0013 
0014 #include <QDBusObjectPath>
0015 
0016 class Modem3gppUssd : public QDBusAbstractAdaptor
0017 {
0018     Q_OBJECT
0019     Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Modem3gpp.Ussd")
0020 public:
0021     explicit Modem3gppUssd(QObject *parent = nullptr);
0022     ~Modem3gppUssd() override;
0023 
0024     Q_PROPERTY(QString NetworkNotification READ networkNotification)
0025     Q_PROPERTY(QString NetworkRequest READ networkRequest)
0026     Q_PROPERTY(uint State READ state)
0027 
0028     QString networkNotification() const;
0029     QString networkRequest() const;
0030     uint state() const;
0031 
0032     /* Not part of dbus interface */
0033     void setModemPath(const QString &path);
0034     void setEnableNotifications(bool enable);
0035     void setNetworkNotification(const QString &networkNotification);
0036     void setNetworkRequest(const QString &networkRequest);
0037     void setState(uint state);
0038 
0039     QVariantMap toMap() const;
0040 
0041 public Q_SLOTS:
0042     Q_SCRIPTABLE void Cancel();
0043     Q_SCRIPTABLE QString Initiate(const QString &command);
0044     Q_SCRIPTABLE QString Respond(const QString &response);
0045 
0046 private:
0047     QString m_modemPath;
0048     bool m_enabledNotifications;
0049     QString m_networkNotification;
0050     QString m_networkRequest;
0051     uint m_state;
0052 };
0053 
0054 #endif