summaryrefslogtreecommitdiffstats
path: root/src/newprofilewizard.h
blob: 431960b4a685db07da720e5f90a6fd2e0e13831e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
/***************************************************************************
 *   Copyright (C) 2004 by Christoph Thielecke                             *
 *   crissi99@gmx.de                                                       *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
//BEGIN INCLUDES
#ifndef NEWPROFILEWIZARD_H
#define NEWPROFILEWIZARD_H

#include <tqwizard.h>
#include <tqwidget.h>
#include <tqhbox.h>
#include <tqvbox.h>
#include <tqstring.h>
#include <tqobject.h>
#include <tqpixmap.h>


#include "kvpncconfig.h"

#include "newprofilewizardtypeselection.h"
#include "newprofilewizardgeneral.h"
#include "newprofilewizardciscoselection.h"
#include "newprofilewizardciscomanually.h"
#include "importprofiledialog.h" // PCF import
#include "importopenvpnprofiledialog.h" //< OpenVPN import
#include "importipsecprofiledialog.h" //< IPSec import
#include "newprofilewizardracoon.h"
#include "newprofilewizardfreeswan.h"
#include "newprofilewizardopenvpn.h"
#include "newprofilewizardopenvpnauth.h"
#include "newprofilewizardopenvpnselection.h"
#include "newprofilewizardpptp.h"
#include "profilevtunoptions.h"
#include "profilesshoptions.h"
#include "newprofilewizardauthselection.h"
#include "newprofilewizardpsk.h"
#include "newprofilewizardcert.h"
#include "newprofilewizardstart.h"
#include "newprofilewizarduser.h"
#include "newprofilewizardnetwork.h"
#include "newprofilewizardnetworkroute.h"
#include "newprofilewizardnat.h"
#include "newprofilewizardp12certselection.h"
#include "importcertificatedialog.h"
#include "newprofilewizardconnectoptions.h"
#include "newprofilewizardconnectionstatuscheck.h"
#include "profilenetworkvirtualipoptions.h"
#include "profilenetworkrouteoptions.h"

//END INCLUDES

/**
Provides a wizard for creating a new profile

@author Christoph Thielecke
*/
class NewProfileWizard : public TQWizard
{
Q_OBJECT
  TQ_OBJECT
public:
	NewProfileWizard(KVpncConfig* GlobalConfig);

