|
1 /* |
|
2 * Copyright (c) 2002 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: Declaration of enums and const for DbCreator |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CDCCOMMON_H |
|
22 #define CDCCOMMON_H |
|
23 |
|
24 // Possible input files |
|
25 enum TDbCreatorInputFile |
|
26 { |
|
27 EFileUnknown = 0x00000000, // Unrecognized |
|
28 EFileXML = 0x00000001 // XML file |
|
29 }; |
|
30 |
|
31 // Possible character sets of input file |
|
32 enum TDbCreatorInputCharSet |
|
33 { |
|
34 ECharSetAscii = 0x00000000, // ASCII |
|
35 ECharSetUnicode = 0x00000001, // Unicode |
|
36 ECharSetUtf8 = 0x00000002, // UTF-8 |
|
37 ECharSetUnknown = 0x00000003 // Unknown |
|
38 }; |
|
39 |
|
40 // Feaures DbCreator can recognize (from XML input) |
|
41 enum TDbCreatorFeatures |
|
42 { |
|
43 EFeatureNone = 0x00000000, // No feature found |
|
44 EFeaturePacketData = 0x00000001, // GPRS access point |
|
45 EFeatureWLAN = 0x00000002, // WLAN access point |
|
46 EFeatureLAN = 0x00000003, // LAN access point |
|
47 EFeatureCSD = 0x00000004, // CSD access point |
|
48 EFeatureHSCSD = 0x00000005, // HSCSD access point |
|
49 EFeatureVPN = 0x00000006, // VPN access point |
|
50 EFeatureDN = 0x00000007, // Destination Network |
|
51 EFeatureGlobal = 0x00000008 // Global settings |
|
52 }; |
|
53 |
|
54 // Global settings |
|
55 enum TDbCreatorGlobalSettings |
|
56 { |
|
57 EGPRSAttachMode = 0x00000000, |
|
58 EDefaultDnIcon = 0x00000001, |
|
59 EPriorityLan = 0x00000002, |
|
60 EPriorityWlan = 0x00000003, |
|
61 EPriorityPan = 0x00000004, |
|
62 EPriorityGprsIn = 0x00000005, |
|
63 EPriorityGprsOut = 0x00000006, |
|
64 EPriorityCdma2k = 0x00000007, |
|
65 EPriorityDialOut = 0x00000009, |
|
66 EPriorityDialIn = 0x0000000a, |
|
67 EPriorityVpn = 0x0000000b, |
|
68 EPriorityMip = 0x0000000c, |
|
69 EUIPriorityLan = 0x0000000d, |
|
70 EUIPriorityWlan = 0x0000000e, |
|
71 EUIPriorityPan = 0x0000000f, |
|
72 EUIPriorityGprsIn = 0x00000010, |
|
73 EUIPriorityGprsOut = 0x00000011, |
|
74 EUIPriorityCdma2k = 0x00000012, |
|
75 EUIPriorityDialOut = 0x00000013, |
|
76 EUIPriorityDialIn = 0x00000014, |
|
77 EUIPriorityVpn = 0x00000015, |
|
78 EUIPriorityMip = 0x00000016, |
|
79 EDefaultConnectionType= 0x00000017, |
|
80 EDefaultConnectionName= 0x00000018, |
|
81 EGprsLastSocketActivityTimeout = 0x00000019, |
|
82 EGprsLastSessionClosedTimeout = 0x0000001a, |
|
83 EGprsLastSocketClosedTimeout = 0x0000001b, |
|
84 ECsdLastSocketActivityTimeout = 0x0000001c, |
|
85 ECsdLastSessionClosedTimeout = 0x0000001d, |
|
86 ECsdLastSocketClosedTimeout = 0x0000001e, |
|
87 EWlanLastSocketActivityTimeout = 0x0000001f, |
|
88 EWlanLastSessionClosedTimeout = 0x00000020, |
|
89 EWlanLastSocketClosedTimeout = 0x00000021, |
|
90 EWlanBGScanInterval = 0x00000022, |
|
91 EWlanUseDefSettings = 0x00000023, |
|
92 EWlanLongRetry = 0x00000024, |
|
93 EWlanShortRetry = 0x00000025, |
|
94 EWlanRTS = 0x00000026, |
|
95 EWlanTxPowerLevel = 0x00000027, |
|
96 EWlanRadioMeasurements = 0x00000028, |
|
97 EWlanPowerMode = 0x00000029, |
|
98 EDefaultAP = 0x0000002a, |
|
99 EUsageOfWlan = 0x0000002b, |
|
100 ESeamlessnessHome = 0x0000002c, |
|
101 ESeamlessnessVisitor = 0x0000002d, |
|
102 EUnused = 0x00010000 |
|
103 }; |
|
104 |
|
105 |
|
106 // Destination Network parameters |
|
107 enum TDbCreatorDNParams |
|
108 { |
|
109 EDN_Name = 0x00000000, |
|
110 EDN_Icon = 0x00000001, |
|
111 EDN_Metadata = 0x00000002, |
|
112 EDN_Protection = 0x00000003, |
|
113 EDN_Hidden = 0x00000004, |
|
114 EDN_HiddenAgent = 0x00000005, |
|
115 EDN_Highlighted = 0x00000006, |
|
116 EDN_IAPName = 0x00000007, |
|
117 EDN_EmbeddedDNName = 0x00000008, |
|
118 EDN_Id = 0x00000009 |
|
119 }; |
|
120 |
|
121 // VPN parameters |
|
122 enum TDbCreatorVpnParams |
|
123 { |
|
124 EVPN_IapName = 0x00000000 |
|
125 |
|
126 }; |
|
127 |
|
128 //WLAN Security settings |
|
129 enum TDbCreatorSecurityMode |
|
130 { |
|
131 ESecurityModeOpen = 0x00000001, // open mode |
|
132 ESecurityModeWEP = 0x00000002, // WEP security mode |
|
133 ESecurityMode802 = 0x00000004, // 802.1X security mode |
|
134 ESecurityModeWPA = 0x00000008, // Wpa security mode |
|
135 ESecurityModeWPA2 = 0x00000010 // Wpa2 only security mode |
|
136 }; |
|
137 |
|
138 //WEP related field ids |
|
139 enum TDbCreatorWEPFields |
|
140 { |
|
141 EWEPKeyInUse = 0x00001000, // Key in use |
|
142 EWEPAuthType = 0x00001001, // Authentication type |
|
143 EWEPKey1Length = 0x00001002, // Key 1 length |
|
144 EWEPKey1Format = 0x00001003, // Key 1 format |
|
145 EWEPKey1Data = 0x00001004, // Key 1 data |
|
146 EWEPKey2Length = 0x00001005, // Key 2 length |
|
147 EWEPKey2Format = 0x00001006, // Key 2 format |
|
148 EWEPKey2Data = 0x00001007, // Key 2 data |
|
149 EWEPKey3Length = 0x00001008, // Key 3 length |
|
150 EWEPKey3Format = 0x00001009, // Key 3 format |
|
151 EWEPKey3Data = 0x0000100a, // Key 3 data |
|
152 EWEPKey4Length = 0x0000100b, // Key 4 length |
|
153 EWEPKey4Format = 0x0000100c, // Key 4 format |
|
154 EWEPKey4Data = 0x0000100d, // Key 4 data |
|
155 }; |
|
156 |
|
157 //number of WEP fields |
|
158 const TInt KWEPKeyNumOfFields = 14; |
|
159 |
|
160 //WPA related field ids |
|
161 enum TDbCreatorWPAFields |
|
162 { |
|
163 EWPAPresharedKey = 0x00002000, // Preshared key |
|
164 EWPAKeyLength = 0x00002001, // Key length |
|
165 EWPAListOfEAPs = 0x00002002, // List of EA plugins |
|
166 EWPAUseOfPresharedKey =0x00002003,// Use of preshared key |
|
167 }; |
|
168 |
|
169 //number of WPA fields |
|
170 const TInt KWPAKeyNumOfFields = 4; |
|
171 |
|
172 // Enumeration of the possible keys in use |
|
173 enum TWEPKeyInUse |
|
174 { |
|
175 EKeyNumber1, // Key number 1 |
|
176 EKeyNumber2, // Key number 2 |
|
177 EKeyNumber3, // Key number 3 |
|
178 EKeyNumber4 // Key number 4 |
|
179 }; |
|
180 |
|
181 // Enumeration of the possible authentication types |
|
182 enum TWEPAuthentication |
|
183 { |
|
184 EAuthOpen, // Open authentication |
|
185 EAuthShared // Shared authentication |
|
186 }; |
|
187 |
|
188 // Possible lengths of the keys |
|
189 enum TWEPKeyLength |
|
190 { |
|
191 E40Bits, // 40 bits |
|
192 E104Bits, // 104 bits |
|
193 E232Bits // 232 bits |
|
194 }; |
|
195 |
|
196 // Possible formats of the keys |
|
197 enum TWEPKeyFormat |
|
198 { |
|
199 EAscii, // Ascii format |
|
200 EHexadecimal // Hex format |
|
201 }; |
|
202 |
|
203 // Empty key |
|
204 LOCAL_D const TUint KKeyDataLengthEmpty = 0; |
|
205 |
|
206 // Number of characters for a 40 bits key |
|
207 LOCAL_D const TUint KKeyDataLength40Bits = 10; |
|
208 |
|
209 // Number of characters for a 104 bits key |
|
210 LOCAL_D const TUint KKeyDataLength104Bits = 26; |
|
211 |
|
212 // Number of characters for a 232 bits key |
|
213 LOCAL_D const TUint KKeyDataLength232Bits = 58; |
|
214 |
|
215 // The maximum length of key data |
|
216 LOCAL_D const TUint KMaxLengthOfKeyData = KKeyDataLength232Bits; |
|
217 |
|
218 // Number of keys |
|
219 LOCAL_D const TUint KMaxNumberofKeys = 4; |
|
220 |
|
221 //EAP related field ids |
|
222 enum TDbCreatorEAPFields |
|
223 { |
|
224 EEapParameterFirst = 0x0002fff, |
|
225 EEapGtcUsername = 0x00003000, |
|
226 EEapGtcSessionValidityTime = 0x00003001, |
|
227 EEapGtcEncapsulation = 0x00003002, |
|
228 EEapTlsUsername = 0x00003053, |
|
229 EEapTlsRealm = 0x00003003, |
|
230 EEapTlsVerifyServerRealm = 0x00003004, |
|
231 EEapTlsRequireClientAuth = 0x00003005, |
|
232 EEapTlsSessionValidityTime = 0x00003006, |
|
233 EEapTlsCipherSuites = 0x00003007, |
|
234 EEapTlsUserCertSubjectKeyId = 0x00003008, |
|
235 EEapTlsUserCertIssuerName = 0x00003009, |
|
236 EEapTlsUserCertSerialNumber = 0x0000300a, |
|
237 EEapTlsCaCertSubjectKeyId = 0x0000300b, |
|
238 EEapTlsCaCertIssuerName = 0x0000300c, |
|
239 EEapTlsCaCertSerialNumber = 0x0000300d, |
|
240 EEapTlsEncapsulation = 0x0000300e, |
|
241 EEapLeapUsername = 0x0000300f, |
|
242 EEapLeapPassword = 0x00003010, |
|
243 EEapLeapSessionValidityTime = 0x00003011, |
|
244 EEapSimUsername = 0x00003012, |
|
245 EEapSimRealm = 0x00003013, |
|
246 EEapSimUsePseudonyms = 0x00003014, |
|
247 EEapSimSessionValidityTime = 0x00003015, |
|
248 EEapSimEncapsulation = 0x00003016, |
|
249 EEapTtlsUsername = 0x00003017, |
|
250 EEapTtlsRealm = 0x00003018, |
|
251 EEapTtlsVerifyServerRealm = 0x00003019, |
|
252 EEapTtlsRequireClientAuth = 0x0000301a, |
|
253 EEapTtlsSessionValidityTime = 0x0000301b, |
|
254 EEapTtlsCipherSuites = 0x0000301c, |
|
255 EEapTtlsEncapsulatedTypes = 0x0000301d, |
|
256 EEapTtlsUserCertSubjectKeyId = 0x0000301e, |
|
257 EEapTtlsUserCertIssuerName = 0x0000301f, |
|
258 EEapTtlsUserCertSerialNumber = 0x00003020, |
|
259 EEapTtlsCaCertSubjectKeyId = 0x00003021, |
|
260 EEapTtlsCaCertIssuerName = 0x00003022, |
|
261 EEapTtlsCaCertSerialNumber = 0x00003023, |
|
262 EEapAkaUsername = 0x00003024, |
|
263 EEapAkaRealm = 0x00003025, |
|
264 EEapAkaUsePseudonyms = 0x00003026, |
|
265 EEapAkaSessionValidityTime = 0x00003027, |
|
266 EEapAkaEncapsulation = 0x00003028, |
|
267 EEapPeapUsername = 0x00003029, |
|
268 EEapPeapRealm = 0x0000302a, |
|
269 EEapPeapVerifyServerRealm = 0x0000302b, |
|
270 EEapPeapRequireClientAuth = 0x0000302c, |
|
271 EEapPeapSessionValidityTime = 0x0000302d, |
|
272 EEapPeapCipherSuites = 0x0000302e, |
|
273 EEapPeapV0Allowed = 0x0000302f, |
|
274 EEapPeapV1Allowed = 0x00003030, |
|
275 EEapPeapV2Allowed = 0x00003031, |
|
276 EEapPeapEncapsulatedTypes = 0x00003032, |
|
277 EEapPeapUserCertSubjectKeyId = 0x00003033, |
|
278 EEapPeapUserCertIssuerName = 0x00003034, |
|
279 EEapPeapUserCertSerialNumber = 0x00003035, |
|
280 EEapPeapCaCertSubjectKeyId = 0x00003036, |
|
281 EEapPeapCaCertIssuerName = 0x00003037, |
|
282 EEapPeapCaCertSerialNumber = 0x00003038, |
|
283 EEapMschapv2Username = 0x00003039, |
|
284 EEapMschapv2Password = 0x0000303a, |
|
285 EEapMschapv2SessionValidityTime = 0x0000303b, |
|
286 EEapMschapv2Encapsulation = 0x0000303c, |
|
287 EEapFastUsername = 0x0000303d, |
|
288 EEapFastRealm = 0x0000303e, |
|
289 EEapFastVerifyServerRealm = 0x0000303f, |
|
290 EEapFastRequireClientAuth = 0x00003040, |
|
291 EEapFastSessionValidityTime = 0x00003041, |
|
292 EEapFastCipherSuites = 0x00003042, |
|
293 EEapFastEncapsulatedTypes = 0x00003043, |
|
294 EEapFastAuthProvModeAllowed = 0x00003044, |
|
295 EEapFastUnauthProvModeAllowed = 0x00003045, |
|
296 EEapFastWarnADHPNoPAC = 0x00003046, |
|
297 EEapFastWarnADHPNoMatchingPAC = 0x00003047, |
|
298 EEapFastWarnNotDefaultServer = 0x00003048, |
|
299 EEapFastUserCertSubjectKeyId = 0x00003049, |
|
300 EEapFastUserCertIssuerName = 0x0000304a, |
|
301 EEapFastUserCertSerialNumber = 0x0000304b, |
|
302 EEapFastCaCertSubjectKeyId = 0x0000304c, |
|
303 EEapFastCaCertIssuerName = 0x0000304d, |
|
304 EEapFastCaCertSerialNumber = 0x0000304e, |
|
305 EMschapv2Username = 0x0000304f, |
|
306 EMschapv2Password = 0x00003050, |
|
307 EMschapv2SessionValidityTime = 0x00003051, |
|
308 EMschapv2Encapsulation = 0x00003052, |
|
309 EEapParameterLast = 0x0003100 |
|
310 }; |
|
311 |
|
312 |
|
313 // exceptional field ids that are missing from access point item definition |
|
314 const TInt KFieldIgnored = -1; // Ignored field |
|
315 const TInt KFieldApplicationName = -2; // Application name. |
|
316 |
|
317 // maximum length of default GPRS name |
|
318 const TInt KMaxLengthOfApName = 50; |
|
319 |
|
320 // String constants for general connection method parameters |
|
321 _LIT16( KStrYes, "Yes" ); |
|
322 _LIT16( KStrNo, "No" ); |
|
323 _LIT16( KStrOn, "On" ); |
|
324 _LIT16( KStrOff, "Off" ); |
|
325 _LIT16( KStrEmpty, "" ); |
|
326 |
|
327 // Metadata |
|
328 _LIT16( KStrMMS, "MMS" ); |
|
329 _LIT16( KStrNotMMS, "NotMMS" ); |
|
330 |
|
331 // Seamlessness |
|
332 _LIT16( KStrNotRoamedTo, "NotRoamedTo" ); |
|
333 _LIT16( KStrConfirmFirst, "ConfirmFirst" ); |
|
334 _LIT16( KStrShowProgress, "ShowProgress" ); |
|
335 _LIT16( KStrFullySeamless, "FullySeamless" ); |
|
336 |
|
337 // Default connection type |
|
338 _LIT16( KStrAlwaysAsk, "Always ask" ); |
|
339 _LIT16( KStrAskOnce, "Ask once" ); |
|
340 _LIT16( KStrDestination, "Destination" ); |
|
341 _LIT16( KStrConnectionMethod,"Connection method" ); |
|
342 |
|
343 // General connection settings: Wlan usage: Known / Manual |
|
344 _LIT16( KStrKnown, "Known" ); |
|
345 _LIT16( KStrManual, "Manual" ); |
|
346 |
|
347 // General connection settings: Seamlessness: Automatic / Confirm / Wlan only |
|
348 _LIT16( KStrAutomatic, "Automatic" ); |
|
349 _LIT16( KStrConfirm, "Confirm" ); |
|
350 _LIT16( KStrWlanOnly, "Wlan only" ); |
|
351 |
|
352 // Packet Data Settings |
|
353 enum TDbCreatorPacketDataSettings |
|
354 { |
|
355 EPacketDataLinger = 0x29041982 |
|
356 }; |
|
357 |
|
358 |
|
359 #endif //CDCCOMMON_H |