1/*
2 SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net>
3 SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef NETWORKMANAGERQT_SETTINGS_P_H
9#define NETWORKMANAGERQT_SETTINGS_P_H
10
11#include <QDBusObjectPath>
12
13#include "dbus/settingsinterface.h"
14#include "settings.h"
15
16class QDBusPendingCallWatcher;
17
18namespace NetworkManager
19{
20class SettingsPrivate : public NetworkManager::SettingsNotifier
21{
22 Q_OBJECT
23 friend class NetworkManagerPrivate;
24
25public:
26 SettingsPrivate();
27 Connection::List listConnections();
28 NetworkManager::Connection::Ptr findConnectionByUuid(const QString &uuid);
29 QString hostname() const;
30 bool canModify() const;
31 QDBusPendingReply<QDBusObjectPath> addConnection(const NMVariantMapMap &);
32 QDBusPendingReply<QDBusObjectPath> addConnectionUnsaved(const NMVariantMapMap &);
33 QDBusPendingReply<bool, QStringList> loadConnections(const QStringList &filenames);
34 void saveHostname(const QString &);
35 QDBusPendingReply<bool> reloadConnections();
36 Connection::Ptr findRegisteredConnection(const QString &);
37
38 OrgFreedesktopNetworkManagerSettingsInterface iface;
39 QMap<QString, Connection::Ptr> connections;
40 bool m_canModify;
41 QString m_hostname;
42protected Q_SLOTS:
43 void onConnectionAdded(const QDBusObjectPath &);
44 void onConnectionRemoved(const QDBusObjectPath &);
45 void onConnectionRemoved(const QString &);
46 void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
47 void propertiesChanged(const QVariantMap &properties);
48 void initNotifier();
49
50protected:
51 void daemonUnregistered();
52 void init();
53};
54
55}
56
57#endif
58

source code of networkmanager-qt/src/settings_p.h