	void dataChanged( const TQString & );
	TQString getName();
	TQString getProfile();
	bool getFinished();
	bool newProfileCreated;
	bool daemonavailable; //< true if required is found, used for connecting after creating
	bool connectaftercreating; //< connect if successful created
	VpnAccountData *profileData;

public slots:
	void showPage( TQWidget* page );
	void next ();
	void back();
	void accept();
	void reject();
	void userdefinedOpenvpnPortToggeled(bool);
	void nsCertTypeOpenvpnToggled(bool);
	void additionalNetworkRoutesToggled(bool);
	void addNetworkRouteClicked();
	void delNetworkRouteClicked();
	void pskIsInFileToggled(bool);
	void useNatToggled(bool);
	void udpPortToggled(bool);
	void pingIpAfterConnectToggled(bool);
	void useSpecialServerCertificateToggled(bool);
	void useUserdefiniedCipherToggled(bool);
	void useHttpProxyToggeled(bool);
	void useTlsAuthToggled(bool);
	void useTlsRemoteHostToggled(bool);
	void connectionStatusCheckToggled(bool);
	void authenticateWithUsernameAndPasswordToggled(bool);
	void pskInputToggled(const TQString& str);
	void userpassToggled(const TQString& str);
	void usernameToggled(const TQString& str);
	void pskToggled(const TQString& str);
	void useRightNextHopToggled(bool);
	void useLeftNextHopToggled(bool);
	void domainNameToggled(bool);
	void idTypeToggled();
	void usePkcs11ProvidersToggled(bool);
	void useSmartcardToggled(bool);
	void useSmartcardOnCertFormateToggled(bool);
	void detectPkcs11Ids();
	void detectPkcs11Slots();
	void mtuToggled(bool);
	void mruToggled(bool);
	void useVirtualIpAddressToggled(bool);
	void usePortToggled(bool);
	void useAuthenticationAlgorithmToggled(bool);
	void useRemoteNetworkToggled(bool);
	void useEspToogled(bool);
	void useIkeToggled(bool);
	void remoteIDTypeRacoonToggled(const TQString&);
	void localIDTypeRacoonToggled(const TQString&);
	void remoteIDTypeIpsecToggled(const TQString&);
	void localIDTypeIpsecToggled(const TQString&);
	void defaultRouteToggled(const TQString&);
	void ikeGroupToggled(bool);
	void useXauthFreeswanToggled(bool);
	void useXauthRacoonToggled(bool);
	void tunnelDeviceTypeChanged(const TQString &);
	void useDnsServerToggled(bool);
	void useSearchDomainInResolvConfToggled(bool);
	void useDomainInResolvConfToggled(bool);
	//void reject();

protected:
	TQString ConnectionType;
	TQString Gateway;
	TQString ID;
	TQString Username;
	TQString UserPassword;
	TQString PreSharedKey;
	TQString ApplicationVersion;
	TQString NtDomainName;
	TQString PerfectForwardSecrecy;
	TQString IkeGroup;
	TQString DnsServer; //< userdefined DNS server for pptp
	TQString Name;
	TQString Description;
	bool saveUserPassword;
	bool savePsk;
	bool useApplicationVersion;
	bool useGlobalIpsecSecret;
	bool useIkeGroup;
	bool useLocalPort;
	bool useNtDomainName;
	bool useSingleDes;
	bool useAdvancedSettings;
	bool usePerfectSecrecy;
	bool useUdp; //< True if NAT-T should be used
	bool useUdpPort; //< True if userdefined UDP port should be used
	bool useDnsServer; //< True if userdefined DNS server should be used
	bool useGetDnsFromPeer; //< True if DNS servers should be retrieved from peer (pptp)bool
	bool refuse40BitEncryption; //< True if 40 bit encryption is refused (pptp)
	bool refuse128BitEncryption; //< True if 128 bit encryption is refused (pptp)
	bool allowStatefulMode;
	bool useNoBsdComp;
	bool useNoDeflate;
	bool requireMppe; //< True if MPPE is required (pptp)
	bool refuseEap; //< True if EAP is refused (pptp)
	int Port;
	int UdpPort; //< Port number of UDP port

private:
	void setupPages();
	bool importProfile(VpnAccountData::ConnectionType ConnType);
	bool importCertificate();
	TQHBox *page1;
	TQHBox *newprofilewizardtypeselectionpage;
	TQHBox *newprofilewizardgeneralpage;
	TQHBox *newprofilewizardciscoselectionpage;
	TQHBox *newprofilewizardciscomanuallypage;
	TQHBox *newprofilewizardracoonpage;
	TQHBox *newprofilewizardfreeswanpage;
	TQHBox *newprofilewizardfreeswanselectionpage;
	TQHBox *newprofilewizardopenvpnpage;
	TQHBox *newprofilewizardopenvpnselectionpage;
	TQHBox *newprofilewizardopenvpnauthpage;
	TQHBox *newprofilewizardpptppage;
	TQHBox *newprofilewizardvtunpage;
	TQHBox *newprofilewizardsshpage;
	TQHBox *newprofilewizardauthselectionpage;
	TQHBox *newprofilewizardpskpage;
	TQHBox *newprofilewizardcertpage;
	TQHBox *newprofilewizardp12certselectionpage;
	TQHBox *newprofilewizarduserpage;
	TQHBox *newprofilewizardnetworkpage;
	TQHBox *newprofilewizardvirtualipaddresspage;
	TQHBox *newprofilewizardnetworkroutepage;
	TQHBox *newprofilewizardnatpage;
	TQHBox *newprofilewizardconnectionstatuscheckpage;
	TQHBox *newprofilewizardconnectoptionspage;
	TQHBox *endpage;
	NewProfileWizardTypeSelection *newprofilewizardtypeselectionpagecontent;
	NewProfileWizardGeneral *newprofilewizardgeneralpagecontent;
	NewProfileWizardCiscoSelection *newprofilewizardciscoselectionpagecontent;
	NewProfileWizardCiscoManually *newprofilewizardciscomanuallypagecontent;
	NewProfileWizardRacoon *newprofilewizardracoonpagecontent;
	NewProfileWizardFreeswan *newprofilewizardfreeswanpagecontent;
	NewProfileWizardOpenvpnSelection *newprofilewizardfreeswanselectionpagecontent;
	NewProfileWizardOpenvpn *newprofilewizardopenvpnpagecontent;
	NewProfileWizardOpenvpnAuth *newprofilewizardopenvpnauthpagecontent;
	NewProfileWizardOpenvpnSelection *newprofilewizardopenvpnselectionpagecontent;
	NewProfileWizardPptp *newprofilewizardpptppagecontent;
	ProfileVtunOptions *newprofilewizardvtunpagecontent;
	ProfileSshOptions *newprofilewizardsshpagecontent;
	NewProfileWizardAuthSelection *newprofilewizardauthselectioncontent;
	NewProfileWizardPsk *newprofilewizardpskcontent;
	NewProfileWizardCert *newprofilewizardcertcontent;
	NewProfileWizardStart *newprofilewizardstartcontent;
	NewProfileWizardP12CertSelection *newprofilewizardp12certselectioncontent;
	NewProfileWizardUser *newprofilewizarduserpagecontent;
	NewProfileWizardNetwork *newprofilewizardnetworkcontent;
	ProfileNetworkRouteOptions *newprofilewizardnetworkroutecontent;
	NewProfileWizardNat *newprofilewizardnatcontent;
	NewProfileWizardConnectionStatusCheck *newprofilewizardconnectionstatuscheckcontent;
	NewProfileWizardConnectOptions *newprofilewizardconnectoptionscontent;
	ProfileNetworkVirtualIpOptions *profilenetworkvirtualipoptionscontent;
	KVpncConfig* GlobalConfig; //< pointer to global config class
	TQWidget* currentpage; // pointer to current page
	TQWidget* previouspage; //< pointer to previous page
	bool finished;
	bool enterdatamanually; //< enter data manually
	bool useCert; //< use certificate for authentication
	bool importOK; //< import was successful
	TQPixmap *SetupPixmap;
	TQPixmap *SetupPixmapFinal;

};

#endif