NetworkManagerQt

fakenetwork/activeconnection.h
1/*
2 SPDX-FileCopyrightText: 2014 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 NETWORKMANAGERQT_FAKE_NETWORK_SETTINGS_ACTIVE_CONNECTION_H
8#define NETWORKMANAGERQT_FAKE_NETWORK_SETTINGS_ACTIVE_CONNECTION_H
9
10#include <QObject>
11
12#include <QDBusObjectPath>
13
14#include "../device.h"
15
16#include "device.h"
17
18class ActiveConnection : public QObject
19{
21 Q_CLASSINFO("D-Bus Interface", "org.kde.fakenetwork.Connection.Active")
22public:
23 explicit ActiveConnection(QObject *parent = nullptr);
24 ~ActiveConnection() override;
25
26 Q_PROPERTY(QDBusObjectPath Connection READ connection)
27 Q_PROPERTY(bool Default READ default4)
28 Q_PROPERTY(bool Default6 READ default6)
29 Q_PROPERTY(QList<QDBusObjectPath> Devices READ devices)
30 Q_PROPERTY(QDBusObjectPath Dhcp4Config READ dhcp4Config)
31 Q_PROPERTY(QDBusObjectPath Dhcp6Config READ dhcp6Config)
32 Q_PROPERTY(QDBusObjectPath Ip4Config READ ip4Config)
33 Q_PROPERTY(QDBusObjectPath Ip6Config READ ip6Config)
34 Q_PROPERTY(QDBusObjectPath Master READ master)
35 Q_PROPERTY(QDBusObjectPath SpecificObject READ specificObject)
36 Q_PROPERTY(uint State READ state)
37 Q_PROPERTY(QString Id READ id)
38 Q_PROPERTY(QString Uuid READ uuid)
39 Q_PROPERTY(QString Type READ type)
40 Q_PROPERTY(bool Vpn READ vpn)
41
42 QDBusObjectPath connection() const;
43 bool default4() const;
44 bool default6() const;
45 QList<QDBusObjectPath> devices() const;
46 QDBusObjectPath dhcp4Config() const;
47 QDBusObjectPath dhcp6Config() const;
48 QDBusObjectPath ip4Config() const;
49 QDBusObjectPath ip6Config() const;
50 QDBusObjectPath master() const;
51 QDBusObjectPath specificObject() const;
52 uint state() const;
53 QString id() const;
54 QString uuid() const;
55 QString type() const;
56 bool vpn() const;
57
58 /* Not part of DBus interface */
59 void addDevice(const QDBusObjectPath &path);
60 void removeDevice(const QDBusObjectPath &device);
61 QString activeConnectionPath() const;
62 void setActiveConnectionPath(const QString &path);
63 void setConnection(const QDBusObjectPath &connection);
64 void setDefault4(bool default4);
65 void setDefault6(bool default6);
66 void setDhcp4Config(const QDBusObjectPath &dhcp4Config);
67 void setDhcp6Config(const QDBusObjectPath &dhcp6Config);
68 void setIpv4Config(const QDBusObjectPath &ipv4Config);
69 void setIpv6Config(const QDBusObjectPath &ipv6Config);
70 void setMaster(const QDBusObjectPath &master);
71 void setSpecificObject(const QDBusObjectPath &specificObject);
72 void setState(uint state);
73 void setId(const QString &id);
74 void setUuid(const QString &uuid);
75 void setType(const QString &type);
76
78 Q_SCRIPTABLE void PropertiesChanged(const QVariantMap &properties);
79 Q_SCRIPTABLE void StateChanged(uint state, uint reason);
80
81private:
82 QDBusObjectPath m_connection;
83 bool m_default4;
84 bool m_default6;
85 QList<QDBusObjectPath> m_devices;
86 QDBusObjectPath m_dhcp4Config;
87 QDBusObjectPath m_dhcp6Config;
88 QDBusObjectPath m_ip4Config;
89 QDBusObjectPath m_ip6Config;
90 QDBusObjectPath m_master;
91 QDBusObjectPath m_specificObject;
92 uint m_state;
93 QString m_id;
94 QString m_uuid;
95 QString m_type;
96 bool m_vpn;
97
98 /* Not part of DBus interface */
99 QString m_activeConnectionPath;
100};
101
102#endif
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
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:46:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.