|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Test utilities for WV engine |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <e32base.h> |
|
22 #include <CoreApplicationUIsSDKCRKeys.h> |
|
23 #include "impsservercommon.h" |
|
24 #include "impsutils.h" |
|
25 #include "impserrors.h" |
|
26 #include "impsservices.h" |
|
27 #include "impssrvutils.h" |
|
28 #include "impskey.h" |
|
29 #include "impssdatautils.h" |
|
30 #include "impsfields.h" |
|
31 #include "wvengineinternalcrkeys.h" |
|
32 |
|
33 // MACROS |
|
34 #ifdef _DEBUG |
|
35 #define _IMPS_LOGGING_ |
|
36 #endif |
|
37 |
|
38 // CONSTANTS |
|
39 #ifdef _DEBUG |
|
40 _LIT8( KImpsIniPollTime, "PollTime" ); |
|
41 _LIT8( KImpsIniXmlLog, "XmlLog" ); |
|
42 _LIT8( KImpsIniXmlPollingLog, "XmlPollingLog" ); |
|
43 _LIT8( KImpsIniNoWAPSMSCIR, "NoWAPSMSCIR" ); |
|
44 _LIT8( KImpsIniNoWAPUDPCIR, "NoWAPUDPCIR" ); |
|
45 _LIT8( KImpsIniNoTCPSCIR, "NoTCPSCIR" ); |
|
46 _LIT8( KImpsIniNoUDPSCIR, "NoUDPSCIR" ); |
|
47 _LIT8( KImpsIniKeepAlive, "KeepAlive" ); |
|
48 _LIT8( KImpsIniCIRModePollTime, "CIRModePollTime" ); |
|
49 _LIT8( KImpsIniMultiTrans, "MultiTrans" ); |
|
50 _LIT8( KImpsIniACExpiry, "ACExpiry" ); |
|
51 _LIT8( KImpsIniGRExpiry, "GRExpiry" ); |
|
52 _LIT8( KImpsIniPRExpiry, "PRExpiry" ); |
|
53 _LIT8( KImpsIniFUExpiry, "FUExpiry" ); |
|
54 _LIT8( KImpsIniIMExpiry, "IMExpiry" ); |
|
55 _LIT8( KImpsIniPDPExpiry, "PDPExpiry" ); |
|
56 _LIT8( KImpsIni4WayLogin, "4WayLogin" ); |
|
57 _LIT8( KImpsIniMaxMessageSize, "MaxMessageSize" ); |
|
58 #endif |
|
59 |
|
60 |
|
61 // ================= MEMBER FUNCTIONS ======================= |
|
62 |
|
63 // --------------------------------------------------------- |
|
64 // TImpsSrvUtils::InitializeServices |
|
65 // --------------------------------------------------------- |
|
66 // |
|
67 void TImpsSrvUtils::InitializeServices( |
|
68 TImpsServices& aServices, TBool aReactive ) |
|
69 { |
|
70 |
|
71 // clear the service tree |
|
72 Mem::FillZ( &aServices, sizeof( TImpsServices ) ); |
|
73 |
|
74 // IM Send NewMessage and receive are requested plus IMAuthFunc |
|
75 TImpsFeature* feat = aServices.Feature( EIMFeat ); |
|
76 feat->SetSupported( ETrue ); |
|
77 feat->SetFunction( EAllFuncs , ETrue ); |
|
78 feat->SetCapability( KImpsServiceNEWM | KImpsServiceGLBLU |
|
79 | KImpsServiceBLENT , ETrue ); |
|
80 |
|
81 // All group features are requested |
|
82 feat = aServices.Feature( EGroupFeat ); |
|
83 feat->SetSupported( ETrue ); |
|
84 feat->SetFunction( EAllFuncs, ETrue ); |
|
85 feat->SetCapability( 0xFFFFFFFF , ETrue ); //lint !e569 |
|
86 |
|
87 // Reactive Presence is optional, if it is supported |
|
88 // then the entire Presence is supported. |
|
89 // WV 1.2 contains a new element GETAUT but there is no |
|
90 // need to handle that separately, since the entire Presence |
|
91 // is negotiated then. |
|
92 feat = aServices.Feature( EPresenceFeat ); |
|
93 feat->SetSupported( ETrue ); |
|
94 if ( aReactive ) |
|
95 { |
|
96 feat->SetFunction( EAllFuncs, ETrue ); |
|
97 feat->SetCapability( 0xFFFFFFFF , ETrue ); //lint !e569 |
|
98 } |
|
99 else |
|
100 { |
|
101 // Part of presence features are requested |
|
102 // PresenceAuth functions has limited support. |
|
103 feat->SetFunction( EPresenceAuthFunc, ETrue ); |
|
104 feat->SetCapability( |
|
105 KImpsServiceGETWL, ETrue ); |
|
106 feat->SetFunction( EContListFunc, ETrue ); |
|
107 feat->SetCapability( KImpsServiceGCLI | |
|
108 KImpsServiceCCLI | KImpsServiceDCLI | KImpsServiceMCLS, ETrue ); |
|
109 feat->SetFunction( EAttrListFunc, ETrue ); |
|
110 feat->SetCapability( |
|
111 KImpsServiceCALI | KImpsServiceDALI | KImpsServiceGALS , ETrue ); |
|
112 feat->SetFunction( EPresenceDeliverFunc, ETrue ); |
|
113 feat->SetCapability( KImpsServiceGETPR | KImpsServiceUPDPR, ETrue ); |
|
114 } |
|
115 |
|
116 // Part of fundamental features are requested: |
|
117 // SearchFunc and InviteFunc supported. |
|
118 // ServiceFunc not supported. |
|
119 feat = aServices.Feature( EFundamentalFeat ); |
|
120 feat->SetSupported( ETrue ); |
|
121 feat->SetFunction( EInviteFunc, ETrue ); |
|
122 feat->SetFunction( ESearchFunc , ETrue ); |
|
123 feat->SetCapability( KImpsServiceINVIT | KImpsServiceCAINV | |
|
124 KImpsServiceSRCH | KImpsServiceSTSRC, ETrue ); |
|
125 } |
|
126 |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // TImpsSrvUtils::DiscardServicesL |
|
130 // --------------------------------------------------------------------------- |
|
131 void TImpsSrvUtils::DiscardServicesL( |
|
132 MImpsDataAccessor* aData, |
|
133 TImpsServices* aServices ) |
|
134 { |
|
135 |
|
136 CImpsKey* myKey = CImpsKey::NewLC(); // <<< myKey |
|
137 TImpsSDataUtils::AddValuesFromArrayL( |
|
138 myKey, |
|
139 KClientServiceResElements, |
|
140 sizeof( KClientServiceResElements ) / |
|
141 sizeof( KClientServiceResElements[0] ) ); |
|
142 |
|
143 // notice: ignore Client id this time |
|
144 |
|
145 // Discareded Functions |
|
146 myKey->AddL( CREATEKEY( EImpsKeyFunctions, 0 ) ); |
|
147 if ( !aData->CheckBranchExistenceL( myKey ) ) |
|
148 { |
|
149 // Nothing is denied. |
|
150 CleanupStack::PopAndDestroy( 1 ); |
|
151 return; |
|
152 } |
|
153 |
|
154 myKey->AddL( CREATEKEY( EImpsKeyWVCSPFeat, 0 ) ); |
|
155 TInt enumi( 0 ); |
|
156 TInt index( 0 ); |
|
157 TImpsKeyType kType; |
|
158 |
|
159 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
160 { |
|
161 // Check if empty WVCSPFeat. That means deny all. |
|
162 // Decoder may have inserted the element with empty data although |
|
163 // it has a child. Therefore RestoreEmptyL cannot be used here. |
|
164 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
165 { |
|
166 // All is denied |
|
167 TImpsFeature* imF = aServices->Feature( EIMFeat ); |
|
168 imF->SetSupported( EFalse ); |
|
169 imF->SetFunction( EAllFuncs, EFalse ); |
|
170 imF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
171 |
|
172 TImpsFeature* prF = aServices->Feature( EPresenceFeat ); |
|
173 prF->SetSupported( EFalse ); |
|
174 prF->SetFunction( EAllFuncs, EFalse ); |
|
175 prF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
176 |
|
177 TImpsFeature* funF = aServices->Feature( EFundamentalFeat ); |
|
178 funF->SetSupported( EFalse ); |
|
179 funF->SetFunction( EAllFuncs, EFalse ); |
|
180 funF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
181 |
|
182 TImpsFeature* grF = aServices->Feature( EGroupFeat ); |
|
183 grF->SetSupported( EFalse ); |
|
184 grF->SetFunction( EAllFuncs, EFalse ); |
|
185 grF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
186 CleanupStack::PopAndDestroy( 1 ); |
|
187 return; |
|
188 } |
|
189 |
|
190 // IM |
|
191 myKey->AddL( CREATEKEY( EImpsKeyIMFeat, 0 ) ); |
|
192 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
193 { |
|
194 TImpsFeature* imF = aServices->Feature( EIMFeat ); |
|
195 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
196 { |
|
197 // Whole IM denied |
|
198 imF->SetSupported( EFalse ); |
|
199 imF->SetFunction( EAllFuncs, EFalse ); |
|
200 imF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
201 } |
|
202 else |
|
203 { |
|
204 |
|
205 // Let's check functions too, although server should not send these |
|
206 // because of we have not ordered them. |
|
207 myKey->AddL( CREATEKEY( EImpsKeyIMSendFunc, 0 ) ); |
|
208 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
209 { |
|
210 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
211 { |
|
212 // EImpsKeyIMSendFunc not supported |
|
213 imF->SetFunction( EIMSendFunc, EFalse ); |
|
214 } |
|
215 // we are not interested in IMSendFunc details now. |
|
216 } |
|
217 // IMReceiveFunc |
|
218 myKey->ReplaceLastL( CREATEKEY( EImpsKeyIMReceiveFunc, 0 ) ); |
|
219 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
220 { |
|
221 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
222 { |
|
223 // EImpsKeyIMReceiveFunc not supported |
|
224 imF->SetFunction( EIMReceiveFunc, EFalse ); |
|
225 imF->SetCapability( KImpsServiceNEWM , EFalse ); |
|
226 } |
|
227 else |
|
228 { |
|
229 // Check if NEWM not supported |
|
230 myKey->AddL( CREATEKEY( EImpsKeyNEWM , 0 ) ); |
|
231 if ( aData->RestoreEmptyL( myKey ) ) |
|
232 { |
|
233 imF->SetCapability( KImpsServiceNEWM, EFalse ); |
|
234 } |
|
235 myKey->PopL(); |
|
236 } |
|
237 } |
|
238 // IMAuthFunc |
|
239 myKey->ReplaceLastL( CREATEKEY( EImpsKeyIMAuthFunc , 0 ) ); |
|
240 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
241 { |
|
242 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
243 { |
|
244 // IMAuthFunc not supported |
|
245 imF->SetFunction( EIMAuthFunc, EFalse ); |
|
246 imF->SetCapability( KImpsServiceGLBLU | KImpsServiceBLENT, EFalse ); |
|
247 } |
|
248 else |
|
249 { |
|
250 // Check if GLBLU not supported |
|
251 myKey->AddL( CREATEKEY( EImpsKeyGLBLU , 0 ) ); |
|
252 if ( aData->RestoreEmptyL( myKey ) ) |
|
253 { |
|
254 imF->SetCapability( KImpsServiceGLBLU, EFalse ); |
|
255 } |
|
256 // Check if BLENT not supported |
|
257 myKey->ReplaceLastL( CREATEKEY( EImpsKeyBLENT , 0 ) ); |
|
258 if ( aData->RestoreEmptyL( myKey ) ) |
|
259 { |
|
260 imF->SetCapability( KImpsServiceBLENT, EFalse ); |
|
261 } |
|
262 myKey->PopL(); |
|
263 } |
|
264 } |
|
265 myKey->PopL(); |
|
266 } |
|
267 } // IM |
|
268 |
|
269 // Presence |
|
270 |
|
271 myKey->ReplaceLastL( CREATEKEY( EImpsKeyPresenceFeat, 0 ) ); |
|
272 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
273 { |
|
274 TImpsFeature* prF = aServices->Feature( EPresenceFeat ); |
|
275 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
276 { |
|
277 // Presence totally denied |
|
278 prF->SetSupported( EFalse ); |
|
279 prF->SetFunction( EAllFuncs, EFalse ); |
|
280 prF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
281 } |
|
282 else |
|
283 { |
|
284 // Check first AttListFunc |
|
285 myKey->AddL( CREATEKEY( EImpsKeyAttListFunc, 0 ) ); |
|
286 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
287 { |
|
288 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
289 { |
|
290 // AttListFunc not supported |
|
291 prF->SetFunction( EAttrListFunc, EFalse ); |
|
292 prF->SetCapability( KImpsServiceCALI | KImpsServiceDALI | |
|
293 KImpsServiceGALS, EFalse ); |
|
294 } |
|
295 else |
|
296 { |
|
297 // Check CALI |
|
298 myKey->AddL( CREATEKEY( EImpsKeyCALI , 0 ) ); |
|
299 if ( aData->RestoreEmptyL( myKey ) ) |
|
300 { |
|
301 prF->SetCapability( KImpsServiceCALI, EFalse ); |
|
302 } |
|
303 // Check DALI |
|
304 myKey->ReplaceLastL( CREATEKEY( EImpsKeyDALI , 0 ) ); |
|
305 if ( aData->RestoreEmptyL( myKey ) ) |
|
306 { |
|
307 prF->SetCapability( KImpsServiceDALI, EFalse ); |
|
308 } |
|
309 // Check GALS |
|
310 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGALS , 0 ) ); |
|
311 if ( aData->RestoreEmptyL( myKey ) ) |
|
312 { |
|
313 prF->SetCapability( KImpsServiceGALS, EFalse ); |
|
314 } |
|
315 myKey->PopL(); |
|
316 } |
|
317 } |
|
318 // PresenceDeliverFunc |
|
319 myKey->ReplaceLastL( CREATEKEY( EImpsKeyPresenceDeliverFunc, 0 ) ); |
|
320 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
321 { |
|
322 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
323 { |
|
324 // PresenceDeliverFunc not supported |
|
325 prF->SetFunction( EPresenceDeliverFunc, EFalse ); |
|
326 prF->SetCapability( KImpsServiceGETPR | KImpsServiceUPDPR, EFalse ); |
|
327 } |
|
328 else |
|
329 { |
|
330 // Check GETPR |
|
331 myKey->AddL( CREATEKEY( EImpsKeyGETPR , 0 ) ); |
|
332 if ( aData->RestoreEmptyL( myKey ) ) |
|
333 { |
|
334 prF->SetCapability( KImpsServiceGETPR, EFalse ); |
|
335 } |
|
336 // Check UPDPR |
|
337 myKey->ReplaceLastL( CREATEKEY( EImpsKeyUPDPR , 0 ) ); |
|
338 if ( aData->RestoreEmptyL( myKey ) ) |
|
339 { |
|
340 prF->SetCapability( KImpsServiceUPDPR, EFalse ); |
|
341 } |
|
342 myKey->PopL(); |
|
343 } |
|
344 } |
|
345 |
|
346 // PresenceAuthFunc |
|
347 // Get the WV version since WV 1.2 includes a brand new |
|
348 // element GETAUT. |
|
349 CImpsFields* f = aData->GetImpsFields(); |
|
350 TImpsCspVersion ver = f->CspVersion(); |
|
351 myKey->ReplaceLastL( CREATEKEY( EImpsKeyPresenceAuthFunc, 0 ) ); |
|
352 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
353 { |
|
354 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
355 { |
|
356 // PresenceAuthFunc not supported |
|
357 prF->SetFunction( EPresenceAuthFunc, EFalse ); |
|
358 prF->SetCapability( KImpsServiceGETWL | KImpsServiceREACT | |
|
359 KImpsServiceCAAUT, EFalse ); |
|
360 } |
|
361 else |
|
362 { |
|
363 // Check GETWL |
|
364 myKey->AddL( CREATEKEY( EImpsKeyGETWL, 0 ) ); |
|
365 if ( aData->RestoreEmptyL( myKey ) ) |
|
366 { |
|
367 prF->SetCapability( KImpsServiceGETWL, EFalse ); |
|
368 } |
|
369 // Check REACT |
|
370 myKey->ReplaceLastL( CREATEKEY( EImpsKeyREACT, 0 ) ); |
|
371 if ( aData->RestoreEmptyL( myKey ) ) |
|
372 { |
|
373 prF->SetCapability( KImpsServiceREACT, EFalse ); |
|
374 } |
|
375 // Check CAAUT |
|
376 myKey->ReplaceLastL( CREATEKEY( EImpsKeyCAAUT, 0 ) ); |
|
377 if ( aData->RestoreEmptyL( myKey ) ) |
|
378 { |
|
379 prF->SetCapability( KImpsServiceCAAUT, EFalse ); |
|
380 } |
|
381 // Check GETAUT, clear it always in WV 1.1 |
|
382 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGETAUT, 0 ) ); |
|
383 if ( ver == EImpsCspVersion11 || |
|
384 ( aData->RestoreEmptyL( myKey ) ) ) |
|
385 { |
|
386 prF->SetCapability( KImpsServiceGETAUT, EFalse ); |
|
387 } |
|
388 myKey->PopL(); |
|
389 } |
|
390 |
|
391 // ContactListFunc |
|
392 myKey->ReplaceLastL( CREATEKEY( EImpsKeyContListFunc, 0 ) ); |
|
393 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
394 { |
|
395 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
396 { |
|
397 // ContactListFunc not supported |
|
398 prF->SetFunction( EContListFunc, EFalse ); |
|
399 prF->SetCapability( KImpsServiceGCLI | KImpsServiceCCLI | |
|
400 KImpsServiceDCLI | KImpsServiceMCLS, EFalse ); |
|
401 } |
|
402 else |
|
403 { |
|
404 // Check GCLI |
|
405 myKey->AddL( CREATEKEY( EImpsKeyGCLI, 0 ) ); |
|
406 if ( aData->RestoreEmptyL( myKey ) ) |
|
407 { |
|
408 prF->SetCapability( KImpsServiceGCLI, EFalse ); |
|
409 } |
|
410 // Check CCLI |
|
411 myKey->ReplaceLastL( CREATEKEY( EImpsKeyCCLI, 0 ) ); |
|
412 if ( aData->RestoreEmptyL( myKey ) ) |
|
413 { |
|
414 prF->SetCapability( KImpsServiceCCLI, EFalse ); |
|
415 } |
|
416 // Check DCLI |
|
417 myKey->ReplaceLastL( CREATEKEY( EImpsKeyDCLI, 0 ) ); |
|
418 if ( aData->RestoreEmptyL( myKey ) ) |
|
419 { |
|
420 prF->SetCapability( KImpsServiceDCLI, EFalse ); |
|
421 } |
|
422 // Check MCLS |
|
423 myKey->ReplaceLastL( CREATEKEY( EImpsKeyMCLS, 0 ) ); |
|
424 if ( aData->RestoreEmptyL( myKey ) ) |
|
425 { |
|
426 prF->SetCapability( KImpsServiceMCLS, EFalse ); |
|
427 } |
|
428 myKey->PopL(); |
|
429 } |
|
430 } |
|
431 } |
|
432 myKey->PopL(); |
|
433 } |
|
434 } // Presence |
|
435 |
|
436 // Fundamental |
|
437 |
|
438 myKey->ReplaceLastL( CREATEKEY( EImpsKeyFundamentalFeat, 0 ) ); |
|
439 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
440 { |
|
441 TImpsFeature* fF = aServices->Feature( EFundamentalFeat ); |
|
442 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
443 { |
|
444 // Fundamental totally denied |
|
445 fF->SetSupported( EFalse ); |
|
446 fF->SetFunction( EAllFuncs, EFalse ); |
|
447 fF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
448 } |
|
449 else |
|
450 { |
|
451 // Check first SearchFunc |
|
452 myKey->AddL( CREATEKEY( EImpsKeySearchFunc, 0 ) ); |
|
453 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
454 { |
|
455 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
456 { |
|
457 // SearchFunc not supported |
|
458 fF->SetFunction( ESearchFunc, EFalse ); |
|
459 fF->SetCapability( KImpsServiceSRCH | KImpsServiceSTSRC, EFalse ); |
|
460 } |
|
461 else |
|
462 { |
|
463 // Check SRCH |
|
464 myKey->AddL( CREATEKEY( EImpsKeySRCH , 0 ) ); |
|
465 if ( aData->RestoreEmptyL( myKey ) ) |
|
466 { |
|
467 fF->SetCapability( KImpsServiceSRCH, EFalse ); |
|
468 } |
|
469 // Check STSRC |
|
470 myKey->ReplaceLastL( CREATEKEY( EImpsKeySTSRC , 0 ) ); |
|
471 if ( aData->RestoreEmptyL( myKey ) ) |
|
472 { |
|
473 fF->SetCapability( KImpsServiceSTSRC, EFalse ); |
|
474 } |
|
475 myKey->PopL(); |
|
476 } |
|
477 } |
|
478 // InviteFunc |
|
479 myKey->ReplaceLastL( CREATEKEY( EImpsKeyInviteFunc, 0 ) ); |
|
480 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
481 { |
|
482 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
483 { |
|
484 // InviteFunc not supported |
|
485 fF->SetFunction( EInviteFunc, EFalse ); |
|
486 fF->SetCapability( KImpsServiceINVIT | KImpsServiceCAINV, EFalse ); |
|
487 } |
|
488 else |
|
489 { |
|
490 // Check INVIT |
|
491 myKey->AddL( CREATEKEY( EImpsKeyINVIT , 0 ) ); |
|
492 if ( aData->RestoreEmptyL( myKey ) ) |
|
493 { |
|
494 fF->SetCapability( KImpsServiceINVIT, EFalse ); |
|
495 } |
|
496 // Check CAINV |
|
497 myKey->ReplaceLastL( CREATEKEY( EImpsKeyCAINV , 0 ) ); |
|
498 if ( aData->RestoreEmptyL( myKey ) ) |
|
499 { |
|
500 fF->SetCapability( KImpsServiceCAINV, EFalse ); |
|
501 } |
|
502 myKey->PopL(); |
|
503 } |
|
504 } |
|
505 myKey->PopL(); |
|
506 } |
|
507 // We are not interested in ServiceFunc now |
|
508 } // Fundamental |
|
509 |
|
510 |
|
511 // Group |
|
512 TImpsFeature* grF = aServices->Feature( EGroupFeat ); |
|
513 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGroupFeat, 0 ) ); |
|
514 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
515 { |
|
516 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
517 { |
|
518 // Group totally denied |
|
519 grF->SetSupported( EFalse ); |
|
520 grF->SetFunction( EAllFuncs, EFalse ); |
|
521 grF->SetCapability( 0xFFFFFFFF , EFalse ); |
|
522 } |
|
523 else |
|
524 { |
|
525 // Check first GroupMgmtFunc |
|
526 myKey->AddL( CREATEKEY( EImpsKeyGroupMgmtFunc, 0 ) ); |
|
527 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
528 { |
|
529 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
530 { |
|
531 // GroupMgmtFunc not supported |
|
532 grF->SetFunction( EGroupMgmtFunc, EFalse ); |
|
533 grF->SetCapability( KImpsServiceCREAG | KImpsServiceDELGR | |
|
534 KImpsServiceGETGP | KImpsServiceSETGP, EFalse ); |
|
535 } |
|
536 else |
|
537 { |
|
538 // Check CREAG |
|
539 myKey->AddL( CREATEKEY( EImpsKeyCREAG , 0 ) ); |
|
540 if ( aData->RestoreEmptyL( myKey ) ) |
|
541 { |
|
542 grF->SetCapability( KImpsServiceCREAG, EFalse ); |
|
543 } |
|
544 // Check DELGR |
|
545 myKey->ReplaceLastL( CREATEKEY( EImpsKeyDELGR , 0 ) ); |
|
546 if ( aData->RestoreEmptyL( myKey ) ) |
|
547 { |
|
548 grF->SetCapability( KImpsServiceDELGR, EFalse ); |
|
549 } |
|
550 // Check GETGP |
|
551 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGETGP , 0 ) ); |
|
552 if ( aData->RestoreEmptyL( myKey ) ) |
|
553 { |
|
554 grF->SetCapability( KImpsServiceGETGP, EFalse ); |
|
555 } |
|
556 // Check SETGP |
|
557 myKey->ReplaceLastL( CREATEKEY( EImpsKeySETGP , 0 ) ); |
|
558 if ( aData->RestoreEmptyL( myKey ) ) |
|
559 { |
|
560 grF->SetCapability( KImpsServiceSETGP, EFalse ); |
|
561 } |
|
562 myKey->PopL(); |
|
563 } |
|
564 } |
|
565 // GroupUseFunc |
|
566 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGroupUseFunc, 0 ) ); |
|
567 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
568 { |
|
569 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
570 { |
|
571 // GroupUseFunc not supported |
|
572 grF->SetFunction( EGroupUseFunc, EFalse ); |
|
573 grF->SetCapability( KImpsServiceSUBGCN | KImpsServiceGRCHN, EFalse ); |
|
574 } |
|
575 else |
|
576 { |
|
577 // Check SUBGCN |
|
578 myKey->AddL( CREATEKEY( EImpsKeySUBGCN , 0 ) ); |
|
579 if ( aData->RestoreEmptyL( myKey ) ) |
|
580 { |
|
581 grF->SetCapability( KImpsServiceSUBGCN, EFalse ); |
|
582 } |
|
583 // Check GRCHN |
|
584 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGRCHN , 0 ) ); |
|
585 if ( aData->RestoreEmptyL( myKey ) ) |
|
586 { |
|
587 grF->SetCapability( KImpsServiceGRCHN, EFalse ); |
|
588 } |
|
589 myKey->PopL(); |
|
590 } |
|
591 } |
|
592 // GroupAuthFunc |
|
593 myKey->ReplaceLastL( CREATEKEY( EImpsKeyGroupAuthFunc, 0 ) ); |
|
594 if ( aData->CheckBranchExistenceL( myKey ) ) |
|
595 { |
|
596 if ( !aData->RestoreAlternativeL( myKey, enumi, index, kType ) ) |
|
597 { |
|
598 // GroupAuthFunc not supported |
|
599 grF->SetFunction( EGroupAuthFunc, EFalse ); |
|
600 grF->SetCapability( KImpsServiceGETGM | KImpsServiceADDGM | |
|
601 KImpsServiceRMVGM | KImpsServiceMBRAC | KImpsServiceREJEC, EFalse ); |
|
602 } |
|
603 else |
|
604 { |
|
605 // Check GETGM |
|
606 myKey->AddL( CREATEKEY( EImpsKeyGETGM , 0 ) ); |
|
607 if ( aData->RestoreEmptyL( myKey ) ) |
|
608 { |
|
609 grF->SetCapability( KImpsServiceGETGM, EFalse ); |
|
610 } |
|
611 // Check ADDGM |
|
612 myKey->ReplaceLastL( CREATEKEY( EImpsKeyADDGM , 0 ) ); |
|
613 if ( aData->RestoreEmptyL( myKey ) ) |
|
614 { |
|
615 grF->SetCapability( KImpsServiceADDGM, EFalse ); |
|
616 } |
|
617 // Check RMVGM |
|
618 myKey->ReplaceLastL( CREATEKEY( EImpsKeyRMVGM , 0 ) ); |
|
619 if ( aData->RestoreEmptyL( myKey ) ) |
|
620 { |
|
621 grF->SetCapability( KImpsServiceRMVGM, EFalse ); |
|
622 } |
|
623 // Check MBRAC |
|
624 myKey->ReplaceLastL( CREATEKEY( EImpsKeyMBRAC , 0 ) ); |
|
625 if ( aData->RestoreEmptyL( myKey ) ) |
|
626 { |
|
627 grF->SetCapability( KImpsServiceMBRAC, EFalse ); |
|
628 } |
|
629 // Check REJEC |
|
630 myKey->ReplaceLastL( CREATEKEY( EImpsKeyREJEC , 0 ) ); |
|
631 if ( aData->RestoreEmptyL( myKey ) ) |
|
632 { |
|
633 grF->SetCapability( KImpsServiceREJEC, EFalse ); |
|
634 } |
|
635 myKey->PopL(); |
|
636 } |
|
637 } |
|
638 myKey->PopL(); |
|
639 } |
|
640 } // Group |
|
641 |
|
642 |
|
643 myKey->PopL(); |
|
644 } |
|
645 |
|
646 CleanupStack::PopAndDestroy( 1 ); // >>> myKey |
|
647 } |
|
648 |
|
649 |
|
650 // --------------------------------------------------------- |
|
651 // TImpsSrvUtils::CheckServiceL |
|
652 // --------------------------------------------------------- |
|
653 void TImpsSrvUtils::CheckServiceL( |
|
654 TImpsFeatures aFeature, |
|
655 TImpsServices* aSrvS ) |
|
656 { |
|
657 if ( !aSrvS ) |
|
658 { |
|
659 User::Leave( KErrNotSupported ); |
|
660 } |
|
661 TImpsFeature* srvF = aSrvS->Feature( aFeature ); |
|
662 if ( !srvF->IsSupported() ) |
|
663 { |
|
664 User::Leave( KErrNotSupported ); |
|
665 } |
|
666 } |
|
667 |
|
668 // --------------------------------------------------------- |
|
669 // TImpsSrvSettings::TImpsSrvSettings |
|
670 // --------------------------------------------------------- |
|
671 // |
|
672 TImpsSrvSettings::TImpsSrvSettings( /*RFs& aFs*/ ) |
|
673 : |
|
674 // iFs ( aFs ), |
|
675 iPollTime( KImpsPollTime ), |
|
676 iAliveTime( KImpsAliveTime ), |
|
677 iMaxPollTime( KImpsMaxPoll ), |
|
678 iXmlLog( 1 ), |
|
679 iUDPWAPCIR( 1 ), |
|
680 iSMSWAPCIR( 1 ), |
|
681 iTCPSCIR( 1 ), |
|
682 iUDPSCIR( 1 ), |
|
683 iAccessExp( KImpsClientExpr ), |
|
684 iImExp( KImpsClientExpr ), |
|
685 iPrExp( KImpsPresClientExpr ), |
|
686 iGrExp( KImpsClientExpr ), |
|
687 iFuExp( KImpsFundClientExpr ), |
|
688 iMultiTrans( KImpsMultiTrans ), |
|
689 iFourWayLogin( ETrue ), |
|
690 iPDPExpiry( KImpsPDPMaxIdleTime ), |
|
691 iCIRModePollTime( KImpsCIRModePollTime ), |
|
692 iMaxMessageSize( KImpsAcceptedContentLength ) |
|
693 {} |
|
694 |
|
695 // --------------------------------------------------------- |
|
696 // TImpsSrvSettings::ReadStaticSettings |
|
697 // --------------------------------------------------------- |
|
698 // |
|
699 void TImpsSrvSettings::ReadStaticSettings() |
|
700 { |
|
701 TInt aux = 0; |
|
702 // Read Central Repository settings |
|
703 TRAPD( errx, aux = TImpsDataUtils::GetCenRepIntValueL( KCRUIDWVEngineVariation, KWVEngineDropContextWhileIdle ) ); |
|
704 if ( !errx ) |
|
705 { |
|
706 iPDPExpiry = 60 * aux; |
|
707 } |
|
708 TRAP( errx, iFourWayLogin = TImpsDataUtils::GetCenRepIntValueL( |
|
709 KCRUIDWVEngineVariation, KWVEngineLoginMethod ) ); |
|
710 TRAP( errx, iPollTime = TImpsDataUtils::GetCenRepIntValueL( |
|
711 KCRUIDWVEngineVariation, KWVEnginePollTime ) ); |
|
712 TRAP( errx, iAliveTime = TImpsDataUtils::GetCenRepIntValueL( |
|
713 KCRUIDWVEngineVariation, KWVEngineDefaultKeepAliveTime ) ); |
|
714 TRAP( errx, iAccessExp = TImpsDataUtils::GetCenRepIntValueL( |
|
715 KCRUIDWVEngineVariation, KWVEngineACExpiryTime ) ); |
|
716 TRAP( errx, iImExp = TImpsDataUtils::GetCenRepIntValueL( |
|
717 KCRUIDWVEngineVariation, KWVEngineIMExpiryTime ) ); |
|
718 TRAP( errx, iGrExp = TImpsDataUtils::GetCenRepIntValueL( |
|
719 KCRUIDWVEngineVariation, KWVEngineGRExpiryTime ) ); |
|
720 TRAP( errx, iFuExp = TImpsDataUtils::GetCenRepIntValueL( |
|
721 KCRUIDWVEngineVariation, KWVEngineFUExpiryTime ) ); |
|
722 TRAP( errx, iPrExp = TImpsDataUtils::GetCenRepIntValueL( |
|
723 KCRUIDWVEngineVariation, KWVEnginePRExpiryTime ) ); |
|
724 TRAP( errx, iCIRModePollTime = TImpsDataUtils::GetCenRepIntValueL( |
|
725 KCRUIDWVEngineVariation, KWVEngineCIRModePollTime ) ); |
|
726 TRAP( errx, iMultiTrans = TImpsDataUtils::GetCenRepIntValueL( |
|
727 KCRUIDWVEngineVariation, KWVEngineMultiTrans ) ); |
|
728 TRAP( errx, iMaxMessageSize = TImpsDataUtils::GetCenRepIntValueL( |
|
729 KCRUIDWVEngineVariation, KWVEngineMaxMessageSize ) ); |
|
730 |
|
731 // debug logging |
|
732 #ifdef _IMPS_LOGGING_ |
|
733 CImpsClientLogger::Log( _L( "Server: ReadSettings iPDPExpiry=%d iFourWayLogin=%d iPollTime=%d iAliveTime=%d" ), |
|
734 iPDPExpiry, iFourWayLogin, iPollTime, iAliveTime ); |
|
735 CImpsClientLogger::Log( _L( "Server: ReadSettings iAccessExp=%d iImExp=%d iGrExp=%d iFuExp=%d iPrExp=%d iCIRModePollTime=%d iMultiTrans=%d iMaxMsgSize=%d" ), |
|
736 iAccessExp, iImExp, iGrExp, iFuExp, iPrExp, iCIRModePollTime, iMultiTrans, iMaxMessageSize ); |
|
737 #endif |
|
738 } |
|
739 |
|
740 // --------------------------------------------------------- |
|
741 // TImpsSrvSettings::ReadIniFileL |
|
742 // --------------------------------------------------------- |
|
743 // |
|
744 #pragma CTC SKIP |
|
745 #ifdef _DEBUG |
|
746 |
|
747 void TImpsSrvSettings::ReadIniFileL( RFs& aFs ) |
|
748 { |
|
749 // Set few values without reading them from ini file |
|
750 TBool retx = EFalse; |
|
751 TInt errx = KErrNone; |
|
752 |
|
753 CImpsSettingFile* configFile = CImpsSettingFile::NewL( aFs ); |
|
754 CleanupStack::PushL( configFile ); // ***** |
|
755 // Search current drive |
|
756 TFileName path; |
|
757 Dll::FileName( path ); |
|
758 TDriveName drive( TParsePtrC( path ).Drive( ) ); |
|
759 |
|
760 // In emulator we try to find from c drive |
|
761 // in hardware we try to find from current drive and then from RAM. |
|
762 #ifdef __WINS__ |
|
763 TFileName fileN( KImpsIniFile ); |
|
764 #else |
|
765 TFileName fileN( drive ); |
|
766 fileN.Append( KImpsIniFile ); |
|
767 #endif |
|
768 |
|
769 TInt err = 0; |
|
770 |
|
771 // Open temporary config file |
|
772 TRAP( err, configFile->OpenL( fileN ) ); |
|
773 if ( err && drive.CompareF( _L( "c:" ) ) ) |
|
774 { |
|
775 err = KErrNone; |
|
776 fileN = _L( "c:" ); |
|
777 fileN.Append( KImpsIniFile ); |
|
778 TRAP( err, configFile->OpenL( fileN ) ); |
|
779 } |
|
780 if ( err ) |
|
781 { |
|
782 err = KErrNone; |
|
783 #ifdef _IMPS_LOGGING_ |
|
784 CImpsClientLogger::Log( _L( "Server: Config file not found ***" ) ); |
|
785 #endif |
|
786 User::Leave( KImpsErrorConfig ); |
|
787 } |
|
788 else |
|
789 { |
|
790 #ifdef _IMPS_LOGGING_ |
|
791 CImpsClientLogger::Log( _L( "Server: Config file found ***" ) ); |
|
792 #endif |
|
793 } |
|
794 |
|
795 iXmlLog = 0; |
|
796 TUint32 myPoll = 0; |
|
797 TPtrC8 myPtr; |
|
798 TBuf<8> pollBuffer; |
|
799 // read poll time |
|
800 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniPollTime ) ) ); |
|
801 if ( !err ) |
|
802 { |
|
803 pollBuffer.Copy( myPtr ); |
|
804 TLex lex; |
|
805 lex.Assign( pollBuffer ); |
|
806 lex.Val( myPoll, EDecimal ); |
|
807 iPollTime = ( TInt ) myPoll; |
|
808 } |
|
809 |
|
810 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniXmlLog ) ) ); |
|
811 if ( !err ) |
|
812 { |
|
813 if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
814 { |
|
815 iXmlLog += 1; |
|
816 } |
|
817 } |
|
818 |
|
819 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniXmlPollingLog ) ) ); |
|
820 if ( !err ) |
|
821 { |
|
822 if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
823 { |
|
824 iXmlLog += 2; |
|
825 } |
|
826 } |
|
827 |
|
828 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniNoWAPSMSCIR ) ) ); |
|
829 if ( !err ) |
|
830 { |
|
831 if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
832 { |
|
833 iSMSWAPCIR = 0; |
|
834 } |
|
835 } |
|
836 |
|
837 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniNoWAPUDPCIR ) ) ); |
|
838 if ( !err ) |
|
839 { |
|
840 if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
841 { |
|
842 iUDPWAPCIR = 0; |
|
843 } |
|
844 } |
|
845 |
|
846 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniNoTCPSCIR ) ) ); |
|
847 if ( !err ) |
|
848 { |
|
849 if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
850 { |
|
851 iTCPSCIR = 0; |
|
852 } |
|
853 } |
|
854 |
|
855 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniNoUDPSCIR ) ) ); |
|
856 if ( !err ) |
|
857 { |
|
858 if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
859 { |
|
860 iUDPSCIR = 0; |
|
861 } |
|
862 } |
|
863 |
|
864 // read Keep-Alive-Time |
|
865 TUint32 myTime = iAliveTime; // default |
|
866 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniKeepAlive ) ) ); |
|
867 if ( !err ) |
|
868 { |
|
869 pollBuffer.Copy( myPtr ); |
|
870 TLex lex; |
|
871 lex.Assign( pollBuffer ); |
|
872 lex.Val( myTime, EDecimal ); |
|
873 iAliveTime = ( TInt ) myTime; |
|
874 } |
|
875 |
|
876 // read CIR mode PollTime |
|
877 myTime = 0; |
|
878 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniCIRModePollTime ) ) ); |
|
879 if ( !err ) |
|
880 { |
|
881 pollBuffer.Copy( myPtr ); |
|
882 TLex lex; |
|
883 lex.Assign( pollBuffer ); |
|
884 lex.Val( myTime, EDecimal ); |
|
885 iCIRModePollTime = ( TInt ) myTime; |
|
886 } |
|
887 |
|
888 // read Access expiry time |
|
889 myTime = 0; |
|
890 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniACExpiry ) ) ); |
|
891 if ( !err ) |
|
892 { |
|
893 pollBuffer.Copy( myPtr ); |
|
894 TLex lex; |
|
895 lex.Assign( pollBuffer ); |
|
896 lex.Val( myTime, EDecimal ); |
|
897 iAccessExp = ( TInt ) myTime; |
|
898 } |
|
899 |
|
900 // read group expiry |
|
901 myTime = 0; |
|
902 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniGRExpiry ) ) ); |
|
903 if ( !err ) |
|
904 { |
|
905 pollBuffer.Copy( myPtr ); |
|
906 TLex lex; |
|
907 lex.Assign( pollBuffer ); |
|
908 lex.Val( myTime, EDecimal ); |
|
909 iGrExp = ( TInt ) myTime; |
|
910 } |
|
911 |
|
912 // read presence expiry |
|
913 myTime = 0; |
|
914 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniPRExpiry ) ) ); |
|
915 if ( !err ) |
|
916 { |
|
917 pollBuffer.Copy( myPtr ); |
|
918 TLex lex; |
|
919 lex.Assign( pollBuffer ); |
|
920 lex.Val( myTime, EDecimal ); |
|
921 iPrExp = ( TInt ) myTime; |
|
922 } |
|
923 |
|
924 // read fundamental expiry |
|
925 myTime = 0; |
|
926 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniFUExpiry ) ) ); |
|
927 if ( !err ) |
|
928 { |
|
929 pollBuffer.Copy( myPtr ); |
|
930 TLex lex; |
|
931 lex.Assign( pollBuffer ); |
|
932 lex.Val( myTime, EDecimal ); |
|
933 iFuExp = ( TInt ) myTime; |
|
934 } |
|
935 |
|
936 // read IM expiry |
|
937 myTime = 0; |
|
938 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniIMExpiry ) ) ); |
|
939 if ( !err ) |
|
940 { |
|
941 pollBuffer.Copy( myPtr ); |
|
942 TLex lex; |
|
943 lex.Assign( pollBuffer ); |
|
944 lex.Val( myTime, EDecimal ); |
|
945 iImExp = ( TInt ) myTime; |
|
946 } |
|
947 |
|
948 // read PDP expiry |
|
949 myTime = 0; |
|
950 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniPDPExpiry ) ) ); |
|
951 if ( !err ) |
|
952 { |
|
953 pollBuffer.Copy( myPtr ); |
|
954 TLex lex; |
|
955 lex.Assign( pollBuffer ); |
|
956 lex.Val( myTime, EDecimal ); |
|
957 iPDPExpiry = ( TInt ) myTime; |
|
958 } |
|
959 |
|
960 // MultiTrans initial |
|
961 myTime = 0; |
|
962 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniMultiTrans ) ) ); |
|
963 if ( !err ) |
|
964 { |
|
965 pollBuffer.Copy( myPtr ); |
|
966 TLex lex; |
|
967 lex.Assign( pollBuffer ); |
|
968 lex.Val( myTime, EDecimal ); |
|
969 iMultiTrans = ( TInt ) myTime; |
|
970 } |
|
971 |
|
972 // 4-way login |
|
973 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIni4WayLogin ) ) ); |
|
974 if ( !err ) |
|
975 { |
|
976 if ( !myPtr.CompareF( _L8( "False" ) ) ) |
|
977 { |
|
978 iFourWayLogin = EFalse; |
|
979 } |
|
980 else if ( !myPtr.CompareF( _L8( "True" ) ) ) |
|
981 { |
|
982 iFourWayLogin = ETrue; |
|
983 } |
|
984 } |
|
985 |
|
986 // Maximum IM message size |
|
987 myTime = 0; |
|
988 TRAP( err, myPtr.Set( configFile->KeyValueL( KImpsIniMaxMessageSize ) ) ); |
|
989 if ( !err ) |
|
990 { |
|
991 pollBuffer.Copy( myPtr ); |
|
992 TLex lex; |
|
993 lex.Assign( pollBuffer ); |
|
994 lex.Val( myTime, EDecimal ); |
|
995 iMaxMessageSize = ( TInt ) myTime; |
|
996 } |
|
997 |
|
998 CleanupStack::PopAndDestroy( 1 ); // configFile |
|
999 |
|
1000 // debug logging |
|
1001 #ifdef _IMPS_LOGGING_ |
|
1002 CImpsClientLogger::Log( _L( "Server: ReadFile iPDPExpiry=%d iFourWayLogin=%d iPollTime=%d iAliveTime=%d" ), |
|
1003 iPDPExpiry, iFourWayLogin, iPollTime, iAliveTime ); |
|
1004 CImpsClientLogger::Log( _L( "Server: ReadFile iAccessExp=%d iImExp=%d iGrExp=%d iFuExp=%d iPrExp=%d iCIRModePollTime=%d iMultiTrans=%d iMaxMsgSize=%d" ), |
|
1005 iAccessExp, iImExp, iGrExp, iFuExp, iPrExp, iCIRModePollTime, iMultiTrans, iMaxMessageSize ); |
|
1006 CImpsClientLogger::Log( _L( "Server: ReadFile \ |
|
1007 iXmlLog=%d, iSMSWAPCIR=%d, iUDPWAPCIR=%d,iTCPSCIR=%d,iUDPSCIR=%d" ), |
|
1008 iXmlLog, iSMSWAPCIR, iUDPWAPCIR, iTCPSCIR, iUDPSCIR ); |
|
1009 #endif |
|
1010 } |
|
1011 |
|
1012 #endif // _DEBUG |
|
1013 #pragma CTC ENDSKIP |
|
1014 |
|
1015 // --------------------------------------------------------- |
|
1016 // TImpsSrvSettings::SetCirBindingsL |
|
1017 // --------------------------------------------------------- |
|
1018 // |
|
1019 void TImpsSrvSettings::SetCirBindingsL( |
|
1020 MImpsDataAccessor* myAccess, MImpsKey* myKey ) |
|
1021 { |
|
1022 TBool everyElement( EFalse ); |
|
1023 TInt myInt = 0; |
|
1024 |
|
1025 // Check supported CIRMethods |
|
1026 for ( TInt i = 0; !everyElement; i++ ) |
|
1027 { |
|
1028 myKey->AddL( CREATEKEY( EImpsKeySupportedCIRMethod, i ) ); |
|
1029 if ( myAccess->RestoreIntegerL( myKey, myInt ) ) |
|
1030 { |
|
1031 if ( myInt == EImpsWAPUDP ) |
|
1032 { |
|
1033 iUDPWAPCIR++; |
|
1034 } |
|
1035 else if ( myInt == EImpsWAPSMS ) |
|
1036 { |
|
1037 iSMSWAPCIR++; |
|
1038 } |
|
1039 else if ( myInt == EImpsSUDP ) |
|
1040 { |
|
1041 iUDPSCIR++; |
|
1042 } |
|
1043 else if ( myInt == EImpsSTCP ) |
|
1044 { |
|
1045 iTCPSCIR++; |
|
1046 } |
|
1047 } |
|
1048 else |
|
1049 { |
|
1050 // All methods handled |
|
1051 everyElement = ETrue; |
|
1052 } |
|
1053 myKey->PopL(); |
|
1054 } |
|
1055 } |
|
1056 |
|
1057 |
|
1058 // --------------------------------------------------------- |
|
1059 // TImpsSessIdent::TImpsSessIdent |
|
1060 // --------------------------------------------------------- |
|
1061 // |
|
1062 TImpsSessIdent::TImpsSessIdent( |
|
1063 const TDesC& aSID, const TDesC& aSAP, const TDesC& aUserId ) |
|
1064 : iSID( aSID ), iSAP( aSAP ), iUserId( aUserId ) |
|
1065 {} |
|
1066 |
|
1067 |
|
1068 |
|
1069 // End of File |