ModemManagerQt

fakemodem/bearer.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_BEARER_H
8#define MODEMMANAGERQT_FAKE_MODEM_BEARER_H
9
10#include "generictypes.h"
11
12#include <QObject>
13
14class Bearer : public QObject
15{
17 Q_CLASSINFO("D-Bus Interface", "org.kde.fakemodem.Bearer")
18public:
19 explicit Bearer(QObject *parent = nullptr);
20 ~Bearer() override;
21
22 Q_PROPERTY(bool Connected READ connected)
23 Q_PROPERTY(QString Interface READ interface)
24 Q_PROPERTY(QVariantMap Ip4Config READ ip4Config)
25 Q_PROPERTY(QVariantMap Ip6Config READ ip6Config)
26 Q_PROPERTY(uint IpTimeout READ ipTimeout)
27 Q_PROPERTY(QVariantMap Properties READ properties)
28 Q_PROPERTY(bool Suspended READ suspended)
29
30 bool connected() const;
31 QString interface() const;
32 QVariantMap ip4Config() const;
33 QVariantMap ip6Config() const;
34 uint ipTimeout() const;
35 QVariantMap properties() const;
36 bool suspended() const;
37
38 /* Not part of dbus interface */
39 QString bearerPath() const;
40 void setEnableNotifications(bool enable);
41 void setBearerPath(const QString &path);
42 void setConnected(bool connected);
43 void setInterface(const QString &interface);
44 void setIp4Config(const QVariantMap &config);
45 void setIp6Config(const QVariantMap &config);
46 void setIpTimeout(uint timeout);
47 void setProperties(const QVariantMap &properties);
48 void setSuspended(bool suspended);
49
50public Q_SLOTS:
51 Q_SCRIPTABLE void Connect();
52 Q_SCRIPTABLE void Disconnect();
53
54private:
55 QString m_bearerPath;
56 bool m_connected;
57 bool m_enabledNotifications;
58 QString m_interface;
59 QVariantMap m_ip4Config;
60 QVariantMap m_ip6Config;
61 uint m_ipTimeout;
62 QVariantMap m_properties;
63 bool m_suspended;
64};
65
66#endif
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.