Changeset View
Changeset View
Standalone View
Standalone View
vpn/l2tp/l2tpwidget.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright 2013 Jan Grulich <jgrulich@redhat.com> | 2 | Copyright 2013 Jan Grulich <jgrulich@redhat.com> | ||
3 | Copyright 2020 Douglas Kosovic <doug@uq.edu.au> | ||||
3 | 4 | | |||
4 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public | ||
6 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either | ||
7 | version 2.1 of the License, or (at your option) version 3, or any | 8 | version 2.1 of the License, or (at your option) version 3, or any | ||
8 | later version accepted by the membership of KDE e.V. (or its | 9 | later version accepted by the membership of KDE e.V. (or its | ||
9 | successor approved by the membership of KDE e.V.), which shall | 10 | successor approved by the membership of KDE e.V.), which shall | ||
10 | act as a proxy defined in Section 6 of version 3 of the license. | 11 | act as a proxy defined in Section 6 of version 3 of the license. | ||
Show All 17 Lines | |||||
28 | namespace Ui | 29 | namespace Ui | ||
29 | { | 30 | { | ||
30 | class L2tpWidget; | 31 | class L2tpWidget; | ||
31 | } | 32 | } | ||
32 | 33 | | |||
33 | class L2tpWidget : public SettingWidget | 34 | class L2tpWidget : public SettingWidget | ||
34 | { | 35 | { | ||
35 | Q_OBJECT | 36 | Q_OBJECT | ||
37 | | ||||
38 | enum AuthType {Password = 0, TLS}; | ||||
39 | | ||||
36 | public: | 40 | public: | ||
37 | explicit L2tpWidget(const NetworkManager::VpnSetting::Ptr &setting, QWidget* parent = nullptr, Qt::WindowFlags f = {}); | 41 | explicit L2tpWidget(const NetworkManager::VpnSetting::Ptr &setting, QWidget* parent = nullptr, Qt::WindowFlags f = {}); | ||
38 | ~L2tpWidget() override; | 42 | ~L2tpWidget() override; | ||
39 | 43 | | |||
40 | void loadConfig(const NetworkManager::Setting::Ptr &setting) override; | 44 | void loadConfig(const NetworkManager::Setting::Ptr &setting) override; | ||
41 | void loadSecrets(const NetworkManager::Setting::Ptr &setting) override; | 45 | void loadSecrets(const NetworkManager::Setting::Ptr &setting) override; | ||
42 | 46 | | |||
43 | QVariantMap setting() const override; | 47 | QVariantMap setting() const override; | ||
44 | 48 | | |||
45 | bool isValid() const override; | 49 | bool isValid() const override; | ||
46 | 50 | | |||
47 | private Q_SLOTS: | 51 | private Q_SLOTS: | ||
48 | void userPasswordTypeChanged(int index); | 52 | void updateStartDirUrl(const QUrl &); | ||
49 | void showIpsec(); | 53 | void showIpsec(); | ||
50 | void showPpp(); | 54 | void showPpp(); | ||
51 | void certStateChanged(); | | |||
52 | 55 | | |||
53 | private: | 56 | private: | ||
54 | Ui::L2tpWidget * m_ui; | 57 | Ui::L2tpWidget * m_ui; | ||
55 | NetworkManager::VpnSetting::Ptr m_setting; | 58 | NetworkManager::VpnSetting::Ptr m_setting; | ||
56 | NetworkManager::VpnSetting::Ptr m_tmpIpsecSetting; | 59 | NetworkManager::VpnSetting::Ptr m_tmpIpsecSetting; | ||
57 | NetworkManager::VpnSetting::Ptr m_tmpPppSetting; | 60 | NetworkManager::VpnSetting::Ptr m_tmpPppSetting; | ||
58 | }; | 61 | }; | ||
59 | 62 | | |||
60 | #endif // PLASMA_NM_L2TP_WIDGET_H | 63 | #endif // PLASMA_NM_L2TP_WIDGET_H |