56
|
1 |
/*
|
|
2 |
* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* Implementation of the class CReaderXML
|
|
16 |
*/
|
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
|
|
20 |
#include "cdcreaderxml.h"
|
|
21 |
#include "cdclogger.h"
|
|
22 |
|
|
23 |
#include <utf.h>
|
|
24 |
#include <cmpluginpacketdatadef.h>
|
|
25 |
#include <cmplugindialcommondefs.h>
|
|
26 |
#include <cmpluginlandef.h>
|
|
27 |
#include <cmpluginwlandef.h>
|
|
28 |
#include <cmpluginvpndef.h>
|
|
29 |
#include <cmconnectionmethoddef.h>
|
|
30 |
|
|
31 |
using namespace CMManager;
|
|
32 |
|
|
33 |
//TYPE DECLARATION
|
|
34 |
|
|
35 |
//CONSTANTS
|
|
36 |
//
|
|
37 |
// Literals in XML header
|
|
38 |
_LIT16( KXmlVersion, "xml version" );
|
|
39 |
_LIT16( KEncoding, "encoding" );
|
|
40 |
_LIT16( KEncodingUtf8, "UTF-8" );
|
|
41 |
|
|
42 |
// File tail marker
|
|
43 |
_LIT16( KFileTail, "</Variant>");
|
|
44 |
_LIT16( KFileTail2, "</Data>");
|
|
45 |
|
|
46 |
// Feature head markers
|
|
47 |
_LIT16( KFeatureHeadPacketData, "<APs>" );
|
|
48 |
_LIT16( KFeatureHeadWLAN, "<WLAN_APs>" );
|
|
49 |
_LIT16( KFeatureHeadLAN, "<LAN_APs>" );
|
|
50 |
_LIT16( KFeatureHeadVPN, "<VPN_APs>" );
|
|
51 |
_LIT16( KFeatureHeadGlobal, "<Global>" );
|
|
52 |
_LIT16( KFeatureHeadDN, "<DNs>" );
|
|
53 |
|
|
54 |
// Feature tail markers
|
|
55 |
_LIT16( KFeatureTailPacketData, "</APs>" );
|
|
56 |
_LIT16( KFeatureTailWLAN, "</WLAN_APs>" );
|
|
57 |
_LIT16( KFeatureTailLAN, "</LAN_APs>" );
|
|
58 |
_LIT16( KFeatureTailVPN, "</VPN_APs>" );
|
|
59 |
_LIT16( KFeatureTailGlobal, "</Global>" );
|
|
60 |
_LIT16( KFeatureTailDN, "</DNs>" );
|
|
61 |
|
|
62 |
// Feature data head markers
|
|
63 |
_LIT16( KDataHeadPacketData, "<AP>" );
|
|
64 |
_LIT16( KDataHeadWLAN, "<WLAN_AP>" );
|
|
65 |
_LIT16( KDataHeadLAN, "<LAN_AP>" );
|
|
66 |
_LIT16( KDataHeadVPN, "<VPN_AP>" );
|
|
67 |
_LIT16( KDataHeadDN, "<DN>" );
|
|
68 |
|
|
69 |
// Feature data tail markers
|
|
70 |
_LIT16( KDataTailPacketData, "</AP>" );
|
|
71 |
_LIT16( KDataTailWLAN, "</WLAN_AP>" );
|
|
72 |
_LIT16( KDataTailLAN, "</LAN_AP>" );
|
|
73 |
_LIT16( KDataTailVPN, "</VPN_AP>" );
|
|
74 |
_LIT16( KDataTailDN, "</DN>" );
|
|
75 |
|
|
76 |
// Parameter Markers
|
|
77 |
// <ParamName>ParamValue</ParamName>
|
|
78 |
_LIT16( KParamValueHead, ">" );
|
|
79 |
_LIT16( KParamValueTail, "</" );
|
|
80 |
_LIT16( KParamNameHead, "<" );
|
|
81 |
_LIT16( KParamNameTail, ">" );
|
|
82 |
|
|
83 |
|
|
84 |
//maximum line size
|
|
85 |
const TInt16 KMaxLineSize = 1024;
|
|
86 |
//maximum item (tag) size
|
|
87 |
const TInt16 KMaxItemLength = 100;
|
|
88 |
|
|
89 |
// ratio between ascii and unicode character sizes
|
|
90 |
const TUint KAsciiUnicodeRatio = 2;
|
|
91 |
|
|
92 |
// Following table contains the input parameter names:
|
|
93 |
//
|
|
94 |
// Name Type Description
|
|
95 |
//----------------------------------------------------------------------------
|
|
96 |
//General & Gprs specific:
|
|
97 |
//========================
|
|
98 |
//KConnectionName string The name of the access point.
|
|
99 |
//KProtected string Protection
|
|
100 |
//KHidden string CM/DN is hidden
|
|
101 |
//KHiddenAgent string CM/DN is not shown in CConnDlg
|
|
102 |
//KHighlighted string CM/DN is highlighted in CConnDlg
|
|
103 |
//KSeamlessness string Seamlessness value
|
|
104 |
//KGprs_AP_Name string Access point name.
|
|
105 |
//KUserName string Login user name
|
|
106 |
//KPromptPassword string Prompts the user for username and
|
|
107 |
// password
|
|
108 |
//KPassword string Login password.
|
|
109 |
//KPasswordAuthType string Disables plain text authentication.
|
|
110 |
//KWAPGatewayIP string WAP gateway address (IP address).
|
|
111 |
//KStartingPage string WAP start page URL.
|
|
112 |
//KWTLS_Security string Attempts a secure WTLS connection
|
|
113 |
// to the gateway.
|
|
114 |
//KWAP_ConnectionType string Indicates whether a connection-
|
|
115 |
// oriented or connectionless API
|
|
116 |
// should be used.
|
|
117 |
//KPhoneIP string IP address of the interface.
|
|
118 |
//KPrimaryNameServer string IP address of the primary name
|
|
119 |
// server.
|
|
120 |
//KSecondaryNameServer string IP address of the secondary name
|
|
121 |
// server.
|
|
122 |
//KProxyServerAddress string Proxy server address.
|
|
123 |
//KProxyPortNumber string Proxy port number.
|
|
124 |
//KProxyProtocolName string Proxy protocol name.
|
|
125 |
//KPrimaryIP6NameServer string IP address of the primary IPv6
|
|
126 |
// name server.
|
|
127 |
//KSecondaryIP6NameServer string IP address of the secondary IPv6
|
|
128 |
// name server.
|
|
129 |
//KNetworkType string Network type: IPv4 or IPv6
|
|
130 |
//KGprsUseEdge string Sets the GprsUseEdge parameter
|
|
131 |
//=============
|
|
132 |
//LAN specific:
|
|
133 |
//=============
|
|
134 |
//KLanIfNetworks string Network protcols
|
|
135 |
//KLanIpNetMask string IP net mask of interface
|
|
136 |
//KLanIpGateway string IP address of gateway
|
|
137 |
//==============
|
|
138 |
//WLAN specific:
|
|
139 |
//==============
|
|
140 |
//KNetworkName string The name of the WLAN network
|
|
141 |
//KNetworkMode string The WLAN network mode
|
|
142 |
//KSecurityMode string The security mode of the WLAN network
|
|
143 |
//KWlanIpGatewayAddress string IP address of gateway
|
|
144 |
//KWlanIpNetMask string IP net mask of interface
|
|
145 |
//KWlanChannelId integer 802.11 Channel ID (1-14)
|
|
146 |
|
|
147 |
//---------------
|
|
148 |
//WEP security
|
|
149 |
//---------------
|
|
150 |
//WEPKeyInUse integer Index of the default WEP key
|
|
151 |
//WEPAuthType string WEP authentication mode.
|
|
152 |
//WEPKey1Length string Key length of WEP key1. 64, 128, 256 bit.
|
|
153 |
//WEPKey1Format string Format of WEP key 1. ASCII or Hexadecimal
|
|
154 |
//WEPKey1Data string Data of WEP key1
|
|
155 |
//WEPKey2Length string Key length of WEP key2. 64, 128, 256 bit.
|
|
156 |
//WEPKey2Format string Format of WEP key 2. ASCII or Hexadecimal
|
|
157 |
//WEPKey2Data string Data of WEP key2
|
|
158 |
//WEPKey3Length string Key length of WEP key3. 64, 128, 256 bit.
|
|
159 |
//WEPKey3Format string Format of WEP key 3. ASCII or Hexadecimal
|
|
160 |
//WEPKey3Data string Data of WEP key3
|
|
161 |
//WEPKey4Length string Key length of WEP key4. 64, 128, 256 bit.
|
|
162 |
//WEPKey4Format string Format of WEP key 4. ASCII or Hexadecimal
|
|
163 |
//WEPKey4Data string Data of WEP key4
|
|
164 |
//---------------
|
|
165 |
//WPA security
|
|
166 |
//---------------
|
|
167 |
//WPAPresharedKey string WPA/WPA2 pre-shared key in plain text.
|
|
168 |
//WPAKeyLength integer The length of the WPA/WPA2 pre-shared key.
|
|
169 |
//WPAEapMethod string A EAP method in use
|
|
170 |
//WPAUseOfPresharedKey string WPA/WPA2 pre-shared key usage.
|
|
171 |
//=============
|
|
172 |
//VPN specific:
|
|
173 |
//=============
|
|
174 |
//KVpnIapName string IAP name used for the connection
|
|
175 |
//KVpnServicePolicy string Service policy ID
|
|
176 |
//====================
|
|
177 |
//Destination Networks
|
|
178 |
//====================
|
|
179 |
//KDN_Name string The name of the Destination Network
|
|
180 |
//KDN_Icon integer Index of icon assigned to the DN
|
|
181 |
//KDN_Metadata string Destination type
|
|
182 |
//KDN_Protection integer Protection level of the DN
|
|
183 |
//KDN_Hidden integer Shows whether DN is hidden or not
|
|
184 |
//KDN_IAPName string Name of a Connection Method that is
|
|
185 |
// bound to the DN
|
|
186 |
//KDN_IAPName2..10 string Same as above
|
|
187 |
//KDN_EmbeddedDN string Name of an Embedded DN that is bound
|
|
188 |
// to the DN
|
|
189 |
//===============
|
|
190 |
//Global settings
|
|
191 |
//===============
|
|
192 |
//KAttachMode string Gprs attach mode
|
|
193 |
//KDefaultAP string Default Gprs access point
|
|
194 |
//KTableProtection string Table level protection
|
|
195 |
//KDefaultDnIcon integer Default icon for DNs
|
|
196 |
//KPriorityLan integer Default priority for Lan bearer type
|
|
197 |
//KPriorityWlan integer Default priority for WLan bearer type
|
|
198 |
//KPriorityPan integer Default priority for Pan bearer type
|
|
199 |
//KPriorityGprsOut integer Default priority for outgoing Gprs
|
|
200 |
// bearer type
|
|
201 |
//KPriorityGprsIn integer Default priority for incoming Gprs
|
|
202 |
// bearer type
|
|
203 |
//KPriorityCdma2k integer Default priority for CDMA2000 bearer type
|
|
204 |
//KPriorityDialOut integer Default priority for incoming dial
|
|
205 |
// bearer type
|
|
206 |
//KPriorityDialIn integer Default priority for outgoing dial
|
|
207 |
// bearer type
|
|
208 |
//KPriorityVpn integer Default priority for Vpn bearer type
|
|
209 |
//KPriorityMip integer Default priority for Mip bearer type
|
|
210 |
//KUIPriorityLan integer Default UI priority for Lan bearer type
|
|
211 |
//KUIPriorityWlan integer Default UI priority for WLan bearer type
|
|
212 |
//KUIPriorityPan integer Default UI priority for Pan bearer type
|
|
213 |
//KUIPriorityGprsOut integer Default UI priority for outgoing Gprs
|
|
214 |
// bearer type
|
|
215 |
//KUIPriorityGprsIn integer Default UI priority for incoming Gprs
|
|
216 |
// bearer type
|
|
217 |
//KUIPriorityCdma2k integer Default UI priority for CDMA2000
|
|
218 |
// bearer type
|
|
219 |
//KUIPriorityDialOut integer Default UI priority for incoming dial
|
|
220 |
// bearer type
|
|
221 |
//KUIPriorityDialIn integer Default UI priority for outgoing dial
|
|
222 |
// bearer type
|
|
223 |
//KUIPriorityVpn integer Default UI priority for Vpn bearer type
|
|
224 |
//KUIPriorityMip integer Default UI priority for Mip bearer type
|
|
225 |
|
|
226 |
//KDefaultConnectionType integer Default connection method type
|
|
227 |
//KDefaultConnectionName string Default connection method name
|
|
228 |
|
|
229 |
//KUsageOfWlan integer Usage of known WLAN networks, automatical or manual
|
|
230 |
//KSeamlessnessHome integer Cellular data usage in home network
|
|
231 |
//KSeamlessnessVisitor integer Cellular data usage in foreign networks
|
|
232 |
|
|
233 |
|
|
234 |
//KGprsLastSocketActivityTimeout integer
|
|
235 |
//KGprsLastSessionClosedTimeout integer The time how long Gprs PDP context stays active
|
|
236 |
// after the last application using the connection was closed.
|
|
237 |
//KGprsLastSocketClosedTimeout integer
|
|
238 |
//KCsdLastSocketActivityTimeout integer
|
|
239 |
//KCsdLastSessionClosedTimeout integer
|
|
240 |
//KCsdLastSocketClosedTimeout integer
|
|
241 |
//KWlanLastSocketActivityTimeout integer
|
|
242 |
//KWlanLastSessionClosedTimeout integer
|
|
243 |
//KWlanLastSocketClosedTimeout integer
|
|
244 |
//KWlanBGScanInterval integer
|
|
245 |
//KWlanUseDefSettings integer
|
|
246 |
//KWlanLongRetry integer
|
|
247 |
//KWlanShortRetry integer
|
|
248 |
//KWlanRTS integer
|
|
249 |
//KWlanTxPowerLevel integer
|
|
250 |
//KWlanRadioMeasurements integer
|
|
251 |
//KWlanPowerMode integer Whether WLAN power save is on or off
|
|
252 |
|
|
253 |
|
|
254 |
//String literals defined for input parameters
|
|
255 |
|
|
256 |
//General & Gprs specific
|
|
257 |
_LIT16( KConnectionName, "ConnectionName" );
|
|
258 |
_LIT16( KConnectionId, "ConnectionId" );
|
|
259 |
_LIT16( KProtected, "Protected" );
|
|
260 |
_LIT16( KHidden, "Hidden" );
|
|
261 |
_LIT16( KHiddenAgent, "HiddenAgent" );
|
|
262 |
_LIT16( KHighlighted, "Highlighted" );
|
|
263 |
_LIT16( KSeamlessness, "Seamlessness" );
|
|
264 |
_LIT16( KGprs_AP_Name, "Gprs_AP_Name" );
|
|
265 |
_LIT16( KUserName, "UserName" );
|
|
266 |
_LIT16( KPromptPassword, "PromptPassword" );
|
|
267 |
_LIT16( KPassword, "Password" );
|
|
268 |
_LIT16( KPasswordAuthType, "PasswordAuthenticationType" );
|
|
269 |
_LIT16( KWAPGatewayIP, "WAPGatewayIP" );
|
|
270 |
_LIT16( KStartingPage, "StartingPage" );
|
|
271 |
_LIT16( KWTLS_Security, "WTLS_Security" );
|
|
272 |
_LIT16( KWAP_ConnectionType, "WAP_ConnectionType" );
|
|
273 |
_LIT16( KPhoneIP, "PhoneIP" );
|
|
274 |
_LIT16( KPrimaryNameServer, "PrimaryNameServer" );
|
|
275 |
_LIT16( KSecondaryNameServer, "SecondaryNameServer" );
|
|
276 |
_LIT16( KProxyServerAddress, "ProxyServerAddress" );
|
|
277 |
_LIT16( KProxyPortNumber, "ProxyPortNumber" );
|
|
278 |
_LIT16( KProxyProtocolName, "ProxyProtocolName");
|
|
279 |
_LIT16( KPrimaryIP6NameServer, "PrimaryIP6NameServer" );
|
|
280 |
_LIT16( KSecondaryIP6NameServer, "SecondaryIP6NameServer" );
|
|
281 |
_LIT16( KNetworkType, "NetworkType");
|
|
282 |
_LIT16( KIspType, "IspType" );
|
|
283 |
_LIT16( KGprsUseEdge, "GprsUseEdge");
|
|
284 |
_LIT16( KLinger, "Linger");
|
|
285 |
|
|
286 |
//Lan specific
|
|
287 |
_LIT16( KLanIfNetworks, "LanIfNetworks" );
|
|
288 |
_LIT16( KLanIpNetMask, "LanIpNetMask" );
|
|
289 |
_LIT16( KLanIpGateway, "LanIpGateway" );
|
|
290 |
_LIT16( KLanIpAddrFromServer, "IpAddrFromServer" );
|
|
291 |
_LIT16( KLanIpDNSAddrFromServer, "IpDNSAddrFromServer" );
|
|
292 |
_LIT16( KLanConfigDaemonManagerName,"ConfigDaemonManagerName" );
|
|
293 |
_LIT16( KLanConfigDaemonName, "ConfigDaemonName" );
|
|
294 |
|
|
295 |
//Wlan specific
|
|
296 |
_LIT16( KNetworkName, "NetworkName" );
|
|
297 |
_LIT16( KNetworkMode, "NetworkMode" );
|
|
298 |
_LIT16( KSecurityMode, "SecurityMode" );
|
|
299 |
_LIT16( KWlanIpGatewayAddress, "WlanIpGatewayAddress" );
|
|
300 |
_LIT16( KWlanIpNetMask, "WlanIpNetMask" );
|
|
301 |
_LIT16( KWlanScanSSId, "WlanScanSSId" );
|
|
302 |
_LIT16( KWlanChannelId, "WlanChannelId" );
|
|
303 |
|
|
304 |
//WEP security
|
|
305 |
_LIT16( KWEPKeyInUse, "WEPKeyInUse" );
|
|
306 |
_LIT16( KWEPAuthType, "WEPAuthType" );
|
|
307 |
_LIT16( KWEPKey1Length, "WEPKey1Length" );
|
|
308 |
_LIT16( KWEPKey1Format, "WEPKey1Format" );
|
|
309 |
_LIT16( KWEPKey1Data, "WEPKey1Data" );
|
|
310 |
_LIT16( KWEPKey2Length, "WEPKey2Length" );
|
|
311 |
_LIT16( KWEPKey2Format, "WEPKey2Format" );
|
|
312 |
_LIT16( KWEPKey2Data, "WEPKey2Data" );
|
|
313 |
_LIT16( KWEPKey3Length, "WEPKey3Length" );
|
|
314 |
_LIT16( KWEPKey3Format, "WEPKey3Format" );
|
|
315 |
_LIT16( KWEPKey3Data, "WEPKey3Data" );
|
|
316 |
_LIT16( KWEPKey4Length, "WEPKey4Length" );
|
|
317 |
_LIT16( KWEPKey4Format, "WEPKey4Format" );
|
|
318 |
_LIT16( KWEPKey4Data, "WEPKey4Data" );
|
|
319 |
|
|
320 |
//WPA security
|
|
321 |
_LIT16( KWPAPresharedKey, "WPAPresharedKey" );
|
|
322 |
_LIT16( KWPAKeyLength, "WPAKeyLength" );
|
|
323 |
_LIT16( KWPAEapMethod, "WPAEapMethod");
|
|
324 |
_LIT16( KWPAUseOfPresharedKey, "WPAUseOfPresharedKey" );
|
|
325 |
|
|
326 |
//EAP security
|
|
327 |
_LIT16( KEapGtcUsername, "EapGtcUsername" );
|
|
328 |
_LIT16( KEapGtcSessionValidityTime, "EapGtcSessionValidityTime" );
|
|
329 |
_LIT16( KEapGtcEncapsulation, "EapGtcEncapsulation" );
|
|
330 |
|
|
331 |
|
|
332 |
_LIT16( KEapTlsUsername, "EapTlsUsername" );
|
|
333 |
_LIT16( KEapTlsRealm, "EapTlsRealm" );
|
|
334 |
_LIT16( KEapTlsVerifyServerRealm, "EapTlsVerifyServerRealm" );
|
|
335 |
_LIT16( KEapTlsRequireClientAuth, "EapTlsRequireClientAuth" );
|
|
336 |
_LIT16( KEapTlsSessionValidityTime, "EapTlsSessionValidityTime" );
|
|
337 |
_LIT16( KEapTlsCipherSuites, "EapTlsCipherSuites" );
|
|
338 |
_LIT16( KEapTlsUserCertSubjectKeyId,"EapTlsUserCertSubjectKeyId" );
|
|
339 |
_LIT16( KEapTlsUserCertIssuerName, "EapTlsUserCertIssuerName" );
|
|
340 |
_LIT16( KEapTlsUserCertSerialNumber,"EapTlsUserCertSerialNumber" );
|
|
341 |
_LIT16( KEapTlsCaCertSubjectKeyId, "EapTlsCaCertSubjectKeyId" );
|
|
342 |
_LIT16( KEapTlsCaCertIssuerName, "EapTlsCaCertIssuerName" );
|
|
343 |
_LIT16( KEapTlsCaCertSerialNumber, "EapTlsCaCertSerialNumber" );
|
|
344 |
_LIT16( KEapTlsEncapsulation, "EapTlsEncapsulation" );
|
|
345 |
|
|
346 |
|
|
347 |
_LIT16( KEapLeapUsername, "EapLeapUsername" );
|
|
348 |
_LIT16( KEapLeapPassword, "EapLeapPassword" );
|
|
349 |
_LIT16( KEapLeapSessionValidityTime,"EapLeapSessionValidityTime" );
|
|
350 |
|
|
351 |
|
|
352 |
_LIT16( KEapSimUsername, "EapSimUsername" );
|
|
353 |
_LIT16( KEapSimRealm, "EapSimRealm" );
|
|
354 |
_LIT16( KEapSimUsePseudonyms, "EapSimUsePseudonyms" );
|
|
355 |
_LIT16( KEapSimSessionValidityTime, "EapSimSessionValidityTime" );
|
|
356 |
_LIT16( KEapSimEncapsulation, "EapSimEncapsulation" );
|
|
357 |
|
|
358 |
_LIT16( KEapTtlsUsername, "EapTtlsUsername" );
|
|
359 |
_LIT16( KEapTtlsRealm, "EapTtlsRealm" );
|
|
360 |
_LIT16( KEapTtlsVerifyServerRealm, "EapTtlsVerifyServerRealm" );
|
|
361 |
_LIT16( KEapTtlsRequireClientAuth, "EapTtlsRequireClientAuth" );
|
|
362 |
_LIT16( KEapTtlsSessionValidityTime,"EapTtlsSessionValidityTime" );
|
|
363 |
_LIT16( KEapTtlsCipherSuites, "EapTtlsCipherSuites" );
|
|
364 |
_LIT16( KEapTtlsEncapsulatedTypes, "EapTtlsEncapsulatedTypes" );
|
|
365 |
_LIT16( KEapTtlsUserCertSubjectKeyId,"EapTtlsUserCertSubjectKeyId" );
|
|
366 |
_LIT16( KEapTtlsUserCertIssuerName, "EapTtlsUserCertIssuerName" );
|
|
367 |
_LIT16( KEapTtlsUserCertSerialNumber,"EapTtlsUserCertSerialNumber" );
|
|
368 |
_LIT16( KEapTtlsCaCertSubjectKeyId, "EapTtlsCaCertSubjectKeyId" );
|
|
369 |
_LIT16( KEapTtlsCaCertIssuerName, "EapTtlsCaCertIssuerName" );
|
|
370 |
_LIT16( KEapTtlsCaCertSerialNumber, "EapTtlsCaCertSerialNumber" );
|
|
371 |
|
|
372 |
_LIT16( KEapAkaUsername, "EapAkaUsername" );
|
|
373 |
_LIT16( KEapAkaRealm, "EapAkaRealm" );
|
|
374 |
_LIT16( KEapAkaUsePseudonyms, "EapAkaUsePseudonyms" );
|
|
375 |
_LIT16( KEapAkaSessionValidityTime, "EapAkaSessionValidityTime" );
|
|
376 |
_LIT16( KEapAkaEncapsulation, "EapAkaEncapsulation" );
|
|
377 |
|
|
378 |
_LIT16( KEapPeapUsername, "EapPeapUsername" );
|
|
379 |
_LIT16( KEapPeapRealm, "EapPeapRealm" );
|
|
380 |
_LIT16( KEapPeapVerifyServerRealm, "EapPeapVerifyServerRealm" );
|
|
381 |
_LIT16( KEapPeapRequireClientAuth, "EapPeapRequireClientAuth" );
|
|
382 |
_LIT16( KEapPeapSessionValidityTime,"EapPeapSessionValidityTime" );
|
|
383 |
_LIT16( KEapPeapCipherSuites, "EapPeapCipherSuites" );
|
|
384 |
_LIT16( KEapPeapV0Allowed, "EapPeapV0Allowed" );
|
|
385 |
_LIT16( KEapPeapV1Allowed, "EapPeapV1Allowed" );
|
|
386 |
_LIT16( KEapPeapV2Allowed, "EapPeapV2Allowed" );
|
|
387 |
_LIT16( KEapPeapEncapsulatedTypes, "EapPeapEncapsulatedTypes" );
|
|
388 |
_LIT16( KEapPeapUserCertSubjectKeyId,"EapPeapUserCertSubjectKeyId" );
|
|
389 |
_LIT16( KEapPeapUserCertIssuerName, "EapPeapUserCertIssuerName" );
|
|
390 |
_LIT16( KEapPeapUserCertSerialNumber,"EapPeapUserCertSerialNumber" );
|
|
391 |
_LIT16( KEapPeapCaCertSubjectKeyId, "EapPeapCaCertSubjectKeyId" );
|
|
392 |
_LIT16( KEapPeapCaCertIssuerName, "EapPeapCaCertIssuerName" );
|
|
393 |
_LIT16( KEapPeapCaCertSerialNumber, "EapPeapCaCertSerialNumber" );
|
|
394 |
|
|
395 |
_LIT16( KEapMschapv2Username, "EapMschapv2Username" );
|
|
396 |
_LIT16( KEapMschapv2Password, "EapMschapv2Password" );
|
|
397 |
_LIT16( KEapMschapv2SessionValidityTime,"EapMschapv2SessionValidityTime" );
|
|
398 |
_LIT16( KEapMschapv2Encapsulation, "EapMschapv2Encapsulation" );
|
|
399 |
|
|
400 |
_LIT16( KEapFastUsername, "EapFastUsername" );
|
|
401 |
_LIT16( KEapFastRealm, "EapFastRealm" );
|
|
402 |
_LIT16( KEapFastVerifyServerRealm, "EapFastVerifyServerRealm" );
|
|
403 |
_LIT16( KEapFastRequireClientAuth, "EapFastRequireClientAuth" );
|
|
404 |
_LIT16( KEapFastSessionValidityTime,"EapFastSessionValidityTime" );
|
|
405 |
_LIT16( KEapFastCipherSuites, "EapFastCipherSuites" );
|
|
406 |
_LIT16( KEapFastEncapsulatedTypes, "EapFastEncapsulatedTypes" );
|
|
407 |
_LIT16( KEapFastAuthProvModeAllowed,"EapFastAuthProvModeAllowed" );
|
|
408 |
_LIT16( KEapFastUnauthProvModeAllowed,"EapFastUnauthProvModeAllowed" );
|
|
409 |
_LIT16( KEapFastWarnADHPNoPAC, "EapFastWarnADHPNoPAC" );
|
|
410 |
_LIT16( KEapFastWarnADHPNoMatchingPAC,"EapFastWarnADHPNoMatchingPAC" );
|
|
411 |
_LIT16( KEapFastWarnNotDefaultServer,"EapFastWarnNotDefaultServer" );
|
|
412 |
_LIT16( KEapFastUserCertSubjectKeyId,"EapFastUserCertSubjectKeyId" );
|
|
413 |
_LIT16( KEapFastUserCertIssuerName, "EapFastUserCertIssuerName" );
|
|
414 |
_LIT16( KEapFastUserCertSerialNumber,"EapFastUserCertSerialNumber" );
|
|
415 |
_LIT16( KEapFastCaCertSubjectKeyId, "EapFastCaCertSubjectKeyId" );
|
|
416 |
_LIT16( KEapFastCaCertIssuerName, "EapFastCaCertIssuerName" );
|
|
417 |
_LIT16( KEapFastCaCertSerialNumber, "EapFastCaCertSerialNumber" );
|
|
418 |
|
|
419 |
_LIT16( KMschapv2Username, "Mschapv2Username" );
|
|
420 |
_LIT16( KMschapv2Password, "Mschapv2Password" );
|
|
421 |
_LIT16( KMschapv2SessionValidityTime,"Mschapv2SessionValidityTime" );
|
|
422 |
_LIT16( KMschapv2Encapsulation, "Mschapv2Encapsulation" );
|
|
423 |
|
|
424 |
|
|
425 |
//VPN specific
|
|
426 |
_LIT16( KVpnIapName, "IAP_Name" );
|
|
427 |
_LIT16( KVpnServicePolicy, "Policy_ID" );
|
|
428 |
|
|
429 |
//DN specific
|
|
430 |
_LIT16( KDN_Name, "Name" );
|
|
431 |
_LIT16( KDN_Id, "DNId" );
|
|
432 |
_LIT16( KDN_Icon, "Icon" );
|
|
433 |
_LIT16( KDN_Metadata, "Metadata" );
|
|
434 |
_LIT16( KDN_Protection, "Protection" );
|
|
435 |
_LIT16( KDN_EmbeddedDNName, "EmbeddedDN" );
|
|
436 |
_LIT16( KDN_IAPName, "IAP" );
|
|
437 |
|
|
438 |
// Needed because of Customization Tool limitations
|
|
439 |
_LIT16( KDN_IAPName2, "IAP2" );
|
|
440 |
_LIT16( KDN_IAPName3, "IAP3" );
|
|
441 |
_LIT16( KDN_IAPName4, "IAP4" );
|
|
442 |
_LIT16( KDN_IAPName5, "IAP5" );
|
|
443 |
_LIT16( KDN_IAPName6, "IAP6" );
|
|
444 |
_LIT16( KDN_IAPName7, "IAP7" );
|
|
445 |
_LIT16( KDN_IAPName8, "IAP8" );
|
|
446 |
_LIT16( KDN_IAPName9, "IAP9" );
|
|
447 |
_LIT16( KDN_IAPName10, "IAP10" );
|
|
448 |
|
|
449 |
//Global settings
|
|
450 |
_LIT16( KAttachMode, "Attachmode" );
|
|
451 |
_LIT16( KDefaultAP, "DefaultAP" );
|
|
452 |
_LIT16( KDefaultDnIcon, "DefaultDnIcon" );
|
|
453 |
_LIT16( KPriorityLan, "PriorityLan" );
|
|
454 |
_LIT16( KPriorityWlan, "PriorityWlan" );
|
|
455 |
_LIT16( KPriorityPan, "PriorityPan" );
|
|
456 |
_LIT16( KPriorityGprsOut, "PriorityGprsOut" );
|
|
457 |
_LIT16( KPriorityGprsIn, "PriorityGprsIn" );
|
|
458 |
_LIT16( KPriorityCdma2k, "PriorityCdma2k" );
|
|
459 |
_LIT16( KPriorityDialOut, "PriorityDialOut" );
|
|
460 |
_LIT16( KPriorityDialIn, "PriorityDialIn" );
|
|
461 |
_LIT16( KPriorityVpn, "PriorityVpn" );
|
|
462 |
_LIT16( KPriorityMip, "PriorityMip" );
|
|
463 |
_LIT16( KUIPriorityLan, "UIPriorityLan" );
|
|
464 |
_LIT16( KUIPriorityWlan, "UIPriorityWlan" );
|
|
465 |
_LIT16( KUIPriorityPan, "UIPriorityPan" );
|
|
466 |
_LIT16( KUIPriorityGprsOut, "UIPriorityGprsOut" );
|
|
467 |
_LIT16( KUIPriorityGprsIn, "UIPriorityGprsIn" );
|
|
468 |
_LIT16( KUIPriorityCdma2k, "UIPriorityCdma2k" );
|
|
469 |
_LIT16( KUIPriorityDialOut, "UIPriorityDialOut" );
|
|
470 |
_LIT16( KUIPriorityDialIn, "UIPriorityDialIn" );
|
|
471 |
_LIT16( KUIPriorityVpn, "UIPriorityVpn" );
|
|
472 |
_LIT16( KUIPriorityMip, "UIPriorityMip" );
|
|
473 |
_LIT16( KUsageOfWlan, "UsageOfWlan" );
|
|
474 |
_LIT16( KCellularDataUsageHome, "CellularDataUsageHome" );
|
|
475 |
_LIT16( KCellularDataUsageVisitor, "CellularDataUsageVisitor" );
|
|
476 |
_LIT16( KGprsLastSocketActivityTimeout, "GprsLastSocketActivityTimeout" );
|
|
477 |
_LIT16( KGprsLastSessionClosedTimeout, "GprsLastSessionClosedTimeout" );
|
|
478 |
_LIT16( KGprsLastSocketClosedTimeout, "GprsLastSocketClosedTimeout" );
|
|
479 |
_LIT16( KWlanLastSocketActivityTimeout, "WlanLastSocketActivityTimeout" );
|
|
480 |
_LIT16( KWlanLastSessionClosedTimeout, "WlanLastSessionClosedTimeout" );
|
|
481 |
_LIT16( KWlanLastSocketClosedTimeout, "WlanLastSocketClosedTimeout" );
|
|
482 |
_LIT16( KWlanBGScanInterval, "WlanBGScanInterval" );
|
|
483 |
_LIT16( KWlanUseDefSettings, "WlanUseDefSettings" );
|
|
484 |
_LIT16( KWlanLongRetry, "WlanLongRetry" );
|
|
485 |
_LIT16( KWlanShortRetry, "WlanShortRetry" );
|
|
486 |
_LIT16( KWlanRTS, "WlanRTS" );
|
|
487 |
_LIT16( KWlanTxPowerLevel, "WlanTxPowerLevel" );
|
|
488 |
_LIT16( KWlanRadioMeasurements, "WlanRadioMeasurements" );
|
|
489 |
_LIT16( KWlanPowerMode, "WlanPowerMode" );
|
|
490 |
|
|
491 |
|
|
492 |
// ================= MEMBER FUNCTIONS =======================
|
|
493 |
|
|
494 |
// ---------------------------------------------------------
|
|
495 |
// CReaderXML::NewL
|
|
496 |
// ---------------------------------------------------------
|
|
497 |
//
|
|
498 |
CReaderXML* CReaderXML::NewLC( const TDesC& aInFileName,
|
|
499 |
const TDbCreatorInputCharSet aCharSet )
|
|
500 |
{
|
|
501 |
CReaderXML* self = new ( ELeave ) CReaderXML( aCharSet );
|
|
502 |
|
|
503 |
CleanupStack::PushL( self );
|
|
504 |
|
|
505 |
self->CReaderBase::ConstructL( aInFileName );
|
|
506 |
self->ConstructL();
|
|
507 |
|
|
508 |
return self;
|
|
509 |
}
|
|
510 |
|
|
511 |
|
|
512 |
// ---------------------------------------------------------
|
|
513 |
// CReaderXML::ConstructL
|
|
514 |
// ---------------------------------------------------------
|
|
515 |
//
|
|
516 |
void CReaderXML::ConstructL()
|
|
517 |
{
|
|
518 |
//if charset is not given as a parameter - detect it
|
|
519 |
if ( iCharSet == ECharSetUnknown )
|
|
520 |
{
|
|
521 |
DetectEncodingL();
|
|
522 |
}
|
|
523 |
|
|
524 |
FillPacketDataParams();
|
|
525 |
FillLanParams();
|
|
526 |
FillWLanParams();
|
|
527 |
FillVpnParams();
|
|
528 |
FillGlobalParams();
|
|
529 |
FillDNParams();
|
|
530 |
}
|
|
531 |
|
|
532 |
|
|
533 |
// ---------------------------------------------------------
|
|
534 |
// CReaderXML::CReaderXML
|
|
535 |
// ---------------------------------------------------------
|
|
536 |
//
|
|
537 |
CReaderXML::CReaderXML( const TDbCreatorInputCharSet aCharSet ) :
|
|
538 |
CReaderBase( EFileXML, EFeatureNone ),
|
|
539 |
iCharSet( aCharSet ),
|
|
540 |
iLine ( NULL ),
|
|
541 |
iFoundGlobal( EFalse )
|
|
542 |
{
|
|
543 |
//no implementation required
|
|
544 |
}
|
|
545 |
|
|
546 |
|
|
547 |
// ---------------------------------------------------------
|
|
548 |
// CReaderXML::~CReaderXML
|
|
549 |
// ---------------------------------------------------------
|
|
550 |
//
|
|
551 |
CReaderXML::~CReaderXML()
|
|
552 |
{
|
|
553 |
delete iLine;
|
|
554 |
|
|
555 |
iPDParams.Close();
|
|
556 |
iLanParams.Close();
|
|
557 |
iWLanParams.Close();
|
|
558 |
iVpnParams.Close();
|
|
559 |
iGlobalParams.Close();
|
|
560 |
iDNParams.Close();
|
|
561 |
}
|
|
562 |
|
|
563 |
|
|
564 |
// ---------------------------------------------------------
|
|
565 |
// CReaderXML::LocateFeature
|
|
566 |
// ---------------------------------------------------------
|
|
567 |
//
|
|
568 |
void CReaderXML::LocateFeatureL()
|
|
569 |
{
|
|
570 |
iCurrentFeature = EFeatureNone;
|
|
571 |
TInt result( KErrNone );
|
|
572 |
TBool eof( EFalse );
|
|
573 |
|
|
574 |
//looks for the next feature
|
|
575 |
while ( !eof && CurrentFeature() == EFeatureNone )
|
|
576 |
{
|
|
577 |
//reads the next line
|
|
578 |
result = ReadLineL();
|
|
579 |
|
|
580 |
if ( result == KErrEof )
|
|
581 |
{
|
|
582 |
//end of file
|
|
583 |
eof = ETrue;
|
|
584 |
}
|
|
585 |
else if ( result )
|
|
586 |
{
|
|
587 |
//other error
|
|
588 |
User::Leave( result );
|
|
589 |
}
|
|
590 |
else
|
|
591 |
{
|
|
592 |
//no error
|
|
593 |
if ( iLine->FindF( KFileTail ) == KErrNone ||
|
|
594 |
iLine->FindF( KFileTail2 ) == KErrNone )
|
|
595 |
{
|
|
596 |
//end of file is reached ("/variantvariant" found)
|
|
597 |
eof = ETrue;
|
|
598 |
}
|
|
599 |
else
|
|
600 |
{
|
|
601 |
//try to recognize a feature
|
|
602 |
iCurrentFeature = DetectFeatureHead();
|
|
603 |
}//else
|
|
604 |
}//else
|
|
605 |
}//while
|
|
606 |
}
|
|
607 |
|
|
608 |
|
|
609 |
// ---------------------------------------------------------
|
|
610 |
// CReaderXML::LocateAP
|
|
611 |
// ---------------------------------------------------------
|
|
612 |
//
|
|
613 |
TBool CReaderXML::LocateAPL()
|
|
614 |
{
|
|
615 |
TBool found( EFalse ); //found feature data
|
|
616 |
TBool eofea( EFalse ); //end of feature
|
|
617 |
|
|
618 |
if ( CurrentFeature() == EFeatureGlobal )
|
|
619 |
{
|
|
620 |
//for Global settings there is no feature data header
|
|
621 |
found = iFoundGlobal;
|
|
622 |
iFoundGlobal = EFalse;
|
|
623 |
}
|
|
624 |
else
|
|
625 |
{
|
|
626 |
//looks for the next feature header
|
|
627 |
while ( !eofea && !found )
|
|
628 |
{
|
|
629 |
User::LeaveIfError( ReadLineL() );
|
|
630 |
|
|
631 |
if ( DetectFeatureTail() )
|
|
632 |
{
|
|
633 |
//feature tail is detected - no more data to process
|
|
634 |
eofea = ETrue;
|
|
635 |
}
|
|
636 |
else
|
|
637 |
{
|
|
638 |
//looks for feature data header
|
|
639 |
switch ( CurrentFeature() )
|
|
640 |
{
|
|
641 |
case EFeaturePacketData:
|
|
642 |
found = ( iLine->FindF( KDataHeadPacketData ) != KErrNotFound );
|
|
643 |
break;
|
|
644 |
case EFeatureWLAN:
|
|
645 |
found = ( iLine->FindF( KDataHeadWLAN ) != KErrNotFound );
|
|
646 |
break;
|
|
647 |
case EFeatureLAN:
|
|
648 |
found = ( iLine->FindF( KDataHeadLAN ) != KErrNotFound );
|
|
649 |
break;
|
|
650 |
case EFeatureVPN:
|
|
651 |
found = ( iLine->FindF( KDataHeadVPN ) != KErrNotFound );
|
|
652 |
break;
|
|
653 |
case EFeatureDN:
|
|
654 |
found = ( iLine->FindF( KDataHeadDN ) != KErrNotFound );
|
|
655 |
break;
|
|
656 |
}//switch
|
|
657 |
}//else
|
|
658 |
}//while
|
|
659 |
}//else
|
|
660 |
|
|
661 |
return found;
|
|
662 |
|
|
663 |
}
|
|
664 |
|
|
665 |
|
|
666 |
// ---------------------------------------------------------
|
|
667 |
// CReaderXML::ParseAPL
|
|
668 |
// ---------------------------------------------------------
|
|
669 |
//
|
|
670 |
void CReaderXML::ParseAPL()
|
|
671 |
{
|
|
672 |
do
|
|
673 |
{
|
|
674 |
User::LeaveIfError( ReadLineL() );
|
|
675 |
TInt fieldId = DetectParam();
|
|
676 |
|
|
677 |
if ( fieldId != KErrNotFound )
|
|
678 |
{
|
|
679 |
HBufC16* param = ReadParam( EParamValue );
|
|
680 |
if ( param )
|
|
681 |
{
|
|
682 |
ConvertSpecialXMLChars( param );
|
|
683 |
CleanupStack::PushL( param );
|
|
684 |
TagContainer().AddL( param , fieldId );
|
|
685 |
CleanupStack::Pop( param );
|
|
686 |
}
|
|
687 |
else
|
|
688 |
{
|
|
689 |
//simply skip line
|
|
690 |
}
|
|
691 |
}
|
|
692 |
|
|
693 |
}
|
|
694 |
while ( !DetectTailAP() );
|
|
695 |
}
|
|
696 |
|
|
697 |
// ---------------------------------------------------------
|
|
698 |
// CReaderXML::Reset
|
|
699 |
// ---------------------------------------------------------
|
|
700 |
//
|
|
701 |
TInt CReaderXML::Reset()
|
|
702 |
{
|
|
703 |
iFilePos = 0;
|
|
704 |
return InputFile().Seek( ESeekStart, iFilePos );
|
|
705 |
}
|
|
706 |
|
|
707 |
|
|
708 |
// ---------------------------------------------------------
|
|
709 |
// CReaderXML::ToDoLog
|
|
710 |
// ---------------------------------------------------------
|
|
711 |
//
|
|
712 |
void CReaderXML::ToDoLog()
|
|
713 |
{
|
|
714 |
CLOG_WRITE( "Line :" )
|
|
715 |
FileLogger().Write( *iLine );
|
|
716 |
CLOG_WRITE( "--------------------------------------------\n\n" )
|
|
717 |
}
|
|
718 |
|
|
719 |
// ---------------------------------------------------------
|
|
720 |
// Private methods
|
|
721 |
// ---------------------------------------------------------
|
|
722 |
|
|
723 |
// ---------------------------------------------------------
|
|
724 |
// CReaderXML::ReadLine
|
|
725 |
// ---------------------------------------------------------
|
|
726 |
//
|
|
727 |
TInt CReaderXML::ReadLineL()
|
|
728 |
{
|
|
729 |
//go to the actual position
|
|
730 |
TInt result = InputFile().Seek(ESeekStart, iFilePos);
|
|
731 |
|
|
732 |
//temporary buffer for line
|
|
733 |
TBuf8<KMaxLineSize> buf;
|
|
734 |
|
|
735 |
if (result == KErrNone)
|
|
736 |
{
|
|
737 |
result = InputFile().Read(buf, buf.MaxSize());
|
|
738 |
}
|
|
739 |
|
|
740 |
//if seeking and reading both succesful extract one line form the buffer
|
|
741 |
if (result == KErrNone)
|
|
742 |
{
|
|
743 |
TPtrC8 ptrBuf8;
|
|
744 |
ptrBuf8.Set( buf );
|
61
|
745 |
|
|
746 |
switch ( iCharSet )
|
|
747 |
{
|
|
748 |
case ECharSetUnicode:
|
|
749 |
{
|
|
750 |
//simply copy to a Unicode descriptor
|
|
751 |
TPtrC16 ptrBuf16( ( TText16* )ptrBuf8.Ptr(), \
|
|
752 |
ptrBuf8.Length() / KAsciiUnicodeRatio );
|
56
|
753 |
|
61
|
754 |
TPtrC16 ptrLine;
|
|
755 |
result = ExtractLine(ptrBuf16, ptrLine);
|
56
|
756 |
|
61
|
757 |
if ( result == KErrNone )
|
|
758 |
{
|
|
759 |
delete iLine;
|
|
760 |
iLine = NULL;
|
|
761 |
iLine = ptrLine.AllocL();
|
56
|
762 |
|
61
|
763 |
//Increment the file position
|
|
764 |
iFilePos += iLine->Length() * KAsciiUnicodeRatio;
|
|
765 |
}
|
|
766 |
|
|
767 |
break;
|
|
768 |
}
|
|
769 |
case ECharSetAscii:
|
|
770 |
case ECharSetUtf8:
|
|
771 |
default:
|
|
772 |
{
|
|
773 |
//conversion to Unicode is needed
|
|
774 |
HBufC16* hBuf16 = HBufC16::NewLC( KMaxLineSize );
|
|
775 |
TPtr16 ptrBuf16( hBuf16->Des() );
|
|
776 |
|
|
777 |
if( iCharSet == ECharSetUtf8 )
|
|
778 |
{
|
|
779 |
CnvUtfConverter::ConvertToUnicodeFromUtf8
|
|
780 |
( ptrBuf16, ptrBuf8 );
|
|
781 |
}
|
|
782 |
else
|
|
783 |
{
|
|
784 |
ptrBuf16.Copy( ptrBuf8 );
|
|
785 |
}
|
56
|
786 |
|
61
|
787 |
TPtrC16 ptrLine;
|
|
788 |
result = ExtractLine(ptrBuf16, ptrLine);
|
|
789 |
|
|
790 |
if ( result == KErrNone )
|
|
791 |
{
|
|
792 |
delete iLine;
|
|
793 |
iLine = NULL;
|
|
794 |
iLine = ptrLine.AllocL();
|
56
|
795 |
|
61
|
796 |
// Increment the file position
|
|
797 |
// Line in unicode format converted back to UTF-8
|
|
798 |
// for getting the right lenght and osition in file
|
|
799 |
CnvUtfConverter::ConvertFromUnicodeToUtf8(
|
|
800 |
buf, iLine->Des() );
|
|
801 |
iFilePos += buf.Length();
|
|
802 |
}
|
56
|
803 |
|
61
|
804 |
CleanupStack::PopAndDestroy( hBuf16 );
|
56
|
805 |
|
61
|
806 |
break;
|
|
807 |
}//case
|
|
808 |
}//switch
|
56
|
809 |
}//if
|
|
810 |
|
|
811 |
return result;
|
|
812 |
}
|
|
813 |
|
|
814 |
|
|
815 |
// ---------------------------------------------------------
|
|
816 |
// CReaderXML::ExtractLine
|
|
817 |
// ---------------------------------------------------------
|
|
818 |
//
|
|
819 |
TInt CReaderXML::ExtractLine(const TPtrC16& aBuffer, TPtrC16& aLine)
|
|
820 |
{
|
|
821 |
// Whitespace characters
|
|
822 |
const TChar KSpace = ' ';
|
|
823 |
const TChar KNewLine = '\n';
|
|
824 |
const TChar KCarriageReturn = '\r';
|
|
825 |
const TChar KTab = '\t';
|
|
826 |
const TChar KTagStart = '<';
|
|
827 |
|
|
828 |
|
|
829 |
// A line is considered to contain one parameter. It starts from the
|
|
830 |
// current position and lasts until the end of the current parameter.
|
|
831 |
// The end is detected by looking for the characters ">" and "<" with
|
|
832 |
// any number of white spaces between them. The next line will start at
|
|
833 |
// the "<" character.
|
|
834 |
TBool lineEndFound( EFalse );
|
|
835 |
TBool tagEndFound( EFalse );
|
|
836 |
TInt pos( 0 );
|
|
837 |
while( !lineEndFound && pos < aBuffer.Length() )
|
|
838 |
{
|
|
839 |
if( !tagEndFound && KParamNameTail.iBuf[ 0 ] == aBuffer[ pos ] )
|
|
840 |
{
|
|
841 |
tagEndFound = ETrue;
|
|
842 |
}
|
|
843 |
else if( tagEndFound && KParamNameHead.iBuf[ 0 ] == aBuffer[ pos ] )
|
|
844 |
{
|
|
845 |
lineEndFound = ETrue;
|
|
846 |
break;
|
|
847 |
}
|
|
848 |
|
|
849 |
else if( ( KSpace != aBuffer[ pos ] ) &&
|
|
850 |
( KNewLine != aBuffer[ pos ] ) &&
|
|
851 |
( KCarriageReturn != aBuffer[ pos ] ) &&
|
|
852 |
( KTab != aBuffer[ pos ] ) &&
|
|
853 |
tagEndFound )
|
|
854 |
{
|
|
855 |
tagEndFound = EFalse;
|
|
856 |
}
|
|
857 |
++pos;
|
|
858 |
}
|
|
859 |
|
|
860 |
if( !lineEndFound )
|
|
861 |
{
|
|
862 |
//End of line not found--malformed xml file or no more data
|
|
863 |
//get highest file position; and check EoF
|
|
864 |
TInt hiPos = 0;
|
|
865 |
|
|
866 |
if (InputFile().Size(hiPos) != KErrNone)
|
|
867 |
{
|
|
868 |
return KErrGeneral;
|
|
869 |
}
|
|
870 |
|
|
871 |
//check for end of file
|
|
872 |
if ( aBuffer.Length() < KMaxLineSize )
|
|
873 |
{
|
|
874 |
aLine.Set( aBuffer );
|
|
875 |
return KErrEof;
|
|
876 |
}
|
|
877 |
else
|
|
878 |
{
|
|
879 |
return KErrNotFound;
|
|
880 |
}
|
|
881 |
}
|
|
882 |
|
|
883 |
aLine.Set( aBuffer.Left( pos ) );
|
|
884 |
|
|
885 |
return KErrNone ;
|
|
886 |
}
|
|
887 |
|
|
888 |
// ---------------------------------------------------------
|
|
889 |
// CReaderXML::DetectFeatureHead
|
|
890 |
// ---------------------------------------------------------
|
|
891 |
//
|
|
892 |
TDbCreatorFeatures CReaderXML::DetectFeatureHead()
|
|
893 |
{
|
|
894 |
TDbCreatorFeatures feature( EFeatureNone );
|
|
895 |
|
|
896 |
if ( iLine->FindF( KFeatureHeadPacketData ) != KErrNotFound )
|
|
897 |
{
|
|
898 |
CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeaturePacketData" );
|
|
899 |
feature = EFeaturePacketData;
|
|
900 |
}
|
|
901 |
else if ( iLine->FindF( KFeatureHeadWLAN ) != KErrNotFound )
|
|
902 |
{
|
|
903 |
CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureWLAN" );
|
|
904 |
feature = EFeatureWLAN;
|
|
905 |
}
|
|
906 |
else if ( iLine->FindF( KFeatureHeadLAN ) != KErrNotFound )
|
|
907 |
{
|
|
908 |
CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureLAN" );
|
|
909 |
feature = EFeatureLAN;
|
|
910 |
}
|
|
911 |
else if ( iLine->FindF( KFeatureHeadVPN ) != KErrNotFound )
|
|
912 |
{
|
|
913 |
CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureVPN" );
|
|
914 |
feature = EFeatureVPN;
|
|
915 |
}
|
|
916 |
else if ( iLine->FindF( KFeatureHeadDN ) != KErrNotFound )
|
|
917 |
{
|
|
918 |
CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureDN" );
|
|
919 |
feature = EFeatureDN;
|
|
920 |
}
|
|
921 |
else if ( iLine->FindF( KFeatureHeadGlobal ) != KErrNotFound )
|
|
922 |
{
|
|
923 |
CLOG_WRITE( "CReaderXML::DetectFeatureHead(): EFeatureGlobal" );
|
|
924 |
feature = EFeatureGlobal;
|
|
925 |
iFoundGlobal = ETrue;
|
|
926 |
}
|
|
927 |
else
|
|
928 |
{
|
|
929 |
//feature not found
|
|
930 |
}
|
|
931 |
|
|
932 |
return feature;
|
|
933 |
|
|
934 |
}
|
|
935 |
|
|
936 |
|
|
937 |
// ---------------------------------------------------------
|
|
938 |
// CReaderXML::DetectFeatureTail
|
|
939 |
// ---------------------------------------------------------
|
|
940 |
//
|
|
941 |
TBool CReaderXML::DetectFeatureTail()
|
|
942 |
{
|
|
943 |
TBool found( EFalse );
|
|
944 |
|
|
945 |
switch ( CurrentFeature() )
|
|
946 |
{
|
|
947 |
case EFeaturePacketData:
|
|
948 |
found = ( iLine->FindF( KFeatureTailPacketData ) != KErrNotFound );
|
|
949 |
break;
|
|
950 |
case EFeatureWLAN:
|
|
951 |
found = ( iLine->FindF( KFeatureTailWLAN ) != KErrNotFound );
|
|
952 |
break;
|
|
953 |
case EFeatureLAN:
|
|
954 |
found = ( iLine->FindF( KFeatureTailLAN ) != KErrNotFound );
|
|
955 |
break;
|
|
956 |
case EFeatureVPN:
|
|
957 |
found = ( iLine->FindF( KFeatureTailVPN ) != KErrNotFound );
|
|
958 |
break;
|
|
959 |
case EFeatureDN:
|
|
960 |
found = ( iLine->FindF( KFeatureTailDN ) != KErrNotFound );
|
|
961 |
break;
|
|
962 |
case EFeatureGlobal:
|
|
963 |
found = ( iLine->FindF( KFeatureTailGlobal ) != KErrNotFound );
|
|
964 |
break;
|
|
965 |
}
|
|
966 |
|
|
967 |
return found;
|
|
968 |
}
|
|
969 |
|
|
970 |
|
|
971 |
// ---------------------------------------------------------
|
|
972 |
// CReaderXML::DetectTailAP
|
|
973 |
// ---------------------------------------------------------
|
|
974 |
//
|
|
975 |
TBool CReaderXML::DetectTailAP()
|
|
976 |
{
|
|
977 |
TBool found( EFalse );
|
|
978 |
|
|
979 |
switch ( CurrentFeature() )
|
|
980 |
{
|
|
981 |
case EFeaturePacketData:
|
|
982 |
found = ( iLine->FindF( KDataTailPacketData ) != KErrNotFound );
|
|
983 |
break;
|
|
984 |
case EFeatureWLAN:
|
|
985 |
found = ( iLine->FindF( KDataTailWLAN ) != KErrNotFound );
|
|
986 |
break;
|
|
987 |
case EFeatureLAN:
|
|
988 |
found = ( iLine->FindF( KDataTailLAN ) != KErrNotFound );
|
|
989 |
break;
|
|
990 |
case EFeatureVPN:
|
|
991 |
found = ( iLine->FindF( KDataTailVPN ) != KErrNotFound );
|
|
992 |
break;
|
|
993 |
case EFeatureDN:
|
|
994 |
found = ( iLine->FindF( KDataTailDN ) != KErrNotFound );
|
|
995 |
break;
|
|
996 |
case EFeatureGlobal:
|
|
997 |
//there is no data tail for Global settings -- looks for feature tail
|
|
998 |
found = ( iLine->FindF( KFeatureTailGlobal ) != KErrNotFound );
|
|
999 |
break;
|
|
1000 |
}
|
|
1001 |
|
|
1002 |
return found;
|
|
1003 |
}
|
|
1004 |
|
|
1005 |
|
|
1006 |
// ---------------------------------------------------------
|
|
1007 |
// CReaderXML::DetectParamL
|
|
1008 |
// ---------------------------------------------------------
|
|
1009 |
//
|
|
1010 |
TInt CReaderXML::DetectParam()
|
|
1011 |
{
|
|
1012 |
TInt fieldId( KErrNotFound ); //field id of detected parameter
|
|
1013 |
RArray<EInputParams> *params( NULL ); //pointer to the table used
|
|
1014 |
//for or detection
|
|
1015 |
|
|
1016 |
switch ( CurrentFeature() )
|
|
1017 |
{
|
|
1018 |
case EFeaturePacketData:
|
|
1019 |
params = &iPDParams;
|
|
1020 |
break;
|
|
1021 |
case EFeatureWLAN:
|
|
1022 |
params = &iWLanParams;
|
|
1023 |
break;
|
|
1024 |
case EFeatureLAN:
|
|
1025 |
params = &iLanParams;
|
|
1026 |
break;
|
|
1027 |
case EFeatureVPN:
|
|
1028 |
params = &iVpnParams;
|
|
1029 |
break;
|
|
1030 |
case EFeatureDN:
|
|
1031 |
params = &iDNParams;
|
|
1032 |
break;
|
|
1033 |
case EFeatureGlobal:
|
|
1034 |
params = &iGlobalParams;
|
|
1035 |
break;
|
|
1036 |
default:
|
|
1037 |
User::Panic( KPanicInvalidCase, KErrInvalidCase );
|
|
1038 |
}
|
|
1039 |
|
|
1040 |
//looks for parameter match
|
|
1041 |
HBufC16* paramName = ReadParam( EParamName );
|
|
1042 |
if ( paramName == NULL )
|
|
1043 |
{
|
|
1044 |
return fieldId;
|
|
1045 |
}
|
|
1046 |
|
|
1047 |
TBool found ( EFalse );
|
|
1048 |
for ( TInt idx = 0; idx < params->Count() && !found; idx++ )
|
|
1049 |
{
|
|
1050 |
if ( paramName->CompareF( (*params)[idx].iParam ) == 0 )
|
|
1051 |
{
|
|
1052 |
fieldId = (*params)[idx].iId;
|
|
1053 |
found = ETrue;
|
|
1054 |
}
|
|
1055 |
}
|
|
1056 |
|
|
1057 |
delete paramName;
|
|
1058 |
return fieldId;
|
|
1059 |
}
|
|
1060 |
|
|
1061 |
|
|
1062 |
// ---------------------------------------------------------
|
|
1063 |
// CReaderXML::ReadParam
|
|
1064 |
// ---------------------------------------------------------
|
|
1065 |
//
|
|
1066 |
HBufC16* CReaderXML::ReadParam( TParamSegment aSegment )
|
|
1067 |
{
|
|
1068 |
TBuf<KMaxItemLength> tag; //local buffer
|
|
1069 |
TInt posh( 0 ); //header position
|
|
1070 |
TInt post( 0 ); //tail position
|
|
1071 |
HBufC16* ret = NULL; // returned pointer
|
|
1072 |
|
|
1073 |
// calculation of the position
|
|
1074 |
//
|
|
1075 |
// EParamValue: posh| post|
|
|
1076 |
// | |
|
|
1077 |
// EParamName: posh| post|| |
|
|
1078 |
// ¡ ¡¡ ¡
|
|
1079 |
// <ParamName>ParamValue</ParamName>
|
|
1080 |
|
|
1081 |
switch ( aSegment )
|
|
1082 |
{
|
|
1083 |
case EParamValue:
|
|
1084 |
posh = iLine->Find( KParamValueHead ) + 1;
|
|
1085 |
post = iLine->Find( KParamValueTail );
|
|
1086 |
break;
|
|
1087 |
case EParamName:
|
|
1088 |
posh = iLine->Find( KParamNameHead ) + 1;
|
|
1089 |
post = iLine->Find( KParamNameTail );
|
|
1090 |
break;
|
|
1091 |
default:
|
|
1092 |
break;
|
|
1093 |
}
|
|
1094 |
|
|
1095 |
if ( posh == KErrNotFound || post == KErrNotFound || post == 0 )
|
|
1096 |
{
|
|
1097 |
//line must contain header and tail and longer than 0
|
|
1098 |
ret = NULL;
|
|
1099 |
}
|
|
1100 |
else
|
|
1101 |
{
|
|
1102 |
// Copis the value to the local buffer and allocates buffer
|
|
1103 |
tag.Copy( iLine->Mid( posh, post - posh ) );
|
|
1104 |
ret = tag.Alloc();
|
|
1105 |
// Checks the result.
|
|
1106 |
if( ret == NULL )
|
|
1107 |
{
|
|
1108 |
CLOG_WRITE_FORMAT( "! Warning: tag could not be allocated %S:",
|
|
1109 |
&tag );
|
|
1110 |
}
|
|
1111 |
// Debugging help; commented out for clearer log.
|
|
1112 |
// else
|
|
1113 |
// {
|
|
1114 |
// if (aSegment == EParamValue)
|
|
1115 |
// {
|
|
1116 |
// CLOG_WRITE_FORMAT( "CReaderXML::ReadParam: value %S", &tag );
|
|
1117 |
// }
|
|
1118 |
// else if (aSegment == EParamName)
|
|
1119 |
// {
|
|
1120 |
// CLOG_WRITE_FORMAT( "CReaderXML::ReadParam: name %S", &tag );
|
|
1121 |
// }
|
|
1122 |
// }
|
|
1123 |
}
|
|
1124 |
return ret;
|
|
1125 |
}
|
|
1126 |
|
|
1127 |
|
|
1128 |
// ---------------------------------------------------------
|
|
1129 |
// CReaderXML::DetectEncoding
|
|
1130 |
// ---------------------------------------------------------
|
|
1131 |
//
|
|
1132 |
void CReaderXML::DetectEncodingL()
|
|
1133 |
{
|
|
1134 |
TInt originalPos( iFilePos ); //stores original file position
|
|
1135 |
TBool found( EFalse );
|
|
1136 |
|
|
1137 |
for ( TInt i = ECharSetUnicode; i >= ECharSetAscii && !found; i--)
|
|
1138 |
{
|
|
1139 |
//assumes that the first line contains version and encoding info
|
|
1140 |
iFilePos = 0;
|
|
1141 |
iCharSet = static_cast<TDbCreatorInputCharSet>( i );
|
|
1142 |
|
|
1143 |
if ( ReadLineL() == KErrNone )
|
|
1144 |
{
|
|
1145 |
if( iCharSet == ECharSetAscii )
|
|
1146 |
{
|
|
1147 |
if ( ( iLine->FindF( KXmlVersion ) != KErrNotFound ) ||
|
|
1148 |
( iLine->FindF( KEncoding ) != KErrNotFound ) )
|
|
1149 |
{
|
|
1150 |
if( iLine->FindF( KEncodingUtf8 ) != KErrNotFound )
|
|
1151 |
{
|
|
1152 |
iCharSet = ECharSetUtf8;
|
|
1153 |
}
|
|
1154 |
found = ETrue;
|
|
1155 |
}
|
|
1156 |
}
|
|
1157 |
else if( iCharSet == ECharSetUnicode )
|
|
1158 |
{
|
|
1159 |
if ( ( iLine->FindF( KXmlVersion ) != KErrNotFound ) ||
|
|
1160 |
( iLine->FindF( KEncoding ) != KErrNotFound ) )
|
|
1161 |
{
|
|
1162 |
found = ETrue;
|
|
1163 |
}
|
|
1164 |
}
|
|
1165 |
}
|
|
1166 |
}
|
|
1167 |
iFilePos = originalPos;
|
|
1168 |
}
|
|
1169 |
|
|
1170 |
// ---------------------------------------------------------
|
|
1171 |
// CReaderXML::ConvertSpecialXMLChars
|
|
1172 |
// ---------------------------------------------------------
|
|
1173 |
//
|
|
1174 |
void CReaderXML::ConvertSpecialXMLChars( HBufC* aPtrTag )
|
|
1175 |
{
|
|
1176 |
if ( aPtrTag == NULL )
|
|
1177 |
{
|
|
1178 |
return;
|
|
1179 |
}
|
|
1180 |
_LIT16( escapeStart, "&" );
|
|
1181 |
|
|
1182 |
//check if there are parameters to be replaced, if not: return
|
|
1183 |
if ( aPtrTag->Des().Find( escapeStart ) == KErrNotFound )
|
|
1184 |
{
|
|
1185 |
return;
|
|
1186 |
}
|
|
1187 |
|
|
1188 |
_LIT16( spXML1, "<" );
|
|
1189 |
_LIT16( sp1, "<" );
|
|
1190 |
ReplaceInString( aPtrTag, spXML1, sp1 );
|
|
1191 |
_LIT16( spXML2, "&" );
|
|
1192 |
_LIT16( sp2, "&" );
|
|
1193 |
ReplaceInString( aPtrTag, spXML2, sp2 );
|
|
1194 |
_LIT16( spXML3, ">" );
|
|
1195 |
_LIT16( sp3, ">" );
|
|
1196 |
ReplaceInString( aPtrTag, spXML3, sp3 );
|
|
1197 |
_LIT16( spXML4, """ );
|
|
1198 |
_LIT16( sp4, "\"" );
|
|
1199 |
ReplaceInString( aPtrTag, spXML4, sp4 );
|
|
1200 |
_LIT16( spXML5, "'" );
|
|
1201 |
_LIT16( sp5, "\'" );
|
|
1202 |
ReplaceInString( aPtrTag, spXML5, sp5 );
|
|
1203 |
_LIT16( spXML6, "¡" );
|
|
1204 |
_LIT16( sp6, "\u00a1" );
|
|
1205 |
ReplaceInString( aPtrTag, spXML6, sp6 );
|
|
1206 |
_LIT16( spXML7, "¢" );
|
|
1207 |
_LIT16( sp7, "\u00a2" );
|
|
1208 |
ReplaceInString( aPtrTag, spXML7, sp7 );
|
|
1209 |
_LIT16( spXML8, "£" );
|
|
1210 |
_LIT16( sp8, "\u00a3" );
|
|
1211 |
ReplaceInString( aPtrTag, spXML8, sp8 );
|
|
1212 |
_LIT16( spXML9, "¤" );
|
|
1213 |
_LIT16( sp9, "\u00a4" );
|
|
1214 |
ReplaceInString( aPtrTag, spXML9, sp9 );
|
|
1215 |
_LIT16( spXML10, "¥" );
|
|
1216 |
_LIT16( sp10, "\u00a5" );
|
|
1217 |
ReplaceInString( aPtrTag, spXML10, sp10 );
|
|
1218 |
_LIT16( spXML11, "¦" );
|
|
1219 |
_LIT16( sp11, "\u00a6" );
|
|
1220 |
ReplaceInString( aPtrTag, spXML11, sp11 );
|
|
1221 |
_LIT16( spXML12, "§" );
|
|
1222 |
_LIT16( sp12, "\u00a7" );
|
|
1223 |
ReplaceInString( aPtrTag, spXML12, sp12 );
|
|
1224 |
_LIT16( spXML13, "¨" );
|
|
1225 |
_LIT16( sp13, "\u00a8" );
|
|
1226 |
ReplaceInString( aPtrTag, spXML13, sp13 );
|
|
1227 |
_LIT16( spXML14, "©" );
|
|
1228 |
_LIT16( sp14, "\u00a9" );
|
|
1229 |
ReplaceInString( aPtrTag, spXML14, sp14 );
|
|
1230 |
_LIT16( spXML15, "ª" );
|
|
1231 |
_LIT16( sp15, "\u00aa" );
|
|
1232 |
ReplaceInString( aPtrTag, spXML15, sp15 );
|
|
1233 |
_LIT16( spXML16, "«" );
|
|
1234 |
_LIT16( sp16, "\u00ab" );
|
|
1235 |
ReplaceInString( aPtrTag, spXML16, sp16 );
|
|
1236 |
_LIT16( spXML17, "¬" );
|
|
1237 |
_LIT16( sp17, "\u00ac" );
|
|
1238 |
ReplaceInString( aPtrTag, spXML17, sp17 );
|
|
1239 |
_LIT16( spXML18, "®" );
|
|
1240 |
_LIT16( sp18, "\u00ae" );
|
|
1241 |
ReplaceInString( aPtrTag, spXML18, sp18 );
|
|
1242 |
_LIT16( spXML19, "¯" );
|
|
1243 |
_LIT16( sp19, "\u00af" );
|
|
1244 |
ReplaceInString( aPtrTag, spXML19, sp19 );
|
|
1245 |
_LIT16( spXML20, "°" );
|
|
1246 |
_LIT16( sp20, "\u00b0" );
|
|
1247 |
ReplaceInString( aPtrTag, spXML20, sp20 );
|
|
1248 |
_LIT16( spXML21, "±" );
|
|
1249 |
_LIT16( sp21, "\u00b1" );
|
|
1250 |
ReplaceInString( aPtrTag, spXML21, sp21 );
|
|
1251 |
_LIT16( spXML22, "²" );
|
|
1252 |
_LIT16( sp22, "\u00b2" );
|
|
1253 |
ReplaceInString( aPtrTag, spXML22, sp22 );
|
|
1254 |
_LIT16( spXML23, "³" );
|
|
1255 |
_LIT16( sp23, "\u00b3" );
|
|
1256 |
ReplaceInString( aPtrTag, spXML23, sp23 );
|
|
1257 |
_LIT16( spXML24, "´" );
|
|
1258 |
_LIT16( sp24, "\u00b4" );
|
|
1259 |
ReplaceInString( aPtrTag, spXML24, sp24 );
|
|
1260 |
_LIT16( spXML25, "µ" );
|
|
1261 |
_LIT16( sp25, "\u00b5" );
|
|
1262 |
ReplaceInString( aPtrTag, spXML25, sp25 );
|
|
1263 |
_LIT16( spXML26, "¶" );
|
|
1264 |
_LIT16( sp26, "\u00b6" );
|
|
1265 |
ReplaceInString( aPtrTag, spXML26, sp26 );
|
|
1266 |
_LIT16( spXML27, "·" );
|
|
1267 |
_LIT16( sp27, "\u00b7" );
|
|
1268 |
ReplaceInString( aPtrTag, spXML27, sp27 );
|
|
1269 |
_LIT16( spXML28, "¸" );
|
|
1270 |
_LIT16( sp28, "\u00b8" );
|
|
1271 |
ReplaceInString( aPtrTag, spXML28, sp28 );
|
|
1272 |
_LIT16( spXML29, "¹" );
|
|
1273 |
_LIT16( sp29, "\u00b9" );
|
|
1274 |
ReplaceInString( aPtrTag, spXML29, sp29 );
|
|
1275 |
_LIT16( spXML30, "º" );
|
|
1276 |
_LIT16( sp30, "\u00ba" );
|
|
1277 |
ReplaceInString( aPtrTag, spXML30, sp30 );
|
|
1278 |
_LIT16( spXML31, "»" );
|
|
1279 |
_LIT16( sp31, "\u00bb" );
|
|
1280 |
ReplaceInString( aPtrTag, spXML31, sp31 );
|
|
1281 |
_LIT16( spXML32, "¼" );
|
|
1282 |
_LIT16( sp32, "\u00bc" );
|
|
1283 |
ReplaceInString( aPtrTag, spXML32, sp32 );
|
|
1284 |
_LIT16( spXML33, "½" );
|
|
1285 |
_LIT16( sp33, "\u00bd" );
|
|
1286 |
ReplaceInString( aPtrTag, spXML33, sp33 );
|
|
1287 |
_LIT16( spXML34, "¾" );
|
|
1288 |
_LIT16( sp34, "\u00be" );
|
|
1289 |
ReplaceInString( aPtrTag, spXML34, sp34 );
|
|
1290 |
_LIT16( spXML35, "¿" );
|
|
1291 |
_LIT16( sp35, "\u00bf" );
|
|
1292 |
ReplaceInString( aPtrTag, spXML35, sp35 );
|
|
1293 |
_LIT16( spXML36, "À" );
|
|
1294 |
_LIT16( sp36, "\u00c0" );
|
|
1295 |
ReplaceInString( aPtrTag, spXML36, sp36 );
|
|
1296 |
_LIT16( spXML37, "Á" );
|
|
1297 |
_LIT16( sp37, "\u00c1" );
|
|
1298 |
ReplaceInString( aPtrTag, spXML37, sp37 );
|
|
1299 |
_LIT16( spXML38, "Â" );
|
|
1300 |
_LIT16( sp38, "\u00c2" );
|
|
1301 |
ReplaceInString( aPtrTag, spXML38, sp38 );
|
|
1302 |
_LIT16( spXML39, "Ã" );
|
|
1303 |
_LIT16( sp39, "\u00c3" );
|
|
1304 |
ReplaceInString( aPtrTag, spXML39, sp39 );
|
|
1305 |
_LIT16( spXML40, "Ä" );
|
|
1306 |
_LIT16( sp40, "\u00c4" );
|
|
1307 |
ReplaceInString( aPtrTag, spXML40, sp40 );
|
|
1308 |
_LIT16( spXML41, "Å" );
|
|
1309 |
_LIT16( sp41, "\u00c5" );
|
|
1310 |
ReplaceInString( aPtrTag, spXML41, sp41 );
|
|
1311 |
_LIT16( spXML42, "Æ" );
|
|
1312 |
_LIT16( sp42, "\u00c6" );
|
|
1313 |
ReplaceInString( aPtrTag, spXML42, sp42 );
|
|
1314 |
_LIT16( spXML43, "Ç" );
|
|
1315 |
_LIT16( sp43, "\u00c7" );
|
|
1316 |
ReplaceInString( aPtrTag, spXML43, sp43 );
|
|
1317 |
_LIT16( spXML44, "È" );
|
|
1318 |
_LIT16( sp44, "\u00c8" );
|
|
1319 |
ReplaceInString( aPtrTag, spXML44, sp44 );
|
|
1320 |
_LIT16( spXML45, "É" );
|
|
1321 |
_LIT16( sp45, "\u00c9" );
|
|
1322 |
ReplaceInString( aPtrTag, spXML45, sp45 );
|
|
1323 |
_LIT16( spXML46, "Ê" );
|
|
1324 |
_LIT16( sp46, "\u00ca" );
|
|
1325 |
ReplaceInString( aPtrTag, spXML46, sp46 );
|
|
1326 |
_LIT16( spXML47, "Ë" );
|
|
1327 |
_LIT16( sp47, "\u00cb" );
|
|
1328 |
ReplaceInString( aPtrTag, spXML47, sp47 );
|
|
1329 |
_LIT16( spXML48, "Ì" );
|
|
1330 |
_LIT16( sp48, "\u00cc" );
|
|
1331 |
ReplaceInString( aPtrTag, spXML48, sp48 );
|
|
1332 |
_LIT16( spXML49, "Í" );
|
|
1333 |
_LIT16( sp49, "\u00cd" );
|
|
1334 |
ReplaceInString( aPtrTag, spXML49, sp49 );
|
|
1335 |
_LIT16( spXML50, "Î" );
|
|
1336 |
_LIT16( sp50, "\u00ce" );
|
|
1337 |
ReplaceInString( aPtrTag, spXML50, sp50 );
|
|
1338 |
_LIT16( spXML51, "Ï" );
|
|
1339 |
_LIT16( sp51, "\u00cf" );
|
|
1340 |
ReplaceInString( aPtrTag, spXML51, sp51 );
|
|
1341 |
_LIT16( spXML52, "Ð" );
|
|
1342 |
_LIT16( sp52, "\u00d0" );
|
|
1343 |
ReplaceInString( aPtrTag, spXML52, sp52 );
|
|
1344 |
_LIT16( spXML53, "Ñ" );
|
|
1345 |
_LIT16( sp53, "\u00d1" );
|
|
1346 |
ReplaceInString( aPtrTag, spXML53, sp53 );
|
|
1347 |
_LIT16( spXML54, "Ò" );
|
|
1348 |
_LIT16( sp54, "\u00d2" );
|
|
1349 |
ReplaceInString( aPtrTag, spXML54, sp54 );
|
|
1350 |
_LIT16( spXML55, "Ó" );
|
|
1351 |
_LIT16( sp55, "\u00d3" );
|
|
1352 |
ReplaceInString( aPtrTag, spXML55, sp55 );
|
|
1353 |
_LIT16( spXML56, "Ô" );
|
|
1354 |
_LIT16( sp56, "\u00d4" );
|
|
1355 |
ReplaceInString( aPtrTag, spXML56, sp56 );
|
|
1356 |
_LIT16( spXML57, "Õ" );
|
|
1357 |
_LIT16( sp57, "\u00d5" );
|
|
1358 |
ReplaceInString( aPtrTag, spXML57, sp57 );
|
|
1359 |
_LIT16( spXML58, "Ö" );
|
|
1360 |
_LIT16( sp58, "\u00d6" );
|
|
1361 |
ReplaceInString( aPtrTag, spXML58, sp58 );
|
|
1362 |
_LIT16( spXML59, "×" );
|
|
1363 |
_LIT16( sp59, "\u00d7" );
|
|
1364 |
ReplaceInString( aPtrTag, spXML59, sp59 );
|
|
1365 |
_LIT16( spXML60, "Ø" );
|
|
1366 |
_LIT16( sp60, "\u00d8" );
|
|
1367 |
ReplaceInString( aPtrTag, spXML60, sp60 );
|
|
1368 |
_LIT16( spXML61, "Ù" );
|
|
1369 |
_LIT16( sp61, "\u00d9" );
|
|
1370 |
ReplaceInString( aPtrTag, spXML61, sp61 );
|
|
1371 |
_LIT16( spXML62, "Ú" );
|
|
1372 |
_LIT16( sp62, "\u00da" );
|
|
1373 |
ReplaceInString( aPtrTag, spXML62, sp62 );
|
|
1374 |
_LIT16( spXML63, "Û" );
|
|
1375 |
_LIT16( sp63, "\u00db" );
|
|
1376 |
ReplaceInString( aPtrTag, spXML63, sp63 );
|
|
1377 |
_LIT16( spXML64, "Ü" );
|
|
1378 |
_LIT16( sp64, "\u00dc" );
|
|
1379 |
ReplaceInString( aPtrTag, spXML64, sp64 );
|
|
1380 |
_LIT16( spXML65, "Ý" );
|
|
1381 |
_LIT16( sp65, "\u00dd" );
|
|
1382 |
ReplaceInString( aPtrTag, spXML65, sp65 );
|
|
1383 |
_LIT16( spXML66, "Þ" );
|
|
1384 |
_LIT16( sp66, "\u00de" );
|
|
1385 |
ReplaceInString( aPtrTag, spXML66, sp66 );
|
|
1386 |
_LIT16( spXML67, "ß" );
|
|
1387 |
_LIT16( sp67, "\u00df" );
|
|
1388 |
ReplaceInString( aPtrTag, spXML67, sp67 );
|
|
1389 |
_LIT16( spXML68, "à" );
|
|
1390 |
_LIT16( sp68, "\u00e0" );
|
|
1391 |
ReplaceInString( aPtrTag, spXML68, sp68 );
|
|
1392 |
_LIT16( spXML69, "á" );
|
|
1393 |
_LIT16( sp69, "\u00e1" );
|
|
1394 |
ReplaceInString( aPtrTag, spXML69, sp69 );
|
|
1395 |
_LIT16( spXML70, "â" );
|
|
1396 |
_LIT16( sp70, "\u00e2" );
|
|
1397 |
ReplaceInString( aPtrTag, spXML70, sp70 );
|
|
1398 |
_LIT16( spXML71, "ã" );
|
|
1399 |
_LIT16( sp71, "\u00e3" );
|
|
1400 |
ReplaceInString( aPtrTag, spXML71, sp71 );
|
|
1401 |
_LIT16( spXML72, "ä");
|
|
1402 |
_LIT16( sp72, "\u00e4" );
|
|
1403 |
ReplaceInString( aPtrTag, spXML72, sp72 );
|
|
1404 |
_LIT16( spXML73, "å" );
|
|
1405 |
_LIT16( sp73, "\u00e5" );
|
|
1406 |
ReplaceInString( aPtrTag, spXML73, sp73 );
|
|
1407 |
_LIT16( spXML74, "æ" );
|
|
1408 |
_LIT16( sp74, "\u00e6" );
|
|
1409 |
ReplaceInString( aPtrTag, spXML74, sp74 );
|
|
1410 |
_LIT16( spXML75, "&acedil;" );
|
|
1411 |
_LIT16( sp75, "\u00e7" );
|
|
1412 |
ReplaceInString( aPtrTag, spXML75, sp75 );
|
|
1413 |
_LIT16( spXML76, "è" );
|
|
1414 |
_LIT16( sp76, "\u00e8" );
|
|
1415 |
ReplaceInString( aPtrTag, spXML76, sp76 );
|
|
1416 |
_LIT16( spXML77, "é" );
|
|
1417 |
_LIT16( sp77, "\u00e9" );
|
|
1418 |
ReplaceInString( aPtrTag, spXML77, sp77 );
|
|
1419 |
_LIT16( spXML78, "ê" );
|
|
1420 |
_LIT16( sp78, "\u00ea" );
|
|
1421 |
ReplaceInString( aPtrTag, spXML78, sp78 );
|
|
1422 |
_LIT16( spXML79, "ë" );
|
|
1423 |
_LIT16( sp79, "\u00eb" );
|
|
1424 |
ReplaceInString( aPtrTag, spXML79, sp79 );
|
|
1425 |
_LIT16( spXML80, "ì" );
|
|
1426 |
_LIT16( sp80, "\u00ec" );
|
|
1427 |
ReplaceInString( aPtrTag, spXML80, sp80 );
|
|
1428 |
_LIT16( spXML81, "í" );
|
|
1429 |
_LIT16( sp81, "\u00ed" );
|
|
1430 |
ReplaceInString( aPtrTag, spXML81, sp81 );
|
|
1431 |
_LIT16( spXML82, "î" );
|
|
1432 |
_LIT16( sp82, "\u00ee" );
|
|
1433 |
ReplaceInString( aPtrTag, spXML82, sp82 );
|
|
1434 |
_LIT16( spXML83, "ï" );
|
|
1435 |
_LIT16( sp83, "\u00ef" );
|
|
1436 |
ReplaceInString( aPtrTag, spXML83, sp83 );
|
|
1437 |
_LIT16( spXML84, "ð" );
|
|
1438 |
_LIT16( sp84, "\u00f0" );
|
|
1439 |
ReplaceInString( aPtrTag, spXML84, sp84 );
|
|
1440 |
_LIT16( spXML85, "ñ" );
|
|
1441 |
_LIT16( sp85, "\u00f1" );
|
|
1442 |
ReplaceInString( aPtrTag, spXML85, sp85 );
|
|
1443 |
_LIT16( spXML86, "ò" );
|
|
1444 |
_LIT16( sp86, "\u00f2" );
|
|
1445 |
ReplaceInString( aPtrTag, spXML86, sp86 );
|
|
1446 |
_LIT16( spXML87, "ó" );
|
|
1447 |
_LIT16( sp87, "\u00f3" );
|
|
1448 |
ReplaceInString( aPtrTag, spXML87, sp87 );
|
|
1449 |
_LIT16( spXML88, "ô" );
|
|
1450 |
_LIT16( sp88, "\u00f4" );
|
|
1451 |
ReplaceInString( aPtrTag, spXML88, sp88 );
|
|
1452 |
_LIT16( spXML89, "õ" );
|
|
1453 |
_LIT16( sp89, "\u00f5" );
|
|
1454 |
ReplaceInString( aPtrTag, spXML89, sp89 );
|
|
1455 |
_LIT16( spXML90, "ö" );
|
|
1456 |
_LIT16( sp90, "\u00f6" );
|
|
1457 |
ReplaceInString( aPtrTag, spXML90, sp90 );
|
|
1458 |
_LIT16( spXML91, "÷" );
|
|
1459 |
_LIT16( sp91, "\u00f7" );
|
|
1460 |
ReplaceInString( aPtrTag, spXML91, sp91 );
|
|
1461 |
_LIT16( spXML92, "ø" );
|
|
1462 |
_LIT16( sp92, "\u00f8" );
|
|
1463 |
ReplaceInString( aPtrTag, spXML92, sp92 );
|
|
1464 |
_LIT16( spXML93, "ù" );
|
|
1465 |
_LIT16( sp93, "\u00f9" );
|
|
1466 |
ReplaceInString( aPtrTag, spXML93, sp93 );
|
|
1467 |
_LIT16( spXML94, "ú" );
|
|
1468 |
_LIT16( sp94, "\u00fa" );
|
|
1469 |
ReplaceInString( aPtrTag, spXML94, sp94 );
|
|
1470 |
_LIT16( spXML95, "û" );
|
|
1471 |
_LIT16( sp95, "\u00fb" );
|
|
1472 |
ReplaceInString( aPtrTag, spXML95, sp95 );
|
|
1473 |
_LIT16( spXML96, "ü" );
|
|
1474 |
_LIT16( sp96, "\u00fc" );
|
|
1475 |
ReplaceInString( aPtrTag, spXML96, sp96 );
|
|
1476 |
_LIT16( spXML97, "ý" );
|
|
1477 |
_LIT16( sp97, "\u00fd" );
|
|
1478 |
ReplaceInString( aPtrTag, spXML97, sp97 );
|
|
1479 |
_LIT16( spXML98, "þ" );
|
|
1480 |
_LIT16( sp98, "\u00de" );
|
|
1481 |
ReplaceInString( aPtrTag, spXML98, sp98 );
|
|
1482 |
_LIT16( spXML99, "ÿ" );
|
|
1483 |
_LIT16( sp99, "\u00ff" );
|
|
1484 |
ReplaceInString( aPtrTag, spXML99, sp99 );
|
|
1485 |
_LIT16( spXML100, "Œ" );
|
|
1486 |
_LIT16( sp100, "\u0152" );
|
|
1487 |
ReplaceInString( aPtrTag, spXML100, sp100 );
|
|
1488 |
_LIT16( spXML101, "œ" );
|
|
1489 |
_LIT16( sp101, "\u0153" );
|
|
1490 |
ReplaceInString( aPtrTag, spXML101, sp101 );
|
|
1491 |
_LIT16( spXML102, "Š" );
|
|
1492 |
_LIT16( sp102, "\u0160" );
|
|
1493 |
ReplaceInString( aPtrTag, spXML102, sp102 );
|
|
1494 |
_LIT16( spXML103, "š" );
|
|
1495 |
_LIT16( sp103, "\u0161" );
|
|
1496 |
ReplaceInString( aPtrTag, spXML103, sp103 );
|
|
1497 |
_LIT16( spXML104, "Ÿ" );
|
|
1498 |
_LIT16( sp104, "\u0178" );
|
|
1499 |
ReplaceInString( aPtrTag, spXML104, sp104 );
|
|
1500 |
_LIT16( spXML105, "ƒ" );
|
|
1501 |
_LIT16( sp105, "\u0192" );
|
|
1502 |
ReplaceInString( aPtrTag, spXML105, sp105 );
|
|
1503 |
_LIT16( spXML106, "ˆ" );
|
|
1504 |
_LIT16( sp106, "\u02c6" );
|
|
1505 |
ReplaceInString( aPtrTag, spXML106, sp106 );
|
|
1506 |
_LIT16( spXML107, "˜" );
|
|
1507 |
_LIT16( sp107, "\u02dc" );
|
|
1508 |
ReplaceInString( aPtrTag, spXML107, sp107 );
|
|
1509 |
}
|
|
1510 |
|
|
1511 |
// ---------------------------------------------------------
|
|
1512 |
// CReaderXML::Replace
|
|
1513 |
// ---------------------------------------------------------
|
|
1514 |
//
|
|
1515 |
void CReaderXML::ReplaceInString( HBufC* aPtrTag,
|
|
1516 |
const TDesC& aSpXML,
|
|
1517 |
const TDesC& aSp )
|
|
1518 |
{
|
|
1519 |
if( aPtrTag == NULL )
|
|
1520 |
{
|
|
1521 |
return;
|
|
1522 |
}
|
|
1523 |
TInt strPos = aPtrTag->Des().Find(aSpXML);
|
|
1524 |
while ( strPos != KErrNotFound )
|
|
1525 |
{
|
|
1526 |
aPtrTag->Des().Replace(strPos, aSpXML.Length() , aSp);
|
|
1527 |
strPos = aPtrTag->Des().Find(aSpXML);
|
|
1528 |
}
|
|
1529 |
}
|
|
1530 |
|
|
1531 |
//maximum number of VPN AP parameters
|
|
1532 |
|
|
1533 |
|
|
1534 |
void CReaderXML::FillPacketDataParams()
|
|
1535 |
{
|
|
1536 |
iPDParams.Append( EInputParams( ECmName, KConnectionName ) );
|
|
1537 |
iPDParams.Append( EInputParams( ECmId, KConnectionId ) );
|
|
1538 |
iPDParams.Append( EInputParams( ECmProtected, KProtected ) );
|
|
1539 |
iPDParams.Append( EInputParams( ECmHidden, KHidden ) );
|
|
1540 |
iPDParams.Append( EInputParams( ECmMetaHiddenAgent, KHiddenAgent ) );
|
|
1541 |
iPDParams.Append( EInputParams( ECmMetaHighlight, KHighlighted ) );
|
|
1542 |
iPDParams.Append( EInputParams( ECmSeamlessnessLevel, KSeamlessness ) );
|
|
1543 |
iPDParams.Append( EInputParams( EPacketDataAPName, KGprs_AP_Name ) );
|
|
1544 |
iPDParams.Append( EInputParams( EPacketDataIFAuthName, KUserName ) );
|
|
1545 |
iPDParams.Append( EInputParams( EPacketDataIFPromptForAuth, KPromptPassword ) );
|
|
1546 |
iPDParams.Append( EInputParams( EPacketDataIFAuthPass, KPassword ) );
|
|
1547 |
iPDParams.Append( EInputParams( EPacketDataDisablePlainTextAuth, KPasswordAuthType ) );
|
|
1548 |
iPDParams.Append( EInputParams( ECmWapIPGatewayAddress, KWAPGatewayIP ) );
|
|
1549 |
iPDParams.Append( EInputParams( ECmStartPage, KStartingPage ) );
|
|
1550 |
iPDParams.Append( EInputParams( ECmWapIPSecurity, KWTLS_Security ) );
|
|
1551 |
iPDParams.Append( EInputParams( ECmWapIPWSPOption, KWAP_ConnectionType ) );
|
|
1552 |
iPDParams.Append( EInputParams( EPacketDataIPAddr, KPhoneIP ) );
|
|
1553 |
iPDParams.Append( EInputParams( EPacketDataIPNameServer1, KPrimaryNameServer ) );
|
|
1554 |
iPDParams.Append( EInputParams( EPacketDataIPNameServer2, KSecondaryNameServer ) );
|
|
1555 |
iPDParams.Append( EInputParams( ECmProxyServerName, KProxyServerAddress ) );
|
|
1556 |
iPDParams.Append( EInputParams( ECmProxyPortNumber, KProxyPortNumber ) );
|
|
1557 |
iPDParams.Append( EInputParams( ECmProxyProtocolName, KProxyProtocolName ) );
|
|
1558 |
iPDParams.Append( EInputParams( EPacketDataIPIP6NameServer1, KPrimaryIP6NameServer ) );
|
|
1559 |
iPDParams.Append( EInputParams( EPacketDataIPIP6NameServer2, KSecondaryIP6NameServer ) );
|
|
1560 |
iPDParams.Append( EInputParams( EPacketDataApType, KIspType ) );
|
|
1561 |
iPDParams.Append( EInputParams( EPacketDataPDPType, KNetworkType ) );
|
|
1562 |
iPDParams.Append( EInputParams( EPacketDataUseEdge, KGprsUseEdge ) );
|
|
1563 |
iPDParams.Append( EInputParams( EPacketDataLinger, KLinger ) );
|
|
1564 |
};
|
|
1565 |
|
|
1566 |
void CReaderXML::FillLanParams()
|
|
1567 |
{
|
|
1568 |
iLanParams.Append( EInputParams( ECmName, KConnectionName ) );
|
|
1569 |
iLanParams.Append( EInputParams( ECmId, KConnectionId ) );
|
|
1570 |
iLanParams.Append( EInputParams( ECmProtected, KProtected ) );
|
|
1571 |
iLanParams.Append( EInputParams( ECmHidden, KHidden ) );
|
|
1572 |
iLanParams.Append( EInputParams( ECmMetaHiddenAgent, KHiddenAgent ) );
|
|
1573 |
iLanParams.Append( EInputParams( ECmMetaHighlight, KHighlighted ) );
|
|
1574 |
iLanParams.Append( EInputParams( ECmSeamlessnessLevel, KSeamlessness ) );
|
|
1575 |
iLanParams.Append( EInputParams( ECmWapIPGatewayAddress, KWAPGatewayIP ) );
|
|
1576 |
iLanParams.Append( EInputParams( ECmStartPage, KStartingPage ) );
|
|
1577 |
iLanParams.Append( EInputParams( ECmWapIPSecurity, KWTLS_Security ) );
|
|
1578 |
iLanParams.Append( EInputParams( ECmWapIPWSPOption, KWAP_ConnectionType ) );
|
|
1579 |
iLanParams.Append( EInputParams( ECmProxyServerName, KProxyServerAddress ) );
|
|
1580 |
iLanParams.Append( EInputParams( ECmProxyPortNumber, KProxyPortNumber ) );
|
|
1581 |
iLanParams.Append( EInputParams( ECmProxyProtocolName, KProxyProtocolName ) );
|
|
1582 |
iLanParams.Append( EInputParams( ELanIfNetworks, KLanIfNetworks ) );
|
|
1583 |
iLanParams.Append( EInputParams( ELanIpNetMask, KLanIpNetMask ) );
|
|
1584 |
iLanParams.Append( EInputParams( ELanIpGateway, KLanIpGateway ) );
|
|
1585 |
iLanParams.Append( EInputParams( ELanIpAddr, KPhoneIP ) );
|
|
1586 |
iLanParams.Append( EInputParams( ELanIpNameServer1, KPrimaryNameServer ) );
|
|
1587 |
iLanParams.Append( EInputParams( ELanIpNameServer2, KSecondaryNameServer ) );
|
|
1588 |
iLanParams.Append( EInputParams( ELanIp6NameServer1, KPrimaryIP6NameServer ) );
|
|
1589 |
iLanParams.Append( EInputParams( ELanIp6NameServer2, KSecondaryIP6NameServer ) );
|
|
1590 |
iLanParams.Append( EInputParams( ELanIpAddrFromServer, KLanIpAddrFromServer ) );
|
|
1591 |
iLanParams.Append( EInputParams( ELanIpDNSAddrFromServer, KLanIpDNSAddrFromServer ) );
|
|
1592 |
iLanParams.Append( EInputParams( ELanConfigDaemonManagerName, KLanConfigDaemonManagerName ) );
|
|
1593 |
iLanParams.Append( EInputParams( ELanConfigDaemonName, KLanConfigDaemonName ) );
|
|
1594 |
};
|
|
1595 |
|
|
1596 |
//Binds WLAN access point parameters to field IDs
|
|
1597 |
void CReaderXML::FillWLanParams()
|
|
1598 |
{
|
|
1599 |
iWLanParams.Append( EInputParams( ECmName, KConnectionName ) );
|
|
1600 |
iWLanParams.Append( EInputParams( ECmId, KConnectionId ) );
|
|
1601 |
iWLanParams.Append( EInputParams( ECmProtected, KProtected ) );
|
|
1602 |
iWLanParams.Append( EInputParams( ECmHidden, KHidden ) );
|
|
1603 |
iWLanParams.Append( EInputParams( ECmMetaHiddenAgent, KHiddenAgent ) );
|
|
1604 |
iWLanParams.Append( EInputParams( ECmMetaHighlight, KHighlighted ) );
|
|
1605 |
iWLanParams.Append( EInputParams( ECmSeamlessnessLevel, KSeamlessness ) );
|
|
1606 |
iWLanParams.Append( EInputParams( ECmStartPage, KStartingPage ) );
|
|
1607 |
iWLanParams.Append( EInputParams( EWlanSSID, KNetworkName ) );
|
|
1608 |
iWLanParams.Append( EInputParams( EWlanConnectionMode, KNetworkMode ) );
|
|
1609 |
iWLanParams.Append( EInputParams( EWlanSecurityMode, KSecurityMode ) );
|
|
1610 |
iWLanParams.Append( EInputParams( EWlanIpNameServer1, KPrimaryNameServer ) );
|
|
1611 |
iWLanParams.Append( EInputParams( EWlanIpNameServer2, KSecondaryNameServer ) );
|
|
1612 |
iWLanParams.Append( EInputParams( EWlanIp6NameServer1, KPrimaryIP6NameServer ) );
|
|
1613 |
iWLanParams.Append( EInputParams( EWlanIp6NameServer2, KSecondaryIP6NameServer ) );
|
|
1614 |
iWLanParams.Append( EInputParams( EWlanIpGateway, KWlanIpGatewayAddress ) );
|
|
1615 |
iWLanParams.Append( EInputParams( ECmProxyServerName, KProxyServerAddress ) );
|
|
1616 |
iWLanParams.Append( EInputParams( ECmProxyProtocolName, KProxyProtocolName ) );
|
|
1617 |
iWLanParams.Append( EInputParams( EWlanIpNetMask, KWlanIpNetMask ) );
|
|
1618 |
iWLanParams.Append( EInputParams( ECmProxyPortNumber, KProxyPortNumber ) );
|
|
1619 |
iWLanParams.Append( EInputParams( EWlanIpAddr, KPhoneIP ) );
|
|
1620 |
iWLanParams.Append( EInputParams( EWlanScanSSID, KWlanScanSSId ) );
|
|
1621 |
iWLanParams.Append( EInputParams( EWlanChannelID, KWlanChannelId ) );
|
|
1622 |
iWLanParams.Append( EInputParams( EWEPKeyInUse, KWEPKeyInUse ) );
|
|
1623 |
iWLanParams.Append( EInputParams( EWEPAuthType, KWEPAuthType ) );
|
|
1624 |
iWLanParams.Append( EInputParams( EWEPKey1Length, KWEPKey1Length ) );
|
|
1625 |
iWLanParams.Append( EInputParams( EWEPKey1Format, KWEPKey1Format ) );
|
|
1626 |
iWLanParams.Append( EInputParams( EWEPKey1Data, KWEPKey1Data ) );
|
|
1627 |
iWLanParams.Append( EInputParams( EWEPKey2Length, KWEPKey2Length ) );
|
|
1628 |
iWLanParams.Append( EInputParams( EWEPKey2Format, KWEPKey2Format ) );
|
|
1629 |
iWLanParams.Append( EInputParams( EWEPKey2Data, KWEPKey2Data ) );
|
|
1630 |
iWLanParams.Append( EInputParams( EWEPKey3Length, KWEPKey3Length ) );
|
|
1631 |
iWLanParams.Append( EInputParams( EWEPKey3Format, KWEPKey3Format ) );
|
|
1632 |
iWLanParams.Append( EInputParams( EWEPKey3Data, KWEPKey3Data ) );
|
|
1633 |
iWLanParams.Append( EInputParams( EWEPKey4Length, KWEPKey4Length ) );
|
|
1634 |
iWLanParams.Append( EInputParams( EWEPKey4Format, KWEPKey4Format ) );
|
|
1635 |
iWLanParams.Append( EInputParams( EWEPKey4Data, KWEPKey4Data ) );
|
|
1636 |
iWLanParams.Append( EInputParams( EWPAPresharedKey, KWPAPresharedKey ) );
|
|
1637 |
iWLanParams.Append( EInputParams( EWPAKeyLength, KWPAKeyLength ) );
|
|
1638 |
iWLanParams.Append( EInputParams( EWPAEapMethod, KWPAEapMethod ) );
|
|
1639 |
iWLanParams.Append( EInputParams( EWPAUseOfPresharedKey, KWPAUseOfPresharedKey ) );
|
|
1640 |
iWLanParams.Append( EInputParams( EEapGtcUsername, KEapGtcUsername ) );
|
|
1641 |
iWLanParams.Append( EInputParams( EEapGtcSessionValidityTime, KEapGtcSessionValidityTime ) );
|
|
1642 |
iWLanParams.Append( EInputParams( EEapGtcEncapsulation, KEapGtcEncapsulation ) );
|
|
1643 |
iWLanParams.Append( EInputParams( EEapTlsUsername, KEapTlsUsername ) );
|
|
1644 |
iWLanParams.Append( EInputParams( EEapTlsRealm, KEapTlsRealm ) );
|
|
1645 |
iWLanParams.Append( EInputParams( EEapTlsVerifyServerRealm, KEapTlsVerifyServerRealm ) );
|
|
1646 |
iWLanParams.Append( EInputParams( EEapTlsRequireClientAuth, KEapTlsRequireClientAuth ) );
|
|
1647 |
iWLanParams.Append( EInputParams( EEapTlsSessionValidityTime, KEapTlsSessionValidityTime ) );
|
|
1648 |
iWLanParams.Append( EInputParams( EEapTlsCipherSuites, KEapTlsCipherSuites ) );
|
|
1649 |
iWLanParams.Append( EInputParams( EEapTlsUserCertSubjectKeyId, KEapTlsUserCertSubjectKeyId ) );
|
|
1650 |
iWLanParams.Append( EInputParams( EEapTlsUserCertIssuerName, KEapTlsUserCertIssuerName ) );
|
|
1651 |
iWLanParams.Append( EInputParams( EEapTlsUserCertSerialNumber, KEapTlsUserCertSerialNumber ) );
|
|
1652 |
iWLanParams.Append( EInputParams( EEapTlsCaCertSubjectKeyId, KEapTlsCaCertSubjectKeyId ) );
|
|
1653 |
iWLanParams.Append( EInputParams( EEapTlsCaCertIssuerName, KEapTlsCaCertIssuerName ) );
|
|
1654 |
iWLanParams.Append( EInputParams( EEapTlsCaCertSerialNumber, KEapTlsCaCertSerialNumber ) );
|
|
1655 |
iWLanParams.Append( EInputParams( EEapTlsEncapsulation, KEapTlsEncapsulation ) );
|
|
1656 |
iWLanParams.Append( EInputParams( EEapLeapUsername, KEapLeapUsername ) );
|
|
1657 |
iWLanParams.Append( EInputParams( EEapLeapPassword, KEapLeapPassword ) );
|
|
1658 |
iWLanParams.Append( EInputParams( EEapLeapSessionValidityTime, KEapLeapSessionValidityTime ) );
|
|
1659 |
iWLanParams.Append( EInputParams( EEapSimUsername, KEapSimUsername ) );
|
|
1660 |
iWLanParams.Append( EInputParams( EEapSimRealm, KEapSimRealm ) );
|
|
1661 |
iWLanParams.Append( EInputParams( EEapSimUsePseudonyms, KEapSimUsePseudonyms ) );
|
|
1662 |
iWLanParams.Append( EInputParams( EEapSimSessionValidityTime, KEapSimSessionValidityTime ) );
|
|
1663 |
iWLanParams.Append( EInputParams( EEapSimEncapsulation, KEapSimEncapsulation ) );
|
|
1664 |
iWLanParams.Append( EInputParams( EEapTtlsUsername, KEapTtlsUsername ) );
|
|
1665 |
iWLanParams.Append( EInputParams( EEapTtlsRealm, KEapTtlsRealm ) );
|
|
1666 |
iWLanParams.Append( EInputParams( EEapTtlsVerifyServerRealm, KEapTtlsVerifyServerRealm ) );
|
|
1667 |
iWLanParams.Append( EInputParams( EEapTtlsRequireClientAuth, KEapTtlsRequireClientAuth ) );
|
|
1668 |
iWLanParams.Append( EInputParams( EEapTtlsSessionValidityTime, KEapTtlsSessionValidityTime ) );
|
|
1669 |
iWLanParams.Append( EInputParams( EEapTtlsCipherSuites, KEapTtlsCipherSuites ) );
|
|
1670 |
iWLanParams.Append( EInputParams( EEapTtlsEncapsulatedTypes, KEapTtlsEncapsulatedTypes ) );
|
|
1671 |
iWLanParams.Append( EInputParams( EEapTtlsUserCertSubjectKeyId, KEapTtlsUserCertSubjectKeyId ) );
|
|
1672 |
iWLanParams.Append( EInputParams( EEapTtlsUserCertIssuerName, KEapTtlsUserCertIssuerName ) );
|
|
1673 |
iWLanParams.Append( EInputParams( EEapTtlsUserCertSerialNumber, KEapTtlsUserCertSerialNumber ) );
|
|
1674 |
iWLanParams.Append( EInputParams( EEapTtlsCaCertSubjectKeyId, KEapTtlsCaCertSubjectKeyId ) );
|
|
1675 |
iWLanParams.Append( EInputParams( EEapTtlsCaCertIssuerName, KEapTtlsCaCertIssuerName ) );
|
|
1676 |
iWLanParams.Append( EInputParams( EEapTtlsCaCertSerialNumber, KEapTtlsCaCertSerialNumber ) );
|
|
1677 |
iWLanParams.Append( EInputParams( EEapAkaUsername, KEapAkaUsername ) );
|
|
1678 |
iWLanParams.Append( EInputParams( EEapAkaRealm, KEapAkaRealm ) );
|
|
1679 |
iWLanParams.Append( EInputParams( EEapAkaUsePseudonyms, KEapAkaUsePseudonyms ) );
|
|
1680 |
iWLanParams.Append( EInputParams( EEapAkaSessionValidityTime, KEapAkaSessionValidityTime ) );
|
|
1681 |
iWLanParams.Append( EInputParams( EEapAkaEncapsulation, KEapAkaEncapsulation ) );
|
|
1682 |
iWLanParams.Append( EInputParams( EEapPeapUsername, KEapPeapUsername ) );
|
|
1683 |
iWLanParams.Append( EInputParams( EEapPeapRealm, KEapPeapRealm ) );
|
|
1684 |
iWLanParams.Append( EInputParams( EEapPeapVerifyServerRealm, KEapPeapVerifyServerRealm ) );
|
|
1685 |
iWLanParams.Append( EInputParams( EEapPeapRequireClientAuth, KEapPeapRequireClientAuth ) );
|
|
1686 |
iWLanParams.Append( EInputParams( EEapPeapSessionValidityTime, KEapPeapSessionValidityTime ) );
|
|
1687 |
iWLanParams.Append( EInputParams( EEapPeapCipherSuites, KEapPeapCipherSuites ) );
|
|
1688 |
iWLanParams.Append( EInputParams( EEapPeapV0Allowed, KEapPeapV0Allowed ) );
|
|
1689 |
iWLanParams.Append( EInputParams( EEapPeapV1Allowed, KEapPeapV1Allowed ) );
|
|
1690 |
iWLanParams.Append( EInputParams( EEapPeapV2Allowed, KEapPeapV2Allowed ) );
|
|
1691 |
iWLanParams.Append( EInputParams( EEapPeapEncapsulatedTypes, KEapPeapEncapsulatedTypes ) );
|
|
1692 |
iWLanParams.Append( EInputParams( EEapPeapUserCertSubjectKeyId, KEapPeapUserCertSubjectKeyId ) );
|
|
1693 |
iWLanParams.Append( EInputParams( EEapPeapUserCertIssuerName, KEapPeapUserCertIssuerName ) );
|
|
1694 |
iWLanParams.Append( EInputParams( EEapPeapUserCertSerialNumber, KEapPeapUserCertSerialNumber ) );
|
|
1695 |
iWLanParams.Append( EInputParams( EEapPeapCaCertSubjectKeyId, KEapPeapCaCertSubjectKeyId ) );
|
|
1696 |
iWLanParams.Append( EInputParams( EEapPeapCaCertIssuerName, KEapPeapCaCertIssuerName ) );
|
|
1697 |
iWLanParams.Append( EInputParams( EEapPeapCaCertSerialNumber, KEapPeapCaCertSerialNumber ) );
|
|
1698 |
iWLanParams.Append( EInputParams( EEapMschapv2Username, KEapMschapv2Username ) );
|
|
1699 |
iWLanParams.Append( EInputParams( EEapMschapv2Password, KEapMschapv2Password ) );
|
|
1700 |
iWLanParams.Append( EInputParams( EEapMschapv2SessionValidityTime, KEapMschapv2SessionValidityTime ) );
|
|
1701 |
iWLanParams.Append( EInputParams( EEapMschapv2Encapsulation, KEapMschapv2Encapsulation ) );
|
|
1702 |
iWLanParams.Append( EInputParams( EEapFastUsername, KEapFastUsername ) );
|
|
1703 |
iWLanParams.Append( EInputParams( EEapFastRealm, KEapFastRealm ) );
|
|
1704 |
iWLanParams.Append( EInputParams( EEapFastVerifyServerRealm, KEapFastVerifyServerRealm ) );
|
|
1705 |
iWLanParams.Append( EInputParams( EEapFastRequireClientAuth, KEapFastRequireClientAuth ) );
|
|
1706 |
iWLanParams.Append( EInputParams( EEapFastSessionValidityTime, KEapFastSessionValidityTime ) );
|
|
1707 |
iWLanParams.Append( EInputParams( EEapFastCipherSuites, KEapFastCipherSuites ) );
|
|
1708 |
iWLanParams.Append( EInputParams( EEapFastEncapsulatedTypes, KEapFastEncapsulatedTypes ) );
|
|
1709 |
iWLanParams.Append( EInputParams( EEapFastAuthProvModeAllowed, KEapFastAuthProvModeAllowed ) );
|
|
1710 |
iWLanParams.Append( EInputParams( EEapFastUnauthProvModeAllowed, KEapFastUnauthProvModeAllowed ) );
|
|
1711 |
iWLanParams.Append( EInputParams( EEapFastWarnADHPNoPAC, KEapFastWarnADHPNoPAC ) );
|
|
1712 |
iWLanParams.Append( EInputParams( EEapFastWarnADHPNoMatchingPAC, KEapFastWarnADHPNoMatchingPAC ) );
|
|
1713 |
iWLanParams.Append( EInputParams( EEapFastWarnNotDefaultServer, KEapFastWarnNotDefaultServer ) );
|
|
1714 |
iWLanParams.Append( EInputParams( EEapFastUserCertSubjectKeyId, KEapFastUserCertSubjectKeyId ) );
|
|
1715 |
iWLanParams.Append( EInputParams( EEapFastUserCertIssuerName, KEapFastUserCertIssuerName ) );
|
|
1716 |
iWLanParams.Append( EInputParams( EEapFastUserCertSerialNumber, KEapFastUserCertSerialNumber ) );
|
|
1717 |
iWLanParams.Append( EInputParams( EEapFastCaCertSubjectKeyId, KEapFastCaCertSubjectKeyId ) );
|
|
1718 |
iWLanParams.Append( EInputParams( EEapFastCaCertIssuerName, KEapFastCaCertIssuerName ) );
|
|
1719 |
iWLanParams.Append( EInputParams( EEapFastCaCertSerialNumber, KEapFastCaCertSerialNumber ) );
|
|
1720 |
iWLanParams.Append( EInputParams( EMschapv2Username, KMschapv2Username ) );
|
|
1721 |
iWLanParams.Append( EInputParams( EMschapv2Password, KMschapv2Password ) );
|
|
1722 |
iWLanParams.Append( EInputParams( EMschapv2SessionValidityTime, KMschapv2SessionValidityTime ) );
|
|
1723 |
iWLanParams.Append( EInputParams( EMschapv2Encapsulation, KMschapv2Encapsulation ) );
|
|
1724 |
};
|
|
1725 |
|
|
1726 |
|
|
1727 |
|
|
1728 |
void CReaderXML::FillVpnParams()
|
|
1729 |
{
|
|
1730 |
iVpnParams.Reset();
|
|
1731 |
|
|
1732 |
iVpnParams.Append( EInputParams( ECmName, KConnectionName ) );
|
|
1733 |
iVpnParams.Append( EInputParams( ECmId, KConnectionId ) );
|
|
1734 |
iVpnParams.Append( EInputParams( ECmProtected, KProtected ) );
|
|
1735 |
iVpnParams.Append( EInputParams( ECmHidden, KHidden ) );
|
|
1736 |
iVpnParams.Append( EInputParams( ECmMetaHiddenAgent, KHiddenAgent ) );
|
|
1737 |
iVpnParams.Append( EInputParams( ECmMetaHighlight, KHighlighted ) );
|
|
1738 |
iVpnParams.Append( EInputParams( ECmSeamlessnessLevel, KSeamlessness ) );
|
|
1739 |
iVpnParams.Append( EInputParams( ECmProxyServerName, KProxyServerAddress ) );
|
|
1740 |
iVpnParams.Append( EInputParams( ECmProxyPortNumber, KProxyPortNumber ) );
|
|
1741 |
iVpnParams.Append( EInputParams( ECmProxyProtocolName, KProxyProtocolName ) );
|
|
1742 |
iVpnParams.Append( EInputParams( EVPN_IapName, KVpnIapName ) );
|
|
1743 |
iVpnParams.Append( EInputParams( EVpnServicePolicy, KVpnServicePolicy ) );
|
|
1744 |
|
|
1745 |
};
|
|
1746 |
|
|
1747 |
//Binds Gobal settings parameters to field IDs
|
|
1748 |
void CReaderXML::FillGlobalParams()
|
|
1749 |
{
|
|
1750 |
iGlobalParams.Append( EInputParams( EGPRSAttachMode, KAttachMode ) );
|
|
1751 |
iGlobalParams.Append( EInputParams( EDefaultAP, KDefaultAP) );
|
|
1752 |
iGlobalParams.Append( EInputParams( EDefaultDnIcon, KDefaultDnIcon ) );
|
|
1753 |
iGlobalParams.Append( EInputParams( EPriorityLan, KPriorityLan ) );
|
|
1754 |
iGlobalParams.Append( EInputParams( EPriorityWlan, KPriorityWlan ) );
|
|
1755 |
iGlobalParams.Append( EInputParams( EPriorityPan, KPriorityPan ) );
|
|
1756 |
iGlobalParams.Append( EInputParams( EPriorityGprsOut, KPriorityGprsOut ) );
|
|
1757 |
iGlobalParams.Append( EInputParams( EPriorityGprsIn, KPriorityGprsIn ) );
|
|
1758 |
iGlobalParams.Append( EInputParams( EPriorityCdma2k, KPriorityCdma2k ) );
|
|
1759 |
iGlobalParams.Append( EInputParams( EPriorityDialOut, KPriorityDialOut ) );
|
|
1760 |
iGlobalParams.Append( EInputParams( EPriorityDialIn, KPriorityDialIn ) );
|
|
1761 |
iGlobalParams.Append( EInputParams( EPriorityVpn, KPriorityVpn ) );
|
|
1762 |
iGlobalParams.Append( EInputParams( EPriorityMip, KPriorityMip ) );
|
|
1763 |
iGlobalParams.Append( EInputParams( EUIPriorityLan, KUIPriorityLan ) );
|
|
1764 |
iGlobalParams.Append( EInputParams( EUIPriorityWlan, KUIPriorityWlan ) );
|
|
1765 |
iGlobalParams.Append( EInputParams( EUIPriorityPan, KUIPriorityPan ) );
|
|
1766 |
iGlobalParams.Append( EInputParams( EUIPriorityGprsOut, KUIPriorityGprsOut ) );
|
|
1767 |
iGlobalParams.Append( EInputParams( EUIPriorityGprsIn, KUIPriorityGprsIn ) );
|
|
1768 |
iGlobalParams.Append( EInputParams( EUIPriorityCdma2k, KUIPriorityCdma2k ) );
|
|
1769 |
iGlobalParams.Append( EInputParams( EUIPriorityDialOut, KUIPriorityDialOut ) );
|
|
1770 |
iGlobalParams.Append( EInputParams( EUIPriorityDialIn, KUIPriorityDialIn ) );
|
|
1771 |
iGlobalParams.Append( EInputParams( EUIPriorityVpn, KUIPriorityVpn ) );
|
|
1772 |
iGlobalParams.Append( EInputParams( EUIPriorityMip, KUIPriorityMip ) );
|
|
1773 |
iGlobalParams.Append( EInputParams( EUsageOfWlan, KUsageOfWlan ) );
|
|
1774 |
iGlobalParams.Append( EInputParams( ECellularDataUsageHome, KCellularDataUsageHome ) );
|
|
1775 |
iGlobalParams.Append( EInputParams( ECellularDataUsageVisitor, KCellularDataUsageVisitor ) );
|
|
1776 |
iGlobalParams.Append( EInputParams( EGprsLastSocketActivityTimeout, KGprsLastSocketActivityTimeout ) );
|
|
1777 |
iGlobalParams.Append( EInputParams( EGprsLastSessionClosedTimeout, KGprsLastSessionClosedTimeout ) );
|
|
1778 |
iGlobalParams.Append( EInputParams( EGprsLastSocketClosedTimeout, KGprsLastSocketClosedTimeout ) );
|
|
1779 |
iGlobalParams.Append( EInputParams( EWlanLastSocketActivityTimeout, KWlanLastSocketActivityTimeout ) );
|
|
1780 |
iGlobalParams.Append( EInputParams( EWlanLastSessionClosedTimeout, KWlanLastSessionClosedTimeout ) );
|
|
1781 |
iGlobalParams.Append( EInputParams( EWlanLastSocketClosedTimeout, KWlanLastSocketClosedTimeout ) );
|
|
1782 |
iGlobalParams.Append( EInputParams( EWlanBGScanInterval, KWlanBGScanInterval ) );
|
|
1783 |
iGlobalParams.Append( EInputParams( EWlanUseDefSettings, KWlanUseDefSettings ) );
|
|
1784 |
iGlobalParams.Append( EInputParams( EWlanLongRetry, KWlanLongRetry ) );
|
|
1785 |
iGlobalParams.Append( EInputParams( EWlanShortRetry, KWlanShortRetry ) );
|
|
1786 |
iGlobalParams.Append( EInputParams( EWlanRTS, KWlanRTS ) );
|
|
1787 |
iGlobalParams.Append( EInputParams( EWlanTxPowerLevel, KWlanTxPowerLevel ) );
|
|
1788 |
iGlobalParams.Append( EInputParams( EWlanRadioMeasurements, KWlanRadioMeasurements ) );
|
|
1789 |
iGlobalParams.Append( EInputParams( EWlanPowerMode, KWlanPowerMode ) );
|
|
1790 |
|
|
1791 |
};
|
|
1792 |
|
|
1793 |
//Describes a Destination Network
|
|
1794 |
void CReaderXML::FillDNParams()
|
|
1795 |
{
|
|
1796 |
iDNParams.Append( EInputParams( EDN_Name, KDN_Name ) );
|
|
1797 |
iDNParams.Append( EInputParams( EDN_Id, KDN_Id ) );
|
|
1798 |
iDNParams.Append( EInputParams( EDN_Icon, KDN_Icon ) );
|
|
1799 |
iDNParams.Append( EInputParams( EDN_Metadata, KDN_Metadata ) );
|
|
1800 |
iDNParams.Append( EInputParams( EDN_Protection, KDN_Protection ) );
|
|
1801 |
iDNParams.Append( EInputParams( EDN_Hidden, KHidden ) );
|
|
1802 |
iDNParams.Append( EInputParams( EDN_HiddenAgent, KHiddenAgent ) );
|
|
1803 |
iDNParams.Append( EInputParams( EDN_Highlighted, KHighlighted ) );
|
|
1804 |
iDNParams.Append( EInputParams( EDN_EmbeddedDNName, KDN_EmbeddedDNName ) );
|
|
1805 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName ) );
|
|
1806 |
// Needed because of Customization Tool limitations
|
|
1807 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName2 ) );
|
|
1808 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName3 ) );
|
|
1809 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName4 ) );
|
|
1810 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName5 ) );
|
|
1811 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName6 ) );
|
|
1812 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName7 ) );
|
|
1813 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName8 ) );
|
|
1814 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName9 ) );
|
|
1815 |
iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName10 ) );
|
|
1816 |
};
|
|
1817 |
|
|
1818 |
// End of File.
|