|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Example CTestStep derived implementation |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file commsdatSnapTests.cpp |
|
20 */ |
|
21 #include "commsdatMixedSnapValidationTests.h" |
|
22 #include "Te_commsdatSuiteDefs.h" |
|
23 #include <e32test.h> |
|
24 #include <commsdattypeinfov1_1_internal.h> |
|
25 |
|
26 namespace |
|
27 { |
|
28 TInt GetAPNumberL(const TInt aTierValaue, CommsDat::CMDBSession* aCDSession_vLatest) |
|
29 { |
|
30 CMDBRecordSet<CCDAccessPointRecord>* ipprotoAPs = new(ELeave)CMDBRecordSet<CCDAccessPointRecord>(KCDTIdAccessPointRecord); |
|
31 CleanupStack::PushL(ipprotoAPs); |
|
32 |
|
33 CCDAccessPointRecord* primedIPProtoAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
34 CleanupStack::PushL(primedIPProtoAP); |
|
35 |
|
36 primedIPProtoAP->iTier = aTierValaue; |
|
37 |
|
38 ipprotoAPs->iRecords.AppendL(primedIPProtoAP); |
|
39 //the ownership of the primed record is now at the recordset |
|
40 CleanupStack::Pop(primedIPProtoAP); |
|
41 |
|
42 ipprotoAPs->FindL(*aCDSession_vLatest); |
|
43 |
|
44 TInt apNum = ipprotoAPs->iRecords.Count(); |
|
45 |
|
46 CleanupStack::PopAndDestroy(ipprotoAPs); |
|
47 |
|
48 return apNum; |
|
49 } |
|
50 |
|
51 } |
|
52 |
|
53 //---------------------------------------------------------------------------------------------------------------- |
|
54 CCommsdat400Step::~CCommsdat400Step() |
|
55 /** |
|
56 * Destructor |
|
57 */ |
|
58 { |
|
59 delete iCDSession_v11; |
|
60 delete iCDSession_vLatest; |
|
61 } |
|
62 |
|
63 CCommsdat400Step::CCommsdat400Step() |
|
64 /** |
|
65 * Constructor |
|
66 */ |
|
67 { |
|
68 SetTestStepName(KCommsdat400Step); |
|
69 } |
|
70 |
|
71 TVerdict CCommsdat400Step::doTestStepPreambleL() |
|
72 /** |
|
73 * @return - TVerdict code |
|
74 * Override of base class pure virtual |
|
75 */ |
|
76 { |
|
77 SetTestStepResult(EFail); |
|
78 |
|
79 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
80 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
81 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
82 #else |
|
83 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
84 #endif |
|
85 |
|
86 SetTestStepResult(EPass); |
|
87 return TestStepResult(); |
|
88 } |
|
89 |
|
90 TVerdict CCommsdat400Step::doTestStepL() |
|
91 /** |
|
92 * @return - TVerdict code |
|
93 * This test step inserts a ConnPref record on top of the already existing |
|
94 * SNAP path. The inserted ConnPref record has: |
|
95 * - rank 1 |
|
96 * - no prompt |
|
97 * - it points to the same IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
98 * |
|
99 * StoreL is called on record container. |
|
100 */ |
|
101 { |
|
102 SetTestStepResult(EFail); |
|
103 |
|
104 const TInt KIPProtoTierLink = 0x11800200; |
|
105 |
|
106 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
107 CleanupStack::PushL(cpRecord); |
|
108 |
|
109 cpRecord->SetRecordId(1); |
|
110 cpRecord->iDefaultIAP = 2; |
|
111 cpRecord->iRanking = 1; |
|
112 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
113 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
114 cpRecord->iDialogPref = ECommDbDialogPrefDoNotPrompt; |
|
115 |
|
116 cpRecord->StoreL(*iCDSession_v11); |
|
117 |
|
118 CleanupStack::PopAndDestroy(cpRecord); |
|
119 |
|
120 if (4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
121 { |
|
122 //no new IPProto AP should be generated (1 default IPProto AP, and the 3 generated) |
|
123 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
124 CleanupStack::PushL(appPrioritySelPolRec); |
|
125 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
126 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
127 |
|
128 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
129 CleanupStack::PushL(cpRecord1); |
|
130 cpRecord1->SetRecordId(1); |
|
131 cpRecord1->LoadL(*iCDSession_vLatest); |
|
132 |
|
133 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
134 CleanupStack::PushL(ipprotoApRec); |
|
135 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
136 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
137 |
|
138 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
139 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
140 |
|
141 if (cpRecIAP == ipprotoAPCustSelPol && |
|
142 ipprotoAPCustSelPol == ipprotoApRec->iCprConfig && |
|
143 1 == appPrioritySelPolRec->iApCount) |
|
144 { |
|
145 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
146 //the cpr config field of the generated IPProtroAP points to the IAP as well then it's ok |
|
147 SetTestStepResult(EPass); |
|
148 } |
|
149 |
|
150 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
151 CleanupStack::PopAndDestroy(cpRecord1); |
|
152 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
153 } |
|
154 |
|
155 return TestStepResult(); |
|
156 } |
|
157 |
|
158 //---------------------------------------------------------------------------------------------------------------- |
|
159 CCommsdat401Step::~CCommsdat401Step() |
|
160 /** |
|
161 * Destructor |
|
162 */ |
|
163 { |
|
164 delete iCDSession_v11; |
|
165 delete iCDSession_vLatest; |
|
166 } |
|
167 |
|
168 CCommsdat401Step::CCommsdat401Step() |
|
169 /** |
|
170 * Constructor |
|
171 */ |
|
172 { |
|
173 SetTestStepName(KCommsdat401Step); |
|
174 } |
|
175 |
|
176 TVerdict CCommsdat401Step::doTestStepPreambleL() |
|
177 /** |
|
178 * @return - TVerdict code |
|
179 * Override of base class pure virtual |
|
180 */ |
|
181 { |
|
182 SetTestStepResult(EFail); |
|
183 |
|
184 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
185 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
186 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
187 #else |
|
188 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
189 #endif |
|
190 |
|
191 SetTestStepResult(EPass); |
|
192 return TestStepResult(); |
|
193 } |
|
194 |
|
195 TVerdict CCommsdat401Step::doTestStepL() |
|
196 /** |
|
197 * @return - TVerdict code |
|
198 * This test step inserts a ConnPref record on top of the already existing |
|
199 * SNAP path. The inserted ConnPref record has: |
|
200 * - rank 1 |
|
201 * - prompt |
|
202 * - it points to the same IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
203 * |
|
204 * StoreL is called on record container. |
|
205 */ |
|
206 { |
|
207 SetTestStepResult(EFail); |
|
208 |
|
209 const TInt KIPProtoTierLink = 0x11800200; |
|
210 |
|
211 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
212 CleanupStack::PushL(cpRecord); |
|
213 |
|
214 cpRecord->SetRecordId(1); |
|
215 cpRecord->iDefaultIAP = 2; |
|
216 cpRecord->iRanking = 1; |
|
217 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
218 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
219 cpRecord->iDialogPref = ECommDbDialogPrefPrompt; //this is the change |
|
220 |
|
221 cpRecord->StoreL(*iCDSession_v11); |
|
222 |
|
223 CleanupStack::PopAndDestroy(cpRecord); |
|
224 |
|
225 if (5 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
226 { |
|
227 //one new IPProto AP should be generated [a promting AP] (1 default IPProto AP, and the 4 generated) |
|
228 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
229 CleanupStack::PushL(appPrioritySelPolRec); |
|
230 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
231 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
232 |
|
233 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
234 CleanupStack::PushL(cpRecord1); |
|
235 cpRecord1->SetRecordId(1); |
|
236 cpRecord1->LoadL(*iCDSession_vLatest); |
|
237 |
|
238 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
239 CleanupStack::PushL(ipprotoApRec); |
|
240 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
241 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
242 |
|
243 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
244 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
245 |
|
246 if (cpRecIAP == ipprotoAPCustSelPol && |
|
247 cpRecord1->ElementId() == ipprotoApRec->iCprConfig && |
|
248 1 == appPrioritySelPolRec->iApCount) |
|
249 { |
|
250 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
251 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
252 //connpref rec (it's a prompting AP) then it's ok |
|
253 SetTestStepResult(EPass); |
|
254 } |
|
255 |
|
256 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
257 CleanupStack::PopAndDestroy(cpRecord1); |
|
258 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
259 } |
|
260 |
|
261 return TestStepResult(); |
|
262 } |
|
263 |
|
264 //---------------------------------------------------------------------------------------------------------------- |
|
265 CCommsdat402Step::~CCommsdat402Step() |
|
266 /** |
|
267 * Destructor |
|
268 */ |
|
269 { |
|
270 delete iCDSession_v11; |
|
271 delete iCDSession_vLatest; |
|
272 } |
|
273 |
|
274 CCommsdat402Step::CCommsdat402Step() |
|
275 /** |
|
276 * Constructor |
|
277 */ |
|
278 { |
|
279 SetTestStepName(KCommsdat402Step); |
|
280 } |
|
281 |
|
282 TVerdict CCommsdat402Step::doTestStepPreambleL() |
|
283 /** |
|
284 * @return - TVerdict code |
|
285 * Override of base class pure virtual |
|
286 */ |
|
287 { |
|
288 SetTestStepResult(EFail); |
|
289 |
|
290 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
291 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
292 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
293 #else |
|
294 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
295 #endif |
|
296 |
|
297 SetTestStepResult(EPass); |
|
298 return TestStepResult(); |
|
299 } |
|
300 |
|
301 TVerdict CCommsdat402Step::doTestStepL() |
|
302 /** |
|
303 * @return - TVerdict code |
|
304 * This test step inserts a ConnPref record on top of the already existing |
|
305 * SNAP path. The inserted ConnPref record has: |
|
306 * - rank 1 |
|
307 * - no prompt |
|
308 * - it points to some other IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
309 * |
|
310 * StoreL is called on record container. |
|
311 */ |
|
312 { |
|
313 SetTestStepResult(EFail); |
|
314 |
|
315 const TInt KIPProtoTierLink = 0x11800200; |
|
316 |
|
317 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
318 CleanupStack::PushL(cpRecord); |
|
319 |
|
320 cpRecord->SetRecordId(1); |
|
321 cpRecord->iDefaultIAP = 1; //this is the change |
|
322 cpRecord->iRanking = 1; |
|
323 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
324 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
325 cpRecord->iDialogPref = ECommDbDialogPrefDoNotPrompt; |
|
326 |
|
327 cpRecord->StoreL(*iCDSession_v11); |
|
328 |
|
329 CleanupStack::PopAndDestroy(cpRecord); |
|
330 |
|
331 if (4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
332 { |
|
333 //no new IPProto AP should be generated (1 default IPProto AP, and the 3 generated) |
|
334 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
335 CleanupStack::PushL(appPrioritySelPolRec); |
|
336 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
337 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
338 |
|
339 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
340 CleanupStack::PushL(cpRecord1); |
|
341 cpRecord1->SetRecordId(1); |
|
342 cpRecord1->LoadL(*iCDSession_vLatest); |
|
343 |
|
344 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
345 CleanupStack::PushL(ipprotoApRec); |
|
346 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
347 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
348 |
|
349 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
350 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
351 |
|
352 if (cpRecIAP == ipprotoAPCustSelPol && |
|
353 ipprotoAPCustSelPol == ipprotoApRec->iCprConfig && |
|
354 1 == appPrioritySelPolRec->iApCount) |
|
355 { |
|
356 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
357 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
358 //connpref rec (it's a prompting AP) then it's ok |
|
359 SetTestStepResult(EPass); |
|
360 } |
|
361 |
|
362 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
363 CleanupStack::PopAndDestroy(cpRecord1); |
|
364 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
365 } |
|
366 |
|
367 return TestStepResult(); |
|
368 } |
|
369 |
|
370 //---------------------------------------------------------------------------------------------------------------- |
|
371 CCommsdat403Step::~CCommsdat403Step() |
|
372 /** |
|
373 * Destructor |
|
374 */ |
|
375 { |
|
376 delete iCDSession_v11; |
|
377 delete iCDSession_vLatest; |
|
378 } |
|
379 |
|
380 CCommsdat403Step::CCommsdat403Step() |
|
381 /** |
|
382 * Constructor |
|
383 */ |
|
384 { |
|
385 SetTestStepName(KCommsdat403Step); |
|
386 } |
|
387 |
|
388 TVerdict CCommsdat403Step::doTestStepPreambleL() |
|
389 /** |
|
390 * @return - TVerdict code |
|
391 * Override of base class pure virtual |
|
392 */ |
|
393 { |
|
394 SetTestStepResult(EFail); |
|
395 |
|
396 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
397 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
398 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
399 #else |
|
400 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
401 #endif |
|
402 |
|
403 SetTestStepResult(EPass); |
|
404 return TestStepResult(); |
|
405 } |
|
406 |
|
407 TVerdict CCommsdat403Step::doTestStepL() |
|
408 /** |
|
409 * @return - TVerdict code |
|
410 * This test step inserts a ConnPref record on top of the already existing |
|
411 * SNAP path. The inserted ConnPref record has: |
|
412 * - rank 1 |
|
413 * - prompt |
|
414 * - it points to some other IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
415 * |
|
416 * StoreL is called on record container. |
|
417 */ |
|
418 { |
|
419 SetTestStepResult(EFail); |
|
420 |
|
421 const TInt KIPProtoTierLink = 0x11800200; |
|
422 |
|
423 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
424 CleanupStack::PushL(cpRecord); |
|
425 |
|
426 cpRecord->SetRecordId(1); |
|
427 cpRecord->iDefaultIAP = 1; //this is the change |
|
428 cpRecord->iRanking = 1; |
|
429 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
430 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
431 cpRecord->iDialogPref = ECommDbDialogPrefPrompt; //this is the change |
|
432 |
|
433 cpRecord->StoreL(*iCDSession_v11); |
|
434 |
|
435 CleanupStack::PopAndDestroy(cpRecord); |
|
436 |
|
437 if (5 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
438 { |
|
439 //one new IPProto AP should be generated [promting AP] (1 default IPProto AP, and the 4 generated) |
|
440 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
441 CleanupStack::PushL(appPrioritySelPolRec); |
|
442 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
443 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
444 |
|
445 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
446 CleanupStack::PushL(cpRecord1); |
|
447 cpRecord1->SetRecordId(1); |
|
448 cpRecord1->LoadL(*iCDSession_vLatest); |
|
449 |
|
450 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
451 CleanupStack::PushL(ipprotoApRec); |
|
452 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
453 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
454 |
|
455 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
456 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
457 |
|
458 if (cpRecIAP == ipprotoAPCustSelPol && |
|
459 cpRecord1->ElementId() == ipprotoApRec->iCprConfig && |
|
460 1 == appPrioritySelPolRec->iApCount) |
|
461 { |
|
462 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
463 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
464 //connpref rec (it's a prompting AP) then it's ok |
|
465 SetTestStepResult(EPass); |
|
466 } |
|
467 |
|
468 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
469 CleanupStack::PopAndDestroy(cpRecord1); |
|
470 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
471 } |
|
472 |
|
473 return TestStepResult(); |
|
474 } |
|
475 |
|
476 //---------------------------------------------------------------------------------------------------------------- |
|
477 CCommsdat404Step::~CCommsdat404Step() |
|
478 /** |
|
479 * Destructor |
|
480 */ |
|
481 { |
|
482 delete iCDSession_v11; |
|
483 delete iCDSession_vLatest; |
|
484 } |
|
485 |
|
486 CCommsdat404Step::CCommsdat404Step() |
|
487 /** |
|
488 * Constructor |
|
489 */ |
|
490 { |
|
491 SetTestStepName(KCommsdat404Step); |
|
492 } |
|
493 |
|
494 TVerdict CCommsdat404Step::doTestStepPreambleL() |
|
495 /** |
|
496 * @return - TVerdict code |
|
497 * Override of base class pure virtual |
|
498 */ |
|
499 { |
|
500 SetTestStepResult(EFail); |
|
501 |
|
502 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
503 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
504 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
505 #else |
|
506 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
507 #endif |
|
508 |
|
509 SetTestStepResult(EPass); |
|
510 return TestStepResult(); |
|
511 } |
|
512 |
|
513 TVerdict CCommsdat404Step::doTestStepL() |
|
514 /** |
|
515 * @return - TVerdict code |
|
516 * This test step inserts a ConnPref record on top of the already existing |
|
517 * SNAP path. The inserted ConnPref record has: |
|
518 * - rank 2 |
|
519 * - no prompt |
|
520 * - it points to the same IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
521 * |
|
522 * StoreL is called on record container. |
|
523 */ |
|
524 { |
|
525 SetTestStepResult(EFail); |
|
526 |
|
527 const TInt KIPProtoTierLink = 0x11800200; |
|
528 |
|
529 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
530 CleanupStack::PushL(cpRecord); |
|
531 |
|
532 cpRecord->SetRecordId(1); |
|
533 cpRecord->iDefaultIAP = 2; |
|
534 cpRecord->iRanking = 2; |
|
535 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
536 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
537 cpRecord->iDialogPref = ECommDbDialogPrefDoNotPrompt; |
|
538 |
|
539 cpRecord->StoreL(*iCDSession_v11); |
|
540 |
|
541 CleanupStack::PopAndDestroy(cpRecord); |
|
542 |
|
543 if (4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
544 { |
|
545 //no new IPProto AP should be generated (1 default IPProto AP, and the 3 generated) |
|
546 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
547 CleanupStack::PushL(appPrioritySelPolRec); |
|
548 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
549 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
550 |
|
551 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
552 CleanupStack::PushL(cpRecord1); |
|
553 cpRecord1->SetRecordId(1); |
|
554 cpRecord1->LoadL(*iCDSession_vLatest); |
|
555 |
|
556 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
557 CleanupStack::PushL(ipprotoApRec); |
|
558 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
559 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
560 |
|
561 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
562 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
563 |
|
564 if (cpRecIAP == ipprotoAPCustSelPol && |
|
565 ipprotoAPCustSelPol == ipprotoApRec->iCprConfig && |
|
566 2 == appPrioritySelPolRec->iApCount) |
|
567 { |
|
568 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
569 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
570 //connpref rec (it's a prompting AP) then it's ok |
|
571 SetTestStepResult(EPass); |
|
572 } |
|
573 |
|
574 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
575 CleanupStack::PopAndDestroy(cpRecord1); |
|
576 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
577 } |
|
578 |
|
579 return TestStepResult(); |
|
580 } |
|
581 |
|
582 //---------------------------------------------------------------------------------------------------------------- |
|
583 CCommsdat405Step::~CCommsdat405Step() |
|
584 /** |
|
585 * Destructor |
|
586 */ |
|
587 { |
|
588 delete iCDSession_v11; |
|
589 delete iCDSession_vLatest; |
|
590 } |
|
591 |
|
592 CCommsdat405Step::CCommsdat405Step() |
|
593 /** |
|
594 * Constructor |
|
595 */ |
|
596 { |
|
597 SetTestStepName(KCommsdat405Step); |
|
598 } |
|
599 |
|
600 TVerdict CCommsdat405Step::doTestStepPreambleL() |
|
601 /** |
|
602 * @return - TVerdict code |
|
603 * Override of base class pure virtual |
|
604 */ |
|
605 { |
|
606 SetTestStepResult(EFail); |
|
607 |
|
608 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
609 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
610 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
611 #else |
|
612 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
613 #endif |
|
614 |
|
615 SetTestStepResult(EPass); |
|
616 return TestStepResult(); |
|
617 } |
|
618 |
|
619 TVerdict CCommsdat405Step::doTestStepL() |
|
620 /** |
|
621 * @return - TVerdict code |
|
622 * This test step inserts a ConnPref record on top of the already existing |
|
623 * SNAP path. The inserted ConnPref record has: |
|
624 * - rank 2 |
|
625 * - prompt |
|
626 * - it points to the same IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
627 * |
|
628 * StoreL is called on record container. |
|
629 */ |
|
630 { |
|
631 SetTestStepResult(EFail); |
|
632 |
|
633 const TInt KIPProtoTierLink = 0x11800200; |
|
634 |
|
635 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
636 CleanupStack::PushL(cpRecord); |
|
637 |
|
638 cpRecord->SetRecordId(1); |
|
639 cpRecord->iDefaultIAP = 2; |
|
640 cpRecord->iRanking = 2; |
|
641 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
642 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
643 cpRecord->iDialogPref = ECommDbDialogPrefPrompt; |
|
644 |
|
645 cpRecord->StoreL(*iCDSession_v11); |
|
646 |
|
647 CleanupStack::PopAndDestroy(cpRecord); |
|
648 |
|
649 if (5 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
650 { |
|
651 //one new IPProto AP should be generated [prompting AP] (1 default IPProto AP, and the 4 generated) |
|
652 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
653 CleanupStack::PushL(appPrioritySelPolRec); |
|
654 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
655 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
656 |
|
657 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
658 CleanupStack::PushL(cpRecord1); |
|
659 cpRecord1->SetRecordId(1); |
|
660 cpRecord1->LoadL(*iCDSession_vLatest); |
|
661 |
|
662 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
663 CleanupStack::PushL(ipprotoApRec); |
|
664 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp2); |
|
665 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
666 |
|
667 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
668 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
669 |
|
670 if (cpRecIAP == ipprotoAPCustSelPol && |
|
671 cpRecord1->ElementId() == ipprotoApRec->iCprConfig && |
|
672 2 == appPrioritySelPolRec->iApCount) |
|
673 { |
|
674 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
675 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
676 //connpref rec (it's a prompting AP) then it's ok |
|
677 SetTestStepResult(EPass); |
|
678 } |
|
679 |
|
680 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
681 CleanupStack::PopAndDestroy(cpRecord1); |
|
682 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
683 } |
|
684 |
|
685 return TestStepResult(); |
|
686 } |
|
687 |
|
688 //---------------------------------------------------------------------------------------------------------------- |
|
689 CCommsdat406Step::~CCommsdat406Step() |
|
690 /** |
|
691 * Destructor |
|
692 */ |
|
693 { |
|
694 delete iCDSession_v11; |
|
695 delete iCDSession_vLatest; |
|
696 } |
|
697 |
|
698 CCommsdat406Step::CCommsdat406Step() |
|
699 /** |
|
700 * Constructor |
|
701 */ |
|
702 { |
|
703 SetTestStepName(KCommsdat406Step); |
|
704 } |
|
705 |
|
706 TVerdict CCommsdat406Step::doTestStepPreambleL() |
|
707 /** |
|
708 * @return - TVerdict code |
|
709 * Override of base class pure virtual |
|
710 */ |
|
711 { |
|
712 SetTestStepResult(EFail); |
|
713 |
|
714 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
715 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
716 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
717 #else |
|
718 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
719 #endif |
|
720 |
|
721 SetTestStepResult(EPass); |
|
722 return TestStepResult(); |
|
723 } |
|
724 |
|
725 TVerdict CCommsdat406Step::doTestStepL() |
|
726 /** |
|
727 * @return - TVerdict code |
|
728 * This test step inserts a ConnPref record on top of the already existing |
|
729 * SNAP path. The inserted ConnPref record has: |
|
730 * - rank 2 |
|
731 * - no prompt |
|
732 * - it points to some other IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
733 * |
|
734 * StoreL is called on record container. |
|
735 */ |
|
736 { |
|
737 SetTestStepResult(EFail); |
|
738 |
|
739 const TInt KIPProtoTierLink = 0x11800200; |
|
740 |
|
741 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
742 CleanupStack::PushL(cpRecord); |
|
743 |
|
744 cpRecord->SetRecordId(1); |
|
745 cpRecord->iDefaultIAP = 1; |
|
746 cpRecord->iRanking = 2; |
|
747 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
748 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
749 cpRecord->iDialogPref = ECommDbDialogPrefDoNotPrompt; |
|
750 |
|
751 cpRecord->StoreL(*iCDSession_v11); |
|
752 |
|
753 CleanupStack::PopAndDestroy(cpRecord); |
|
754 |
|
755 if (4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
756 { |
|
757 //no new IPProto AP should be generated (1 default IPProto AP, and the 3 generated) |
|
758 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
759 CleanupStack::PushL(appPrioritySelPolRec); |
|
760 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
761 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
762 |
|
763 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
764 CleanupStack::PushL(cpRecord1); |
|
765 cpRecord1->SetRecordId(1); |
|
766 cpRecord1->LoadL(*iCDSession_vLatest); |
|
767 |
|
768 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
769 CleanupStack::PushL(ipprotoApRec); |
|
770 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp2); |
|
771 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
772 |
|
773 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
774 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
775 |
|
776 if (cpRecIAP == ipprotoAPCustSelPol && |
|
777 ipprotoAPCustSelPol == ipprotoApRec->iCprConfig && |
|
778 2 == appPrioritySelPolRec->iApCount) |
|
779 { |
|
780 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
781 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
782 //connpref rec (it's a prompting AP) then it's ok |
|
783 SetTestStepResult(EPass); |
|
784 } |
|
785 |
|
786 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
787 CleanupStack::PopAndDestroy(cpRecord1); |
|
788 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
789 } |
|
790 |
|
791 return TestStepResult(); |
|
792 } |
|
793 |
|
794 //---------------------------------------------------------------------------------------------------------------- |
|
795 CCommsdat407Step::~CCommsdat407Step() |
|
796 /** |
|
797 * Destructor |
|
798 */ |
|
799 { |
|
800 delete iCDSession_v11; |
|
801 delete iCDSession_vLatest; |
|
802 } |
|
803 |
|
804 CCommsdat407Step::CCommsdat407Step() |
|
805 /** |
|
806 * Constructor |
|
807 */ |
|
808 { |
|
809 SetTestStepName(KCommsdat407Step); |
|
810 } |
|
811 |
|
812 TVerdict CCommsdat407Step::doTestStepPreambleL() |
|
813 /** |
|
814 * @return - TVerdict code |
|
815 * Override of base class pure virtual |
|
816 */ |
|
817 { |
|
818 SetTestStepResult(EFail); |
|
819 |
|
820 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
821 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
822 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
823 #else |
|
824 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
825 #endif |
|
826 |
|
827 SetTestStepResult(EPass); |
|
828 return TestStepResult(); |
|
829 } |
|
830 |
|
831 TVerdict CCommsdat407Step::doTestStepL() |
|
832 /** |
|
833 * @return - TVerdict code |
|
834 * This test step inserts a ConnPref record on top of the already existing |
|
835 * SNAP path. The inserted ConnPref record has: |
|
836 * - rank 2 |
|
837 * - prompt |
|
838 * - it points to some other IAP as the currently default IAPPrioritySelPolRec (IAP1) |
|
839 * |
|
840 * StoreL is called on record container. |
|
841 */ |
|
842 { |
|
843 SetTestStepResult(EFail); |
|
844 |
|
845 const TInt KIPProtoTierLink = 0x11800200; |
|
846 |
|
847 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
848 CleanupStack::PushL(cpRecord); |
|
849 |
|
850 cpRecord->SetRecordId(1); |
|
851 cpRecord->iDefaultIAP = 1; |
|
852 cpRecord->iRanking = 2; |
|
853 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
854 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
855 cpRecord->iDialogPref = ECommDbDialogPrefPrompt; |
|
856 |
|
857 cpRecord->StoreL(*iCDSession_v11); |
|
858 |
|
859 CleanupStack::PopAndDestroy(cpRecord); |
|
860 |
|
861 if (5 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
862 { |
|
863 //one new IPProto AP should be generated [prompting AP] (1 default IPProto AP, and the 4 generated) |
|
864 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
865 CleanupStack::PushL(appPrioritySelPolRec); |
|
866 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
867 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
868 |
|
869 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
870 CleanupStack::PushL(cpRecord1); |
|
871 cpRecord1->SetRecordId(1); |
|
872 cpRecord1->LoadL(*iCDSession_vLatest); |
|
873 |
|
874 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
875 CleanupStack::PushL(ipprotoApRec); |
|
876 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp2); |
|
877 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
878 |
|
879 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
880 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
881 |
|
882 if (cpRecIAP == ipprotoAPCustSelPol && |
|
883 cpRecord1->ElementId() == ipprotoApRec->iCprConfig && |
|
884 2 == appPrioritySelPolRec->iApCount) |
|
885 { |
|
886 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
887 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
888 //connpref rec (it's a prompting AP) then it's ok |
|
889 SetTestStepResult(EPass); |
|
890 } |
|
891 |
|
892 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
893 CleanupStack::PopAndDestroy(cpRecord1); |
|
894 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
895 } |
|
896 |
|
897 return TestStepResult(); |
|
898 } |
|
899 |
|
900 //---------------------------------------------------------------------------------------------------------------- |
|
901 CCommsdat408Step::~CCommsdat408Step() |
|
902 /** |
|
903 * Destructor |
|
904 */ |
|
905 { |
|
906 delete iCDSession_v11; |
|
907 delete iCDSession_vLatest; |
|
908 } |
|
909 |
|
910 CCommsdat408Step::CCommsdat408Step() |
|
911 /** |
|
912 * Constructor |
|
913 */ |
|
914 { |
|
915 SetTestStepName(KCommsdat408Step); |
|
916 } |
|
917 |
|
918 TVerdict CCommsdat408Step::doTestStepPreambleL() |
|
919 /** |
|
920 * @return - TVerdict code |
|
921 * Override of base class pure virtual |
|
922 */ |
|
923 { |
|
924 SetTestStepResult(EFail); |
|
925 |
|
926 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
927 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
928 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
929 #else |
|
930 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
931 #endif |
|
932 |
|
933 SetTestStepResult(EPass); |
|
934 return TestStepResult(); |
|
935 } |
|
936 |
|
937 TVerdict CCommsdat408Step::doTestStepL() |
|
938 /** |
|
939 * @return - TVerdict code |
|
940 * This test step inserts a ConnPref record on top of the already existing |
|
941 * SNAP path. The inserted ConnPref record has: |
|
942 * - rank 1 |
|
943 * - prompt |
|
944 * - no default IAP |
|
945 * |
|
946 * StoreL is called on record container. |
|
947 */ |
|
948 { |
|
949 SetTestStepResult(EFail); |
|
950 |
|
951 const TInt KIPProtoTierLink = 0x11800200; |
|
952 |
|
953 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
954 CleanupStack::PushL(cpRecord); |
|
955 |
|
956 cpRecord->SetRecordId(1); |
|
957 cpRecord->iDefaultIAP = 0; |
|
958 cpRecord->iRanking = 1; |
|
959 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
960 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
961 cpRecord->iDialogPref = ECommDbDialogPrefPrompt; |
|
962 |
|
963 cpRecord->StoreL(*iCDSession_v11); |
|
964 |
|
965 CleanupStack::PopAndDestroy(cpRecord); |
|
966 |
|
967 if (5 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
968 { |
|
969 //one new IPProto AP should be generated [prompting AP] (1 default IPProto AP, and the 4 generated) |
|
970 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
971 CleanupStack::PushL(appPrioritySelPolRec); |
|
972 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
973 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
974 |
|
975 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
976 CleanupStack::PushL(cpRecord1); |
|
977 cpRecord1->SetRecordId(1); |
|
978 cpRecord1->LoadL(*iCDSession_vLatest); |
|
979 |
|
980 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
981 CleanupStack::PushL(ipprotoApRec); |
|
982 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
983 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
984 |
|
985 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
986 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
987 |
|
988 if (cpRecIAP != ipprotoAPCustSelPol && |
|
989 0 == cpRecIAP && |
|
990 cpRecord1->ElementId() == ipprotoApRec->iCprConfig && |
|
991 1 == appPrioritySelPolRec->iApCount) |
|
992 { |
|
993 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
994 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
995 //connpref rec (it's a prompting AP) then it's ok |
|
996 SetTestStepResult(EPass); |
|
997 } |
|
998 |
|
999 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
1000 CleanupStack::PopAndDestroy(cpRecord1); |
|
1001 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
1002 } |
|
1003 |
|
1004 return TestStepResult(); |
|
1005 } |
|
1006 |
|
1007 //---------------------------------------------------------------------------------------------------------------- |
|
1008 CCommsdat409Step::~CCommsdat409Step() |
|
1009 /** |
|
1010 * Destructor |
|
1011 */ |
|
1012 { |
|
1013 delete iCDSession_v11; |
|
1014 delete iCDSession_vLatest; |
|
1015 } |
|
1016 |
|
1017 CCommsdat409Step::CCommsdat409Step() |
|
1018 /** |
|
1019 * Constructor |
|
1020 */ |
|
1021 { |
|
1022 SetTestStepName(KCommsdat409Step); |
|
1023 } |
|
1024 |
|
1025 TVerdict CCommsdat409Step::doTestStepPreambleL() |
|
1026 /** |
|
1027 * @return - TVerdict code |
|
1028 * Override of base class pure virtual |
|
1029 */ |
|
1030 { |
|
1031 SetTestStepResult(EFail); |
|
1032 |
|
1033 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1034 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1035 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1036 #else |
|
1037 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1038 #endif |
|
1039 |
|
1040 SetTestStepResult(EPass); |
|
1041 return TestStepResult(); |
|
1042 } |
|
1043 |
|
1044 TVerdict CCommsdat409Step::doTestStepL() |
|
1045 /** |
|
1046 * @return - TVerdict code |
|
1047 * This test step inserts a ConnPref record on top of the already existing |
|
1048 * SNAP path. The inserted ConnPref record has: |
|
1049 * - rank 1 |
|
1050 * - no prompt |
|
1051 * - no default IAP |
|
1052 * |
|
1053 * StoreL is called on record container. |
|
1054 */ |
|
1055 { |
|
1056 SetTestStepResult(EFail); |
|
1057 |
|
1058 const TInt KIPProtoTierLink = 0x11800200; |
|
1059 |
|
1060 CCDConnectionPrefsRecord *cpRecord = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
1061 CleanupStack::PushL(cpRecord); |
|
1062 |
|
1063 cpRecord->SetRecordId(1); |
|
1064 cpRecord->iDefaultIAP = 0; |
|
1065 cpRecord->iRanking = 1; |
|
1066 cpRecord->iDirection = ECommDbConnectionDirectionOutgoing; |
|
1067 cpRecord->iBearerSet = KCommDbBearerCSD; |
|
1068 cpRecord->iDialogPref = ECommDbDialogPrefDoNotPrompt; |
|
1069 |
|
1070 cpRecord->StoreL(*iCDSession_v11); |
|
1071 |
|
1072 CleanupStack::PopAndDestroy(cpRecord); |
|
1073 |
|
1074 if (4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
1075 { |
|
1076 //ne new IPProto AP should be generated (1 default IPProto AP, and the 3 generated) |
|
1077 CCDAPPrioritySelectionPolicyRecord* appPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
1078 CleanupStack::PushL(appPrioritySelPolRec); |
|
1079 appPrioritySelPolRec->SetRecordId(4); //we just know from the config file that it's the 4th rec |
|
1080 appPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
1081 |
|
1082 CCDConnectionPrefsRecord *cpRecord1 = (CCDConnectionPrefsRecord*)CCDRecordBase::RecordFactoryL(KCDTIdConnectionPrefsRecord); |
|
1083 CleanupStack::PushL(cpRecord1); |
|
1084 cpRecord1->SetRecordId(1); |
|
1085 cpRecord1->LoadL(*iCDSession_vLatest); |
|
1086 |
|
1087 CCDAccessPointRecord* ipprotoApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
1088 CleanupStack::PushL(ipprotoApRec); |
|
1089 ipprotoApRec->SetElementId(appPrioritySelPolRec->iAp1); |
|
1090 ipprotoApRec->LoadL(*iCDSession_vLatest); |
|
1091 |
|
1092 TInt cpRecIAP = cpRecord1->iDefaultIAP; |
|
1093 TInt ipprotoAPCustSelPol = ipprotoApRec->iCustomSelectionPolicy; |
|
1094 |
|
1095 if (cpRecIAP != ipprotoAPCustSelPol && |
|
1096 0 == cpRecIAP && |
|
1097 ipprotoAPCustSelPol == ipprotoApRec->iCprConfig && |
|
1098 1 == appPrioritySelPolRec->iApCount) |
|
1099 { |
|
1100 //if the connpref rec and the generated IPProtoAP are pointing to the same IAP and |
|
1101 //the cpr config field of the generated IPProtroAP contains the elementID of the |
|
1102 //connpref rec (it's a prompting AP) then it's ok |
|
1103 SetTestStepResult(EPass); |
|
1104 } |
|
1105 |
|
1106 CleanupStack::PopAndDestroy(ipprotoApRec); |
|
1107 CleanupStack::PopAndDestroy(cpRecord1); |
|
1108 CleanupStack::PopAndDestroy(appPrioritySelPolRec); |
|
1109 } |
|
1110 |
|
1111 return TestStepResult(); |
|
1112 } |