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