1/*
2 SPDX-FileCopyrightText: 2012-2013 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_VPN_SETTING_H
8#define NETWORKMANAGERQT_VPN_SETTING_H
9
10#include "setting.h"
11#include <networkmanagerqt/networkmanagerqt_export.h>
12
13#include <QString>
14
15namespace NetworkManager
16{
17class VpnSettingPrivate;
18
19/**
20 * Represents vpn setting
21 */
22class NETWORKMANAGERQT_EXPORT VpnSetting : public Setting
23{
24public:
25 typedef QSharedPointer<VpnSetting> Ptr;
26 typedef QList<Ptr> List;
27 VpnSetting();
28 explicit VpnSetting(const Ptr &other);
29 ~VpnSetting() override;
30
31 QString name() const override;
32
33 bool persistent() const;
34 void setPersistent(bool persistent);
35
36 void setServiceType(const QString &type);
37 QString serviceType() const;
38
39 uint timeout() const;
40 void setTimeout(uint timeout);
41
42 void setUsername(const QString &username);
43 QString username() const;
44
45 void setData(const NMStringMap &data);
46 NMStringMap data() const;
47
48 void setSecrets(const NMStringMap &secrets);
49 NMStringMap secrets() const;
50
51 void secretsFromMap(const QVariantMap &secrets) override;
52 QVariantMap secretsToMap() const override;
53
54 void secretsFromStringMap(const NMStringMap &map) override;
55 NMStringMap secretsToStringMap() const override;
56
57 void fromMap(const QVariantMap &setting) override;
58
59 QVariantMap toMap() const override;
60
61protected:
62 VpnSettingPrivate *d_ptr;
63
64private:
65 Q_DECLARE_PRIVATE(VpnSetting)
66};
67
68NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const VpnSetting &setting);
69
70}
71
72#endif // NETWORKMANAGERQT_VPN_SETTING_H
73

source code of networkmanager-qt/src/settings/vpnsetting.h