lomiri-connectivity-api
pptp-connection.h
Go to the documentation of this file.
1/*
2 * Copyright © 2015 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Pete Woods <pete.woods@canonical.com>
18 */
19
20#pragma once
21
23
24namespace connectivityqt
25{
26
27class Q_DECL_EXPORT PptpConnection : public VpnConnection
28{
29 Q_OBJECT
30
31public:
33
34 Q_ENUMS(MppeType)
35 enum class MppeType
36 {
37 MPPE_ALL,
38 MPPE_128,
39 MPPE_40
40 };
41
42 PptpConnection(const QDBusObjectPath& path, const QDBusConnection& connection);
43
44 virtual ~PptpConnection();
45
46 Type type() const override;
47
48 // Basic properties
49
50 Q_PROPERTY(QString gateway READ gateway WRITE setGateway NOTIFY gatewayChanged)
51 QString gateway() const;
52
53 Q_PROPERTY(QString user READ user WRITE setUser NOTIFY userChanged)
54 QString user() const;
55
56 Q_PROPERTY(QString password READ password WRITE setPassword NOTIFY passwordChanged)
57 QString password() const;
58
59 Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged)
60 QString domain() const;
61
62 // Advanced properties
63
64 Q_PROPERTY(bool allowPap READ allowPap WRITE setAllowPap NOTIFY allowPapChanged)
65 bool allowPap() const;
66
67 Q_PROPERTY(bool allowChap READ allowChap WRITE setAllowChap NOTIFY allowChapChanged)
68 bool allowChap() const;
69
70 Q_PROPERTY(bool allowMschap READ allowMschap WRITE setAllowMschap NOTIFY allowMschapChanged)
71 bool allowMschap() const;
72
74 bool allowMschapv2() const;
75
76 Q_PROPERTY(bool allowEap READ allowEap WRITE setAllowEap NOTIFY allowEapChanged)
77 bool allowEap() const;
78
79 Q_PROPERTY(bool requireMppe READ requireMppe WRITE setRequireMppe NOTIFY requireMppeChanged)
80 bool requireMppe() const;
81
84
86 bool mppeStateful() const;
87
89 bool bsdCompression() const;
90
92 bool deflateCompression() const;
93
96
98 bool sendPppEchoPackets() const;
99
100public Q_SLOTS:
101 // Basic properties
102
103 void setGateway(const QString &value);
104
105 void setUser(const QString &value);
106
107 void setPassword(const QString &value);
108
109 void setDomain(const QString &value);
110
111 // Advanced properties
112
113 void setAllowPap(bool value);
114
115 void setAllowChap(bool value);
116
117 void setAllowMschap(bool value);
118
119 void setAllowMschapv2(bool value);
120
121 void setAllowEap(bool value);
122
123 void setRequireMppe(bool value);
124
126
127 void setMppeStateful(bool value);
128
129 void setBsdCompression(bool value);
130
131 void setDeflateCompression(bool value);
132
133 void setTcpHeaderCompression(bool value);
134
135 void setSendPppEchoPackets(bool value);
136
137Q_SIGNALS:
138 // Basic properties
139
140 void gatewayChanged(const QString &value);
141
142 void userChanged(const QString &value);
143
144 void passwordChanged(const QString &value);
145
146 void domainChanged(const QString &value);
147
148 // Advanced properties
149
150 void allowPapChanged(bool value);
151
152 void allowChapChanged(bool value);
153
154 void allowMschapChanged(bool value);
155
156 void allowMschapv2Changed(bool value);
157
158 void allowEapChanged(bool value);
159
160 void requireMppeChanged(bool value);
161
163
164 void mppeStatefulChanged(bool value);
165
166 void bsdCompressionChanged(bool value);
167
169
171
173
174protected:
175 class Priv;
176 std::shared_ptr<Priv> d;
177};
178
179}
Definition pptp-connection.h:28
void tcpHeaderCompressionChanged(bool value)
void allowMschapChanged(bool value)
void mppeTypeChanged(MppeType value)
void gatewayChanged(const QString &value)
void allowChapChanged(bool value)
bool requireMppe
Definition pptp-connection.h:79
void setUser(const QString &value)
void sendPppEchoPacketsChanged(bool value)
void deflateCompressionChanged(bool value)
void setDeflateCompression(bool value)
bool sendPppEchoPackets
Definition pptp-connection.h:97
void setMppeType(MppeType value)
bool deflateCompression
Definition pptp-connection.h:91
void allowMschapv2Changed(bool value)
void setMppeStateful(bool value)
bool allowMschapv2
Definition pptp-connection.h:73
void setAllowMschapv2(bool value)
std::shared_ptr< Priv > d
Definition pptp-connection.h:176
bool allowEap
Definition pptp-connection.h:76
QString user
Definition pptp-connection.h:53
void domainChanged(const QString &value)
void setBsdCompression(bool value)
bool mppeStateful
Definition pptp-connection.h:85
void setRequireMppe(bool value)
void mppeStatefulChanged(bool value)
PptpConnection(const QDBusObjectPath &path, const QDBusConnection &connection)
Definition pptp-connection.cpp:113
void setAllowMschap(bool value)
void setDomain(const QString &value)
LOMIRI_DEFINES_PTRS(PptpConnection)
void userChanged(const QString &value)
void setSendPppEchoPackets(bool value)
void allowEapChanged(bool value)
void requireMppeChanged(bool value)
void allowPapChanged(bool value)
void setGateway(const QString &value)
MppeType
Definition pptp-connection.h:36
bool tcpHeaderCompression
Definition pptp-connection.h:94
bool bsdCompression
Definition pptp-connection.h:88
void passwordChanged(const QString &value)
QString gateway
Definition pptp-connection.h:50
MppeType mppeType
Definition pptp-connection.h:82
void bsdCompressionChanged(bool value)
void setPassword(const QString &value)
QString password
Definition pptp-connection.h:56
QString domain
Definition pptp-connection.h:59
void setTcpHeaderCompression(bool value)
bool allowPap
Definition pptp-connection.h:64
bool allowChap
Definition pptp-connection.h:67
bool allowMschap
Definition pptp-connection.h:70
VpnConnection(const QDBusObjectPath &path, const QDBusConnection &connection, QObject *parent=0)
Definition vpn-connection.cpp:70
Definition connectivity.cpp:37