File indexing completed on 2024-04-28 03:59:49
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_LOCATION_H 0008 #define MODEMMANAGERQT_FAKE_MODEM_MODEM_LOCATION_H 0009 0010 #include "generictypes.h" 0011 0012 #include <QDBusAbstractAdaptor> 0013 0014 class ModemLocation : public QDBusAbstractAdaptor 0015 { 0016 Q_OBJECT 0017 Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Location") 0018 public: 0019 explicit ModemLocation(QObject *parent = nullptr); 0020 ~ModemLocation() override; 0021 0022 Q_PROPERTY(uint Capabilities READ capabilities) 0023 Q_PROPERTY(uint Enabled READ enabled) 0024 Q_PROPERTY(ModemManager::LocationInformationMap Location READ location) 0025 Q_PROPERTY(bool SignalsLocation READ signalsLocation) 0026 0027 uint capabilities() const; 0028 uint enabled() const; 0029 ModemManager::LocationInformationMap location() const; 0030 bool signalsLocation() const; 0031 0032 /* Not part of dbus interface */ 0033 void setModemPath(const QString &path); 0034 void setEnableNotifications(bool enable); 0035 void setCapabilities(uint capabilities); 0036 void setEnabled(uint enabled); 0037 void setLocation(const ModemManager::LocationInformationMap &location); 0038 void setSignalsLocation(bool signalsLocation); 0039 0040 QVariantMap toMap() const; 0041 0042 public Q_SLOTS: 0043 Q_SCRIPTABLE ModemManager::LocationInformationMap GetLocation(); 0044 Q_SCRIPTABLE void Setup(uint sources, bool signal_location); 0045 0046 private: 0047 QString m_modemPath; 0048 bool m_enabledNotifications; 0049 uint m_capabilities; 0050 uint m_enabled; 0051 ModemManager::LocationInformationMap m_location; 0052 bool m_signalsLocation; 0053 }; 0054 0055 #endif