ModemManagerQt

fakemodem/modemoma.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_OMA_H
8#define MODEMMANAGERQT_FAKE_MODEM_MODEM_OMA_H
9
10#include "generictypes.h"
11
12#include <QDBusAbstractAdaptor>
13
14class ModemOma : public QDBusAbstractAdaptor
15{
17 Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Modem.Oma")
18public:
19 explicit ModemOma(QObject *parent = nullptr);
20 ~ModemOma() override;
21
22 Q_PROPERTY(uint Features READ features)
23 Q_PROPERTY(ModemManager::OmaSessionTypes PendingNetworkInitiatedSessions READ pendingNetworkInitiatedSessions)
24 Q_PROPERTY(int SessionState READ sessionState)
25 Q_PROPERTY(uint SessionType READ sessionType)
26
27 uint features() const;
28 ModemManager::OmaSessionTypes pendingNetworkInitiatedSessions() const;
29 int sessionState() const;
30 uint sessionType() const;
31
32 /* Not part of dbus interface */
33 void setModemPath(const QString &path);
34 void setEnableNotifications(bool enable);
35 void setFeatures(uint features);
36 void setPendingNetworkInitiatedSessions(const ModemManager::OmaSessionTypes &sessions);
37 void setSessionState(int state);
38 void setSessionType(uint type);
39
40 QVariantMap toMap() const;
41
42public Q_SLOTS:
43 Q_SCRIPTABLE void AcceptNetworkInitiatedSession(uint session_id, bool accept);
44 Q_SCRIPTABLE void CancelSession();
45 Q_SCRIPTABLE void Setup(uint features);
46 Q_SCRIPTABLE void StartClientInitiatedSession(uint session_type);
47
48Q_SIGNALS: // SIGNALS
49 Q_SCRIPTABLE void SessionStateChanged(int old_session_state, int new_session_state, uint session_state_failed_reason);
50
51private:
52 QString m_modemPath;
53 bool m_enabledNotifications;
54 uint m_features;
55 ModemManager::OmaSessionTypes m_sessions;
56 int m_sessionState;
57 uint m_sessionType;
58};
59
60#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 22 2024 12:07:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.