NetworkManagerQt

fakenetwork/connection.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_CONNECTION_H
8#define NETWORKMANAGERQT_FAKE_NETWORK_SETTINGS_CONNECTION_H
9
10#include <QObject>
11
12#include <QDBusObjectPath>
13
14#include "../generictypes.h"
15
16class Connection : public QObject
17{
19 Q_CLASSINFO("D-Bus Interface", "org.kde.fakenetwork.Settings.Connection")
20public:
21 explicit Connection(QObject *parent = nullptr, const NMVariantMapMap &settings = NMVariantMapMap());
22 ~Connection() override;
23
24 Q_PROPERTY(bool Unsaved READ unsaved)
25
26 bool unsaved() const;
27
28 /* Not part of DBus interface */
29 QString connectionPath() const;
30 void setConnectionPath(const QString &path);
31
32public Q_SLOTS: // METHODS
33 Q_SCRIPTABLE void Delete();
34 Q_SCRIPTABLE NMVariantMapMap GetSecrets(const QString &setting_name);
35 Q_SCRIPTABLE NMVariantMapMap GetSettings();
36 Q_SCRIPTABLE void Save();
37 Q_SCRIPTABLE void Update(const NMVariantMapMap &properties);
38 Q_SCRIPTABLE void UpdateUnsaved(const NMVariantMapMap &properties);
39
41 void connectionRemoved(const QDBusObjectPath &path);
42 Q_SCRIPTABLE void Removed();
43 Q_SCRIPTABLE void Updated();
44 Q_SCRIPTABLE void PropertiesChanged(const QVariantMap &properties);
45
46private:
47 bool m_unsaved;
48 NMVariantMapMap m_settings;
49
50 /* Not part of DBus interface */
51 QString m_connectionPath;
52};
53
54#endif
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:46:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.