File indexing completed on 2024-05-05 17:42:51
0001 /* 0002 SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com> 0003 SPDX-FileCopyrightText: 2020 Douglas Kosovic <doug@uq.edu.au> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef PLASMA_NM_L2TP_WIDGET_H 0009 #define PLASMA_NM_L2TP_WIDGET_H 0010 0011 #include <NetworkManagerQt/VpnSetting> 0012 0013 #include "settingwidget.h" 0014 0015 namespace Ui 0016 { 0017 class L2tpWidget; 0018 } 0019 0020 class L2tpWidget : public SettingWidget 0021 { 0022 Q_OBJECT 0023 0024 enum AuthType { Password = 0, TLS }; 0025 0026 public: 0027 explicit L2tpWidget(const NetworkManager::VpnSetting::Ptr &setting, QWidget *parent = nullptr, Qt::WindowFlags f = {}); 0028 ~L2tpWidget() override; 0029 0030 void loadConfig(const NetworkManager::Setting::Ptr &setting) override; 0031 void loadSecrets(const NetworkManager::Setting::Ptr &setting) override; 0032 0033 QVariantMap setting() const override; 0034 0035 bool isValid() const override; 0036 0037 private Q_SLOTS: 0038 void updateStartDirUrl(const QUrl &); 0039 void showIpsec(); 0040 void showPpp(); 0041 0042 private: 0043 Ui::L2tpWidget *const m_ui; 0044 NetworkManager::VpnSetting::Ptr m_setting; 0045 NetworkManager::VpnSetting::Ptr m_tmpIpsecSetting; 0046 NetworkManager::VpnSetting::Ptr m_tmpPppSetting; 0047 }; 0048 0049 #endif // PLASMA_NM_L2TP_WIDGET_H