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

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_TIME_H
0008 #define MODEMMANAGERQT_FAKE_MODEM_MODEM_TIME_H
0009 
0010 #include "generictypes.h"
0011 
0012 #include <QObject>
0013 
0014 #include <QDBusObjectPath>
0015 
0016 class ModemTime : public QDBusAbstractAdaptor
0017 {
0018     Q_OBJECT
0019     Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Time")
0020 public:
0021     explicit ModemTime(QObject *parent = nullptr);
0022     ~ModemTime() override;
0023 
0024     Q_PROPERTY(QVariantMap NetworkTimezone READ networkTimezone)
0025 
0026     QVariantMap networkTimezone() const;
0027 
0028     /* Not part of dbus interface */
0029     void setModemPath(const QString &path);
0030     void setEnableNotifications(bool enable);
0031     void setNetworkTimezone(const QVariantMap &timezone);
0032 
0033     QVariantMap toMap() const;
0034 
0035 public Q_SLOTS:
0036     Q_SCRIPTABLE QString GetNetworkTime();
0037 
0038 Q_SIGNALS: // SIGNALS
0039     Q_SCRIPTABLE void NetworkTimeChanged(const QString &time);
0040 
0041 private:
0042     QString m_modemPath;
0043     bool m_enabledNotifications;
0044     QVariantMap m_timezone;
0045 };
0046 
0047 #endif