File indexing completed on 2024-04-14 03:57:37
0001 /* 0002 SPDX-FileCopyrightText: 2012-2013 Jan Grulich <jgrulich@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef NETWORKMANAGERQT_PPP_SETTING_H 0008 #define NETWORKMANAGERQT_PPP_SETTING_H 0009 0010 #include "setting.h" 0011 #include <networkmanagerqt/networkmanagerqt_export.h> 0012 0013 #include <QString> 0014 0015 namespace NetworkManager 0016 { 0017 class PppSettingPrivate; 0018 0019 /** 0020 * Represents ppp setting 0021 */ 0022 class NETWORKMANAGERQT_EXPORT PppSetting : public Setting 0023 { 0024 public: 0025 typedef QSharedPointer<PppSetting> Ptr; 0026 typedef QList<Ptr> List; 0027 PppSetting(); 0028 explicit PppSetting(const Ptr &other); 0029 ~PppSetting() override; 0030 0031 QString name() const override; 0032 0033 void setNoAuth(bool require); 0034 bool noAuth() const; 0035 0036 void setRefuseEap(bool refuse); 0037 bool refuseEap() const; 0038 0039 void setRefusePap(bool refuse); 0040 bool refusePap() const; 0041 0042 void setRefuseChap(bool refuse); 0043 bool refuseChap() const; 0044 0045 void setRefuseMschap(bool refuse); 0046 bool refuseMschap() const; 0047 0048 void setRefuseMschapv2(bool refuse); 0049 bool refuseMschapv2() const; 0050 0051 void setNoBsdComp(bool require); 0052 bool noBsdComp() const; 0053 0054 void setNoDeflate(bool require); 0055 bool noDeflate() const; 0056 0057 void setNoVjComp(bool require); 0058 bool noVjComp() const; 0059 0060 void setRequireMppe(bool require); 0061 bool requireMppe() const; 0062 0063 void setRequireMppe128(bool require); 0064 bool requireMppe128() const; 0065 0066 void setMppeStateful(bool used); 0067 bool mppeStateful() const; 0068 0069 void setCRtsCts(bool control); 0070 bool cRtsCts() const; 0071 0072 void setBaud(quint32 baud); 0073 quint32 baud() const; 0074 0075 void setMru(quint32 mru); 0076 quint32 mru() const; 0077 0078 void setMtu(quint32 mtu); 0079 quint32 mtu() const; 0080 0081 void setLcpEchoFailure(quint32 number); 0082 quint32 lcpEchoFailure() const; 0083 0084 void setLcpEchoInterval(quint32 interval); 0085 quint32 lcpEchoInterval() const; 0086 0087 void fromMap(const QVariantMap &setting) override; 0088 0089 QVariantMap toMap() const override; 0090 0091 protected: 0092 PppSettingPrivate *d_ptr; 0093 0094 private: 0095 Q_DECLARE_PRIVATE(PppSetting) 0096 }; 0097 0098 NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const PppSetting &setting); 0099 0100 } 0101 0102 #endif // NETWORKMANAGERQT_PPP_SETTING_H