connectivity-api: connectivityqt/pptp-connection.h Source File

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
22 #include <connectivityqt/vpn-connection.h>
23
24 namespace connectivityqt
25 {
26
27 class Q_DECL_EXPORT PptpConnection : public VpnConnection
28 {
29 Q_OBJECT
30
31 public:
32 UNITY_DEFINES_PTRS(PptpConnection);
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
73 Q_PROPERTY(bool allowMschapv2 READ allowMschapv2 WRITE setAllowMschapv2 NOTIFY allowMschapv2Changed)
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
82 Q_PROPERTY(MppeType mppeType READ mppeType WRITE setMppeType NOTIFY mppeTypeChanged)
83 MppeType mppeType() const;
84
85 Q_PROPERTY(bool mppeStateful READ mppeStateful WRITE setMppeStateful NOTIFY mppeStatefulChanged)
86 bool mppeStateful() const;
87
88 Q_PROPERTY(bool bsdCompression READ bsdCompression WRITE setBsdCompression NOTIFY bsdCompressionChanged)
89 bool bsdCompression() const;
90
91 Q_PROPERTY(bool deflateCompression READ deflateCompression WRITE setDeflateCompression NOTIFY deflateCompressionChanged)
92 bool deflateCompression() const;
93
94 Q_PROPERTY(bool tcpHeaderCompression READ tcpHeaderCompression WRITE setTcpHeaderCompression NOTIFY tcpHeaderCompressionChanged)
95 bool tcpHeaderCompression() const;
96
97 Q_PROPERTY(bool sendPppEchoPackets READ sendPppEchoPackets WRITE setSendPppEchoPackets NOTIFY sendPppEchoPacketsChanged)
98 bool sendPppEchoPackets() const;
99
100 public 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
125 void setMppeType(MppeType value);
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
137 Q_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
162 void mppeTypeChanged(MppeType value);
163
164 void mppeStatefulChanged(bool value);
165
166 void bsdCompressionChanged(bool value);
167
168 void deflateCompressionChanged(bool value);
169
170 void tcpHeaderCompressionChanged(bool value);
171
172 void sendPppEchoPacketsChanged(bool value);
173
174 protected:
175 class Priv;
176 std::shared_ptr<Priv> d;
177 };
178
179 }
vpn-connection.h
connectivityqt::VpnConnection
Definition: vpn-connection.h:32
connectivityqt
Definition: connectivity.cpp:37
connectivityqt::VpnConnection::Type
Type
Definition: vpn-connection.h:41
connectivityqt::PptpConnection::UNITY_DEFINES_PTRS
UNITY_DEFINES_PTRS(PptpConnection)
connectivityqt::PptpConnection::MppeType
MppeType
Definition: pptp-connection.h:36
connectivityqt::PptpConnection
Definition: pptp-connection.h:28