ModemManagerQt

fakemodem/modemmessaging.h
1/*
2 SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef MODEMMANAGERQT_FAKE_MODEM_MODEM_MESSAGING_H
8#define MODEMMANAGERQT_FAKE_MODEM_MODEM_MESSAGING_H
9
10#include "generictypes.h"
11#include "sms.h"
12
13#include <QDBusAbstractAdaptor>
14#include <QDBusObjectPath>
15
16class ModemMessaging : public QDBusAbstractAdaptor
17{
19 Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Messaging")
20public:
21 explicit ModemMessaging(QObject *parent = nullptr);
22 ~ModemMessaging() override;
23
24 Q_PROPERTY(uint DefaultStorage READ defaultStorage)
25 Q_PROPERTY(QList<QDBusObjectPath> Messages READ messages)
26 Q_PROPERTY(ModemManager::UIntList SupportedStorages READ supportedStorages)
27
28 uint defaultStorage() const;
29 QList<QDBusObjectPath> messages() const;
30 ModemManager::UIntList supportedStorages() const;
31
32 /* Not part of dbus interface */
33 void addMessage(Sms *sms);
34 void setModemPath(const QString &path);
35 void setEnableNotifications(bool enable);
36 void setDefaultStorage(uint defaultStorage);
37 void setSupportedStorages(const ModemManager::UIntList &supportedStorages);
38
39 QVariantMap toMap() const;
40
41public Q_SLOTS: // METHODS
42 Q_SCRIPTABLE QDBusObjectPath Create(const QVariantMap &properties);
43 Q_SCRIPTABLE void Delete(const QDBusObjectPath &path);
44 Q_SCRIPTABLE QList<QDBusObjectPath> List();
45
46Q_SIGNALS: // SIGNALS
47 Q_SCRIPTABLE void Added(const QDBusObjectPath &path, bool received);
48 Q_SCRIPTABLE void Deleted(const QDBusObjectPath &path);
49
50private:
51 QString m_modemPath;
52 bool m_enabledNotifications;
53 int m_messageCounter;
54 uint m_defaultStorage;
55 QMap<QDBusObjectPath, Sms *> m_messages;
56 ModemManager::UIntList m_supportedStorages;
57};
58
59#endif
This namespace allows to query the underlying system to discover the available modem interfaces respo...
Definition bearer.cpp:20
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:54:16 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.