|
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 "commsdatSnapTests.h" |
|
22 #include "Te_commsdatSuiteDefs.h" |
|
23 #include <e32test.h> |
|
24 #include <commsdattypesv1_1_partner.h> |
|
25 #include <commsdattypeinfov1_1_internal.h> |
|
26 |
|
27 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
28 namespace |
|
29 { |
|
30 |
|
31 TInt GetAPNumberL(const TInt aTierValaue, CommsDat::CMDBSession* aCDSession_vLatest) |
|
32 { |
|
33 CMDBRecordSet<CCDAccessPointRecord>* ipprotoAPs = new(ELeave)CMDBRecordSet<CCDAccessPointRecord>(KCDTIdAccessPointRecord); |
|
34 CleanupStack::PushL(ipprotoAPs); |
|
35 |
|
36 CCDAccessPointRecord* primedIPProtoAP = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
37 CleanupStack::PushL(primedIPProtoAP); |
|
38 |
|
39 primedIPProtoAP->iTier = aTierValaue; |
|
40 |
|
41 ipprotoAPs->iRecords.AppendL(primedIPProtoAP); |
|
42 //the ownership of the primed record is now at the recordset |
|
43 CleanupStack::Pop(primedIPProtoAP); |
|
44 |
|
45 ipprotoAPs->FindL(*aCDSession_vLatest); |
|
46 |
|
47 TInt apNum = ipprotoAPs->iRecords.Count(); |
|
48 |
|
49 CleanupStack::PopAndDestroy(ipprotoAPs); |
|
50 |
|
51 return apNum; |
|
52 } |
|
53 |
|
54 } |
|
55 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
56 |
|
57 //---------------------------------------------------------------------------------------------------------------- |
|
58 //Below workaround to load the linked record which should be resolved with DEF58321 |
|
59 CCDRecordBase* GetConnectedRecordL(CMDBSession& aSession, TMDBElementId aElementId) |
|
60 { |
|
61 CCDRecordBase *record = static_cast<CCDRecordBase*>(CCDRecordBase::RecordFactoryL(aElementId)); |
|
62 CleanupStack::PushL(record); |
|
63 record->LoadL(aSession); |
|
64 CleanupStack::Pop(record); |
|
65 return record; |
|
66 } |
|
67 |
|
68 CCommsdat190Step::~CCommsdat190Step() |
|
69 /** |
|
70 * Destructor |
|
71 */ |
|
72 { |
|
73 delete iCDSession; |
|
74 } |
|
75 |
|
76 CCommsdat190Step::CCommsdat190Step() |
|
77 /** |
|
78 * Constructor |
|
79 */ |
|
80 { |
|
81 SetTestStepName(KCommsdat190Step); |
|
82 } |
|
83 |
|
84 TVerdict CCommsdat190Step::doTestStepPreambleL() |
|
85 /** |
|
86 * @return - TVerdict code |
|
87 * Override of base class pure virtual |
|
88 */ |
|
89 { |
|
90 SetTestStepResult(EFail); |
|
91 |
|
92 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
93 |
|
94 iCDSession->OpenTransactionL(); |
|
95 SetTestStepResult(EPass); |
|
96 return TestStepResult(); |
|
97 } |
|
98 |
|
99 TVerdict CCommsdat190Step::doTestStepL() |
|
100 /** |
|
101 * @return - TVerdict code |
|
102 * Override of base class pure virtual |
|
103 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
104 * not leave. That being the case, the current test result value will be EPass. |
|
105 */ |
|
106 { |
|
107 SetTestStepResult(EFail); |
|
108 |
|
109 //Store several IAPs and Selection Policies for later testing |
|
110 _LIT(KIAPName1, "SelectionTestIAP1"); |
|
111 _LIT(KIAPName2, "SelectionTestIAP2"); |
|
112 _LIT(KIAPName3, "SelectionTestIAP3"); |
|
113 _LIT(KSelName1, "SelectionPolicy1"); |
|
114 |
|
115 _LIT(KModemBearerType, "ModemBearer"); |
|
116 _LIT(KLANServiceType, "LANService"); |
|
117 |
|
118 CCDIAPRecord* newIapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord)); |
|
119 CleanupStack::PushL(newIapRecord); |
|
120 CCDIAPPrioritySelectionPolicyRecord *selPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
121 CleanupStack::PushL(selPolRecord); |
|
122 |
|
123 selPolRecord->SetRecordId(KCDNewRecordRequest); |
|
124 selPolRecord->iRecordName.SetMaxLengthL(KSelName1().Length()); |
|
125 selPolRecord->iRecordName = KSelName1; |
|
126 |
|
127 |
|
128 // create a new request |
|
129 newIapRecord->SetRecordId(KCDNewRecordRequest); |
|
130 newIapRecord->iRecordName.SetMaxLengthL(KIAPName1().Length()); |
|
131 newIapRecord->iRecordName = KIAPName1; |
|
132 newIapRecord->iNetworkWeighting = 14; // dummy value |
|
133 newIapRecord->iBearer = 1; |
|
134 newIapRecord->iBearerType.SetMaxLengthL(KModemBearerType().Length()); |
|
135 newIapRecord->iBearerType = KModemBearerType; |
|
136 newIapRecord->iService = 1; |
|
137 newIapRecord->iServiceType.SetMaxLengthL(KLANServiceType().Length()); |
|
138 newIapRecord->iServiceType = KLANServiceType; |
|
139 newIapRecord->StoreL(*iCDSession); |
|
140 INFO_PRINTF2(_L("newIapRecord stored. Element id is %08x"), newIapRecord->ElementId()); |
|
141 selPolRecord->iIap1 = newIapRecord->ElementId(); |
|
142 |
|
143 newIapRecord->SetRecordId(KCDNewRecordRequest); |
|
144 newIapRecord->iRecordName.SetMaxLengthL(KIAPName2().Length()); |
|
145 newIapRecord->iRecordName = KIAPName2; |
|
146 newIapRecord->iNetworkWeighting = 14; // dummy value |
|
147 newIapRecord->iBearer = 1; |
|
148 newIapRecord->iBearerType.SetMaxLengthL(KModemBearerType().Length()); |
|
149 newIapRecord->iBearerType = KModemBearerType; |
|
150 newIapRecord->iService = 1; |
|
151 newIapRecord->iServiceType.SetMaxLengthL(KLANServiceType().Length()); |
|
152 newIapRecord->iServiceType = KLANServiceType; |
|
153 newIapRecord->StoreL(*iCDSession); |
|
154 INFO_PRINTF2(_L("newIapRecord stored. Element id is %08x"), newIapRecord->ElementId()); |
|
155 selPolRecord->iIap2 = newIapRecord->ElementId(); |
|
156 |
|
157 newIapRecord->SetRecordId(KCDNewRecordRequest); |
|
158 newIapRecord->iRecordName.SetMaxLengthL(KIAPName3().Length()); |
|
159 newIapRecord->iRecordName = KIAPName3; |
|
160 newIapRecord->iNetworkWeighting = 14; // dummy value |
|
161 newIapRecord->iBearer = 1; |
|
162 newIapRecord->iBearerType.SetMaxLengthL(KModemBearerType().Length()); |
|
163 newIapRecord->iBearerType = KModemBearerType; |
|
164 newIapRecord->iService = 1; |
|
165 newIapRecord->iServiceType.SetMaxLengthL(KLANServiceType().Length()); |
|
166 newIapRecord->iServiceType = KLANServiceType; |
|
167 newIapRecord->StoreL(*iCDSession); |
|
168 INFO_PRINTF2(_L("newIapRecord stored. Element id is %08x"), newIapRecord->ElementId()); |
|
169 selPolRecord->iIap3 = newIapRecord->ElementId(); |
|
170 |
|
171 selPolRecord->StoreL(*iCDSession); |
|
172 INFO_PRINTF2(_L("selPolRecord stored. Element id is %08x"), selPolRecord->ElementId()); |
|
173 |
|
174 CleanupStack::PopAndDestroy(selPolRecord); |
|
175 CleanupStack::PopAndDestroy(newIapRecord); |
|
176 |
|
177 SetTestStepResult(EPass); |
|
178 return TestStepResult(); |
|
179 } |
|
180 |
|
181 TVerdict CCommsdat190Step::doTestStepPostambleL() |
|
182 /** |
|
183 * @return - TVerdict code |
|
184 * Override of base class pure virtual |
|
185 */ |
|
186 { |
|
187 iCDSession->CommitTransactionL(); |
|
188 return TestStepResult(); |
|
189 } |
|
190 |
|
191 //---------------------------------------------------------------------------------------------------------------- |
|
192 CCommsdat191Step::~CCommsdat191Step() |
|
193 /** |
|
194 * Destructor |
|
195 */ |
|
196 { |
|
197 delete iCDSession; |
|
198 } |
|
199 |
|
200 CCommsdat191Step::CCommsdat191Step() |
|
201 /** |
|
202 * Constructor |
|
203 */ |
|
204 { |
|
205 SetTestStepName(KCommsdat191Step); |
|
206 } |
|
207 |
|
208 TVerdict CCommsdat191Step::doTestStepPreambleL() |
|
209 /** |
|
210 * @return - TVerdict code |
|
211 * Override of base class pure virtual |
|
212 */ |
|
213 { |
|
214 SetTestStepResult(EFail); |
|
215 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
216 |
|
217 SetTestStepResult(EPass); |
|
218 return TestStepResult(); |
|
219 } |
|
220 |
|
221 TVerdict CCommsdat191Step::doTestStepL() |
|
222 /** |
|
223 * @return - TVerdict code |
|
224 * Override of base class pure virtual |
|
225 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
226 * not leave. That being the case, the current test result value will be EPass. |
|
227 */ |
|
228 { |
|
229 SetTestStepResult(EFail); |
|
230 |
|
231 _LIT(KIAPName1, "SelectionTestIAP1"); //Same as used by CCommsdat100Step |
|
232 _LIT(KSelName1, "SelectionPolicy1"); |
|
233 |
|
234 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
235 CleanupStack::PushL(selPolRecord); |
|
236 |
|
237 //Find a particular IAP Priority Selection Policy record |
|
238 selPolRecord->iRecordName.SetMaxLengthL(KSelName1().Length()); |
|
239 selPolRecord->iRecordName = KSelName1; |
|
240 |
|
241 TInt found = selPolRecord->FindL(*iCDSession); //This record has been stored by CCommsdat100Step |
|
242 if(found) |
|
243 { |
|
244 //Load corresponding IAP record |
|
245 |
|
246 |
|
247 //This record has been stored by CCommsdat100Step |
|
248 |
|
249 // Link records work now |
|
250 CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(GetConnectedRecordL(*iCDSession, selPolRecord->iIap1)); |
|
251 CleanupStack::PushL(iapRecord); |
|
252 |
|
253 |
|
254 /*selPolRecord->iIap1.LoadL(*iCDSession); |
|
255 CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(selPolRecord->iIap1); |
|
256 */ |
|
257 TPtrC iapRecordName(iapRecord->iRecordName); |
|
258 if (iapRecordName == KIAPName1) |
|
259 { |
|
260 INFO_PRINTF2(_L("Iap record (%S) successfuly loaded"), &iapRecordName); |
|
261 SetTestStepResult(EPass); |
|
262 } |
|
263 else |
|
264 { |
|
265 INFO_PRINTF3(_L("Iap record (%S) does not match the expected one (%S)"), &iapRecordName, &KIAPName1()); |
|
266 } |
|
267 |
|
268 CleanupStack::PopAndDestroy(iapRecord); // not necessary - link records work now. |
|
269 } |
|
270 |
|
271 CleanupStack::PopAndDestroy(selPolRecord); |
|
272 |
|
273 return TestStepResult(); |
|
274 } |
|
275 |
|
276 //---------------------------------------------------------------------------------------------------------------- |
|
277 |
|
278 CCommsdat192Step::~CCommsdat192Step() |
|
279 /** |
|
280 * Destructor |
|
281 */ |
|
282 { |
|
283 delete iCDSession; |
|
284 } |
|
285 |
|
286 CCommsdat192Step::CCommsdat192Step() |
|
287 /** |
|
288 * Constructor |
|
289 */ |
|
290 { |
|
291 SetTestStepName(KCommsdat192Step); |
|
292 } |
|
293 |
|
294 TVerdict CCommsdat192Step::doTestStepPreambleL() |
|
295 /** |
|
296 * @return - TVerdict code |
|
297 * Override of base class pure virtual |
|
298 */ |
|
299 { |
|
300 SetTestStepResult(EFail); |
|
301 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
302 |
|
303 iCDSession->OpenTransactionL(); |
|
304 SetTestStepResult(EPass); |
|
305 return TestStepResult(); |
|
306 } |
|
307 |
|
308 TVerdict CCommsdat192Step::doTestStepL() |
|
309 /** |
|
310 * @return - TVerdict code |
|
311 * Override of base class pure virtual |
|
312 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
313 * not leave. That being the case, the current test result value will be EPass. |
|
314 */ |
|
315 { |
|
316 SetTestStepResult(EFail); |
|
317 |
|
318 //Store an IAP priority based AP record for later testing |
|
319 _LIT(KApName1, "CorporateLAN"); //Same as used by CCommsdat101Step |
|
320 _LIT(KSelName1, "SelectionPolicy1"); |
|
321 const TInt GIDValue = 1; |
|
322 |
|
323 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
324 CleanupStack::PushL(selPolRecord); |
|
325 |
|
326 //Find a particular IAP Priority Selection Policy record |
|
327 selPolRecord->iRecordName.SetMaxLengthL(KSelName1().Length()); |
|
328 selPolRecord->iRecordName = KSelName1; |
|
329 |
|
330 TInt found = selPolRecord->FindL(*iCDSession); //This record has been stored by CCommsdat100Step |
|
331 if (found) |
|
332 { |
|
333 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
334 CleanupStack::PushL(apRecord); |
|
335 |
|
336 apRecord->SetRecordId(KCDNewRecordRequest); |
|
337 apRecord->iRecordName.SetMaxLengthL(KApName1().Length()); |
|
338 apRecord->iRecordName = KApName1; |
|
339 apRecord->iSelectionPolicy = selPolRecord->ElementId(); |
|
340 apRecord->iAccessPointGID = GIDValue; |
|
341 apRecord->StoreL(*iCDSession); |
|
342 INFO_PRINTF2(_L("apRecord stored. Element id is %08x"), apRecord->ElementId()); |
|
343 |
|
344 CleanupStack::PopAndDestroy(apRecord); |
|
345 SetTestStepResult(EPass); |
|
346 } |
|
347 |
|
348 CleanupStack::PopAndDestroy(selPolRecord); |
|
349 return TestStepResult(); |
|
350 } |
|
351 |
|
352 TVerdict CCommsdat192Step::doTestStepPostambleL() |
|
353 /** |
|
354 * @return - TVerdict code |
|
355 * Override of base class pure virtual |
|
356 */ |
|
357 { |
|
358 iCDSession->CommitTransactionL(); |
|
359 return TestStepResult(); |
|
360 } |
|
361 |
|
362 //---------------------------------------------------------------------------------------------------------------- |
|
363 |
|
364 CCommsdat193Step::~CCommsdat193Step() |
|
365 /** |
|
366 * Destructor |
|
367 */ |
|
368 { |
|
369 delete iCDSession; |
|
370 } |
|
371 |
|
372 CCommsdat193Step::CCommsdat193Step() |
|
373 /** |
|
374 * Constructor |
|
375 */ |
|
376 { |
|
377 SetTestStepName(KCommsdat193Step); |
|
378 } |
|
379 |
|
380 TVerdict CCommsdat193Step::doTestStepPreambleL() |
|
381 /** |
|
382 * @return - TVerdict code |
|
383 * Override of base class pure virtual |
|
384 */ |
|
385 { |
|
386 SetTestStepResult(EFail); |
|
387 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
388 |
|
389 SetTestStepResult(EPass); |
|
390 return TestStepResult(); |
|
391 } |
|
392 |
|
393 TVerdict CCommsdat193Step::doTestStepL() |
|
394 /** |
|
395 * @return - TVerdict code |
|
396 * Override of base class pure virtual |
|
397 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
398 * not leave. That being the case, the current test result value will be EPass. |
|
399 */ |
|
400 { |
|
401 SetTestStepResult(EFail); |
|
402 |
|
403 //Load a previously stored IAP priority based AP record |
|
404 _LIT(KApName1, "CorporateLAN"); //Same as used by CCommsdat101Step |
|
405 _LIT(KSelName1, "SelectionPolicy1"); |
|
406 _LIT(KIAPName3, "SelectionTestIAP3"); //Same as used by CCommsdat100Step |
|
407 |
|
408 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
409 CleanupStack::PushL(apRecord); |
|
410 |
|
411 apRecord->iRecordName.SetL(KApName1); |
|
412 TInt found = apRecord->FindL(*iCDSession); //This record has been stored by CCommsdat102Step |
|
413 if (found) |
|
414 { |
|
415 INFO_PRINTF2(_L("apRecord loaded. Element id is %08x"), apRecord->ElementId()); |
|
416 |
|
417 //Load the Selection Policy record |
|
418 //This record has been stored by CCommsdat100Step |
|
419 CCDSelectionPolicyRecordBase* selPolRecord = static_cast<CCDSelectionPolicyRecordBase*>(GetConnectedRecordL(*iCDSession, apRecord->iSelectionPolicy)); |
|
420 CleanupStack::PushL(selPolRecord); |
|
421 |
|
422 |
|
423 /*apRecord->iSelectionPolicy.LoadL(*iCDSession); |
|
424 CCDSelectionPolicyRecordBase* selPolRecord = static_cast<CCDSelectionPolicyRecordBase*>(apRecord->iSelectionPolicy); |
|
425 */ |
|
426 |
|
427 TESTL(TPtrC(selPolRecord->iRecordName) == KSelName1); |
|
428 |
|
429 //Cast to the already known type |
|
430 CCDIAPPrioritySelectionPolicyRecord* iapSelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(selPolRecord); |
|
431 |
|
432 //This record has been stored by CCommsdat100Step |
|
433 CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(GetConnectedRecordL(*iCDSession, iapSelPolRec->iIap3)); |
|
434 CleanupStack::PushL(iapRecord); |
|
435 |
|
436 |
|
437 /*iapSelPolRec->iIap3.LoadL(*iCDSession); |
|
438 CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(iapSelPolRec->iIap3);*/ |
|
439 |
|
440 TPtrC iapRecordName(iapRecord->iRecordName); |
|
441 if(iapRecordName == KIAPName3) |
|
442 { |
|
443 INFO_PRINTF2(_L("Iap record (%S) successfuly loaded"), &iapRecordName); |
|
444 SetTestStepResult(EPass); |
|
445 } |
|
446 else |
|
447 { |
|
448 INFO_PRINTF3(_L("Iap record (%S) does not match the expected one (%S)"), &iapRecordName, &KIAPName3()); |
|
449 } |
|
450 |
|
451 CleanupStack::PopAndDestroy(iapRecord); |
|
452 CleanupStack::PopAndDestroy(selPolRecord); |
|
453 |
|
454 } |
|
455 CleanupStack::PopAndDestroy(apRecord); |
|
456 |
|
457 return TestStepResult(); |
|
458 } |
|
459 |
|
460 //---------------------------------------------------------------------------------------------------------------- |
|
461 |
|
462 CCommsdat194Step::~CCommsdat194Step() |
|
463 /** |
|
464 * Destructor |
|
465 */ |
|
466 { |
|
467 delete iCDSession; |
|
468 } |
|
469 |
|
470 CCommsdat194Step::CCommsdat194Step() |
|
471 /** |
|
472 * Constructor |
|
473 */ |
|
474 { |
|
475 SetTestStepName(KCommsdat194Step); |
|
476 } |
|
477 |
|
478 TVerdict CCommsdat194Step::doTestStepPreambleL() |
|
479 /** |
|
480 * @return - TVerdict code |
|
481 * Override of base class pure virtual |
|
482 */ |
|
483 { |
|
484 SetTestStepResult(EFail); |
|
485 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
486 |
|
487 SetTestStepResult(EPass); |
|
488 return TestStepResult(); |
|
489 } |
|
490 |
|
491 TVerdict CCommsdat194Step::doTestStepL() |
|
492 /** |
|
493 * @return - TVerdict code |
|
494 * Override of base class pure virtual |
|
495 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
496 * not leave. That being the case, the current test result value will be EPass. |
|
497 */ |
|
498 { |
|
499 SetTestStepResult(EFail); |
|
500 |
|
501 //Load a previously stored IAP priority based AP record |
|
502 _LIT(KApName1, "CorporateLAN"); //Same as used by CCommsdat101Step |
|
503 _LIT(KSelName1, "SelectionPolicy1"); |
|
504 |
|
505 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
506 CleanupStack::PushL(apRecord); |
|
507 |
|
508 apRecord->iRecordName.SetL(KApName1); |
|
509 TInt found = apRecord->FindL(*iCDSession); //This record has been stored by CCommsdat102Step |
|
510 if (found) |
|
511 { |
|
512 INFO_PRINTF2(_L("apRecord loaded. Element id is %08x"), apRecord->ElementId()); |
|
513 |
|
514 //Load the Selection Policy record |
|
515 //This record has been stored by CCommsdat100Step |
|
516 CCDSelectionPolicyRecordBase* selPolRecord = static_cast<CCDSelectionPolicyRecordBase*>(GetConnectedRecordL(*iCDSession, apRecord->iSelectionPolicy)); |
|
517 CleanupStack::PushL(selPolRecord); |
|
518 |
|
519 /*apRecord->iSelectionPolicy.LoadL(*iCDSession); |
|
520 CCDSelectionPolicyRecordBase* selPolRecord = static_cast<CCDSelectionPolicyRecordBase*>(apRecord->iSelectionPolicy); |
|
521 */ |
|
522 TESTL(TPtrC(selPolRecord->iRecordName) == KSelName1); |
|
523 |
|
524 //Build the list of IDs |
|
525 RArray<TInt> iapIDs; |
|
526 CleanupClosePushL(iapIDs); |
|
527 |
|
528 const SRecordTypeInfo* recordInfo = selPolRecord->GetRecordInfo(); |
|
529 CMDBRecordLink<CCDIAPRecord>* iapRecordLink = NULL; |
|
530 // Get only 3 fields from the record because the previous test only set 3 fields |
|
531 TInt index(0); |
|
532 |
|
533 while ( (recordInfo + index) != NULL && (recordInfo + index)->iTypeId != KCDTIdIap1 ) |
|
534 { |
|
535 // The first field you want to read might not be at the beginning of the table |
|
536 ++index; |
|
537 } |
|
538 /* |
|
539 changed the code because this was too fragile, depending on non-public info (i.e. the order of the fields in the recordinfo table) |
|
540 for( TInt index = 2; |
|
541 index < 5 && (iapRecordLink = static_cast<CMDBRecordLink<CCDIAPRecord>*>(selPolRecord->GetFieldByIdL((recordInfo + index)->iTypeId))) != NULL; |
|
542 index++ ) |
|
543 { |
|
544 */ |
|
545 TInt typeId = (recordInfo + index)->iTypeId ; |
|
546 while ( typeId != NULL && typeId <= KCDTIdIap3 ) |
|
547 { |
|
548 iapRecordLink = static_cast<CMDBRecordLink<CCDIAPRecord>*>(selPolRecord->GetFieldByIdL(typeId)); |
|
549 |
|
550 CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(GetConnectedRecordL(*iCDSession, *iapRecordLink)); |
|
551 //iapRecordLink->LoadL(*iCDSession); |
|
552 //CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(*iapRecordLink); |
|
553 |
|
554 TPtrC iapRecName(iapRecord->iRecordName); |
|
555 TUint32 iapId = iapRecord->RecordId(); |
|
556 if (iapRecName.Length() > 0 && iapId > 0) |
|
557 { |
|
558 iapIDs.Append(iapId); |
|
559 } |
|
560 //delete iapRecord; |
|
561 typeId = (++recordInfo + index)->iTypeId; |
|
562 } |
|
563 |
|
564 if(iapIDs.Count() == 3) |
|
565 { |
|
566 INFO_PRINTF1(_L("Iap records successfuly loaded")); |
|
567 SetTestStepResult(EPass); |
|
568 } |
|
569 else |
|
570 { |
|
571 INFO_PRINTF1(_L("Iap records not found!")); |
|
572 } |
|
573 CleanupStack::PopAndDestroy(); //Call Close() on iapIDs; |
|
574 CleanupStack::PopAndDestroy(selPolRecord); |
|
575 } |
|
576 CleanupStack::PopAndDestroy(apRecord); |
|
577 |
|
578 return TestStepResult(); |
|
579 } |
|
580 |
|
581 //---------------------------------------------------------------------------------------------------------------- |
|
582 |
|
583 CCommsdat195Step::~CCommsdat195Step() |
|
584 /** |
|
585 * Destructor |
|
586 */ |
|
587 { |
|
588 delete iCDSession; |
|
589 } |
|
590 |
|
591 CCommsdat195Step::CCommsdat195Step() |
|
592 /** |
|
593 * Constructor |
|
594 */ |
|
595 { |
|
596 SetTestStepName(KCommsdat195Step); |
|
597 } |
|
598 |
|
599 TVerdict CCommsdat195Step::doTestStepPreambleL() |
|
600 /** |
|
601 * @return - TVerdict code |
|
602 * Override of base class pure virtual |
|
603 */ |
|
604 { |
|
605 SetTestStepResult(EFail); |
|
606 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
607 |
|
608 SetTestStepResult(EPass); |
|
609 return TestStepResult(); |
|
610 } |
|
611 |
|
612 TVerdict CCommsdat195Step::doTestStepL() |
|
613 /** |
|
614 * @return - TVerdict code |
|
615 * Override of base class pure virtual |
|
616 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
617 * not leave. That being the case, the current test result value will be EPass. |
|
618 */ |
|
619 { |
|
620 SetTestStepResult(EFail); |
|
621 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
622 _LIT(KApName1, "dummynifMappedFromIAP1"); |
|
623 //_LIT(KSelName1, "SelectionPolicy1"); |
|
624 //const TUint KAp1 = 22; |
|
625 const TUint KRecordId = 1; |
|
626 |
|
627 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
628 CleanupStack::PushL(apRecord); |
|
629 |
|
630 apRecord->iRecordName.SetL(KApName1); |
|
631 |
|
632 TInt found = apRecord->FindL(*iCDSession); |
|
633 if (found) |
|
634 { |
|
635 INFO_PRINTF2(_L("apRecord loaded. Element id is %08x"), apRecord->ElementId()); |
|
636 |
|
637 //Load the related IAP record |
|
638 CCDIAPRecord* iapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord)); |
|
639 CleanupStack::PushL(iapRecord); |
|
640 iapRecord->SetRecordId(KRecordId); |
|
641 iapRecord->LoadL(*iCDSession); |
|
642 |
|
643 if(static_cast<TInt>(apRecord->iRecordTag) == iapRecord->RecordId()) |
|
644 { |
|
645 INFO_PRINTF1(_L("AP and the 'linked' IAP record found")); |
|
646 SetTestStepResult(EPass); |
|
647 } |
|
648 else |
|
649 { |
|
650 INFO_PRINTF1(_L("AP and the 'linked' IAP record found")); |
|
651 } |
|
652 |
|
653 CleanupStack::PopAndDestroy(iapRecord); |
|
654 |
|
655 } |
|
656 else |
|
657 { |
|
658 INFO_PRINTF1(_L("AccessPoint record not found")); |
|
659 } |
|
660 |
|
661 CleanupStack::PopAndDestroy(apRecord); |
|
662 #else |
|
663 _LIT(KApName1, "SNAP1"); |
|
664 _LIT(KSelName1, "SelectionPolicy1"); |
|
665 |
|
666 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
667 CleanupStack::PushL(apRecord); |
|
668 |
|
669 apRecord->iRecordName.SetL(KApName1); |
|
670 TInt found = apRecord->FindL(*iCDSession); |
|
671 if (found) |
|
672 { |
|
673 INFO_PRINTF2(_L("apRecord loaded. Element id is %08x"), apRecord->ElementId()); |
|
674 |
|
675 //Load the Selection Policy record |
|
676 |
|
677 //CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(GetConnectedRecordL(*iCDSession, apRecord->iSelectionPolicy)); |
|
678 //CleanupStack::PushL(selPolRecord); |
|
679 |
|
680 apRecord->iSelectionPolicy.LoadL(*iCDSession); |
|
681 //CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(apRecord->iSelectionPolicy); |
|
682 |
|
683 CCDSelectionPolicyRecordBase* selPolRecord1 = static_cast<CCDSelectionPolicyRecordBase*>(apRecord->iSelectionPolicy); |
|
684 |
|
685 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(selPolRecord1); |
|
686 |
|
687 TESTL(TPtrC(selPolRecord->iRecordName) == KSelName1); |
|
688 |
|
689 if(selPolRecord->iIap1.RecordId() == 1) |
|
690 { |
|
691 INFO_PRINTF1(_L("Selection Policy record found")); |
|
692 SetTestStepResult(EPass); |
|
693 } |
|
694 else |
|
695 { |
|
696 INFO_PRINTF1(_L("Selection Policy record not found")); |
|
697 } |
|
698 } |
|
699 CleanupStack::PopAndDestroy(apRecord); |
|
700 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
701 return TestStepResult(); |
|
702 } |
|
703 |
|
704 //---------------------------------------------------------------------------------------------------------------- |
|
705 |
|
706 CCommsdat196Step::~CCommsdat196Step() |
|
707 /** |
|
708 * Destructor |
|
709 */ |
|
710 { |
|
711 delete iCDSession; |
|
712 } |
|
713 |
|
714 CCommsdat196Step::CCommsdat196Step() |
|
715 /** |
|
716 * Constructor |
|
717 */ |
|
718 { |
|
719 SetTestStepName(KCommsdat196Step); |
|
720 } |
|
721 |
|
722 TVerdict CCommsdat196Step::doTestStepPreambleL() |
|
723 /** |
|
724 * @return - TVerdict code |
|
725 * Override of base class pure virtual |
|
726 */ |
|
727 { |
|
728 SetTestStepResult(EFail); |
|
729 iCDSession = CMDBSession::NewL(KCDVersion1_1); |
|
730 |
|
731 SetTestStepResult(EPass); |
|
732 return TestStepResult(); |
|
733 } |
|
734 |
|
735 TVerdict CCommsdat196Step::doTestStepL() |
|
736 /** |
|
737 * @return - TVerdict code |
|
738 * Override of base class pure virtual |
|
739 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
740 * not leave. That being the case, the current test result value will be EPass. |
|
741 */ |
|
742 { |
|
743 SetTestStepResult(EFail); |
|
744 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
745 _LIT(KSelName2, "SelectionPolicy2"); |
|
746 const TUint KRecordId = 2; |
|
747 |
|
748 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
749 CleanupStack::PushL(apRecord); |
|
750 |
|
751 apRecord->SetRecordId(KRecordId); //load record 2 which links to a policy with 3 IAPs. |
|
752 apRecord->LoadL(*iCDSession); |
|
753 |
|
754 INFO_PRINTF2(_L("Access Point Record loaded. Element id is %08x"), apRecord->ElementId()); |
|
755 |
|
756 //Load the Selection Policy record |
|
757 //CCDAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDConnectionPrefsRecord::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
758 CCDAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
759 CleanupStack::PushL(selPolRecord); |
|
760 selPolRecord->SetRecordId(KRecordId); |
|
761 selPolRecord->LoadL(*iCDSession); |
|
762 |
|
763 TESTL(TPtrC(selPolRecord->iRecordName) == KSelName2); |
|
764 |
|
765 //Build the list of IDs |
|
766 RArray<TInt> iapIDs; |
|
767 CleanupClosePushL(iapIDs); |
|
768 |
|
769 // CMDBField<TUint32>* theAp = &selPolRecord->iAp1; |
|
770 CMDBRecordLink<CCDAccessPointRecord>* theAp = &selPolRecord->iAp1; |
|
771 TUint32 theCount = selPolRecord->iApCount; |
|
772 if (theCount != 3) |
|
773 { |
|
774 INFO_PRINTF2(_L("IAP count in the policy (%) is invalid"), theCount); |
|
775 TESTL(EFalse); |
|
776 } |
|
777 |
|
778 for (TInt i = 0; i < theCount; i++, theAp++) |
|
779 { |
|
780 TInt theIapID = static_cast<TInt>(*theAp); |
|
781 TESTL(theIapID>0); |
|
782 iapIDs.Append(theIapID); |
|
783 } |
|
784 |
|
785 if (iapIDs.Count() == 3) |
|
786 { |
|
787 INFO_PRINTF1(_L("Iap records successfuly loaded")); |
|
788 SetTestStepResult(EPass); |
|
789 } |
|
790 else |
|
791 { |
|
792 INFO_PRINTF1(_L("Iap records not found!")); |
|
793 } |
|
794 |
|
795 CleanupStack::PopAndDestroy(&iapIDs); |
|
796 CleanupStack::PopAndDestroy(selPolRecord); |
|
797 CleanupStack::PopAndDestroy(apRecord); |
|
798 |
|
799 #else |
|
800 _LIT(KSelName2, "SelectionPolicy2"); |
|
801 |
|
802 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
803 CleanupStack::PushL(apRecord); |
|
804 |
|
805 apRecord->SetRecordId(2); //load record 2 which links to a policy with 3 IAPs. |
|
806 apRecord->LoadL(*iCDSession); |
|
807 |
|
808 INFO_PRINTF2(_L("Access Point Record loaded. Element id is %08x"), apRecord->ElementId()); |
|
809 |
|
810 //Load the Selection Policy record |
|
811 |
|
812 //CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(GetConnectedRecordL(*iCDSession, apRecord->iSelectionPolicy)); |
|
813 //CleanupStack::PushL(selPolRecord); |
|
814 |
|
815 |
|
816 apRecord->iSelectionPolicy.LoadL(*iCDSession); |
|
817 //CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(apRecord->iSelectionPolicy); |
|
818 CCDSelectionPolicyRecordBase* selPolRecord1 = static_cast<CCDSelectionPolicyRecordBase*>(apRecord->iSelectionPolicy); |
|
819 |
|
820 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(selPolRecord1); |
|
821 |
|
822 TESTL(TPtrC(selPolRecord->iRecordName) == KSelName2); |
|
823 |
|
824 //Build the list of IDs |
|
825 RArray<TInt> iapIDs; |
|
826 CleanupClosePushL(iapIDs); |
|
827 |
|
828 CMDBRecordLink<CCDIAPRecord>* theIap = &selPolRecord->iIap1; |
|
829 CMDBField<TUint32>* theCount = &selPolRecord->iIapCount; |
|
830 TUint count = *theCount; |
|
831 if (count != 3) |
|
832 { |
|
833 INFO_PRINTF2(_L("IAP count in the policy (%) is invalid"), count); |
|
834 TESTL(EFalse); |
|
835 } |
|
836 |
|
837 for (TInt i = 0; i < count; i++,theIap++) |
|
838 { |
|
839 TInt theIapID = static_cast<TInt>(*theIap); |
|
840 TESTL(theIapID>0); |
|
841 iapIDs.Append(theIapID); |
|
842 } |
|
843 |
|
844 if (iapIDs.Count() == 3) |
|
845 { |
|
846 INFO_PRINTF1(_L("Iap records successfuly loaded")); |
|
847 SetTestStepResult(EPass); |
|
848 } |
|
849 else |
|
850 { |
|
851 INFO_PRINTF1(_L("Iap records not found!")); |
|
852 } |
|
853 |
|
854 CleanupStack::PopAndDestroy(&iapIDs); |
|
855 CleanupStack::PopAndDestroy(apRecord); |
|
856 #endif |
|
857 |
|
858 return TestStepResult(); |
|
859 } |
|
860 //--------------------------------------- |
|
861 // FIELD TESTS |
|
862 //--------------------------------------- |
|
863 //---------------------------------------------------------------------------------------------------------------- |
|
864 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
865 |
|
866 CCommsdat307Step::~CCommsdat307Step() |
|
867 /** |
|
868 * Destructor |
|
869 */ |
|
870 { |
|
871 delete iCDSession_v11; |
|
872 delete iCDSession_vLatest; |
|
873 } |
|
874 |
|
875 CCommsdat307Step::CCommsdat307Step() |
|
876 /** |
|
877 * Constructor |
|
878 */ |
|
879 { |
|
880 SetTestStepName(KCommsdat307Step); |
|
881 } |
|
882 |
|
883 TVerdict CCommsdat307Step::doTestStepPreambleL() |
|
884 /** |
|
885 * @return - TVerdict code |
|
886 * Override of base class pure virtual |
|
887 */ |
|
888 { |
|
889 SetTestStepResult(EFail); |
|
890 |
|
891 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
892 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
893 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
894 #else |
|
895 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
896 #endif |
|
897 |
|
898 SetTestStepResult(EPass); |
|
899 return TestStepResult(); |
|
900 } |
|
901 |
|
902 TVerdict CCommsdat307Step::doTestStepL() |
|
903 /** |
|
904 * @return - TVerdict code |
|
905 * Change the PromptForSnap field in the GlobalSettings record to TRUE |
|
906 */ |
|
907 { |
|
908 SetTestStepResult(EFail); |
|
909 |
|
910 //create the container for the prompt field in the GS |
|
911 CMDBField<TBool>* promptForSnapField = new(ELeave) CMDBField<TBool>(KCDTIdPromptForSnap); |
|
912 CleanupStack::PushL(promptForSnapField); |
|
913 promptForSnapField->SetRecordId(1); |
|
914 |
|
915 //create the container for the prompt field in the tier rec. |
|
916 |
|
917 CMDBField<TBool>* promptTierField = new(ELeave) CMDBField<TBool>(KCDTIdPromptUser); |
|
918 CleanupStack::PushL(promptTierField); |
|
919 promptTierField->SetRecordId(1); |
|
920 |
|
921 //This loads the 'PromptUser' field from the default Network tier record. |
|
922 promptForSnapField->LoadL(*iCDSession_v11); |
|
923 promptTierField->LoadL(*iCDSession_vLatest); |
|
924 |
|
925 if (*promptTierField == *promptForSnapField) |
|
926 { |
|
927 *promptForSnapField = ETrue; |
|
928 promptForSnapField->ModifyL(*iCDSession_v11); |
|
929 |
|
930 CMDBField<TBool>* promptForSnapField2 = new(ELeave) CMDBField<TBool>(KCDTIdPromptForSnap); |
|
931 CleanupStack::PushL(promptForSnapField2); |
|
932 promptForSnapField2->SetRecordId(1); |
|
933 |
|
934 promptForSnapField2->LoadL(*iCDSession_v11); |
|
935 promptTierField->LoadL(*iCDSession_vLatest); |
|
936 |
|
937 if (1 == *promptTierField && |
|
938 1 == *promptForSnapField2) |
|
939 { |
|
940 SetTestStepResult(EPass); |
|
941 } |
|
942 CleanupStack::PopAndDestroy(promptForSnapField2); |
|
943 } |
|
944 |
|
945 CleanupStack::PopAndDestroy(promptTierField); |
|
946 CleanupStack::PopAndDestroy(promptForSnapField); |
|
947 |
|
948 return TestStepResult(); |
|
949 } |
|
950 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
951 |
|
952 //---------------------------------------------------------------------------------------------------------------- |
|
953 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
954 |
|
955 CCommsdat308Step::~CCommsdat308Step() |
|
956 /** |
|
957 * Destructor |
|
958 */ |
|
959 { |
|
960 delete iCDSession_v11; |
|
961 delete iCDSession_vLatest; |
|
962 } |
|
963 |
|
964 CCommsdat308Step::CCommsdat308Step() |
|
965 /** |
|
966 * Constructor |
|
967 */ |
|
968 { |
|
969 SetTestStepName(KCommsdat308Step); |
|
970 } |
|
971 |
|
972 TVerdict CCommsdat308Step::doTestStepPreambleL() |
|
973 /** |
|
974 * @return - TVerdict code |
|
975 * Override of base class pure virtual |
|
976 */ |
|
977 { |
|
978 SetTestStepResult(EFail); |
|
979 |
|
980 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
981 iCDSession_vLatest = NULL; |
|
982 |
|
983 SetTestStepResult(EPass); |
|
984 return TestStepResult(); |
|
985 } |
|
986 |
|
987 TVerdict CCommsdat308Step::doTestStepL() |
|
988 /** |
|
989 * @return - TVerdict code |
|
990 * Load the GlobalSettings record from the DB. |
|
991 * This test step is dependent form the CCommsdat307Step!! |
|
992 */ |
|
993 { |
|
994 SetTestStepResult(EFail); |
|
995 |
|
996 CCDGlobalSettingsRecord* gsRecord = static_cast<CCDGlobalSettingsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdGlobalSettingsRecord)); |
|
997 CleanupStack::PushL(gsRecord); |
|
998 |
|
999 gsRecord->SetRecordId(1); |
|
1000 gsRecord->LoadL(*iCDSession_v11); |
|
1001 |
|
1002 CMDBField<TBool>* promptForSnap = &(gsRecord->iPromptForSnap); |
|
1003 |
|
1004 if ( 1 == *promptForSnap ) |
|
1005 { |
|
1006 SetTestStepResult(EPass); |
|
1007 } |
|
1008 |
|
1009 CleanupStack::PopAndDestroy(gsRecord); |
|
1010 |
|
1011 return TestStepResult(); |
|
1012 } |
|
1013 |
|
1014 #endif |
|
1015 //---------------------------------------------------------------------------------------------------------------- |
|
1016 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1017 |
|
1018 CCommsdat309Step::~CCommsdat309Step() |
|
1019 /** |
|
1020 * Destructor |
|
1021 */ |
|
1022 { |
|
1023 delete iCDSession_v11; |
|
1024 delete iCDSession_vLatest; |
|
1025 } |
|
1026 |
|
1027 CCommsdat309Step::CCommsdat309Step() |
|
1028 /** |
|
1029 * Constructor |
|
1030 */ |
|
1031 { |
|
1032 SetTestStepName(KCommsdat309Step); |
|
1033 } |
|
1034 |
|
1035 TVerdict CCommsdat309Step::doTestStepPreambleL() |
|
1036 /** |
|
1037 * @return - TVerdict code |
|
1038 * Override of base class pure virtual |
|
1039 */ |
|
1040 { |
|
1041 SetTestStepResult(EFail); |
|
1042 |
|
1043 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1044 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1045 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1046 #else |
|
1047 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1048 #endif |
|
1049 |
|
1050 SetTestStepResult(EPass); |
|
1051 return TestStepResult(); |
|
1052 } |
|
1053 |
|
1054 TVerdict CCommsdat309Step::doTestStepL() |
|
1055 /** |
|
1056 * @return - TVerdict code |
|
1057 * Load the defaultSnap field formthe GS record as a link field. |
|
1058 * This test step is dependent form the CCommsdat307Step!! |
|
1059 */ |
|
1060 { |
|
1061 SetTestStepResult(EFail); |
|
1062 |
|
1063 CMDBRecordLink<CCDAccessPointRecord>* gsDefaultSnap = new (ELeave) CMDBRecordLink<CCDAccessPointRecord>(KCDTIdDefaultSnap); |
|
1064 CMDBRecordLink<CCDAccessPointRecord>* tierDefaultAP = new (ELeave) CMDBRecordLink<CCDAccessPointRecord>(KCDTIdDefaultAccessPoint); |
|
1065 CleanupStack::PushL(gsDefaultSnap); |
|
1066 CleanupStack::PushL(tierDefaultAP); |
|
1067 |
|
1068 gsDefaultSnap->SetRecordId(1); |
|
1069 gsDefaultSnap->LoadL(*iCDSession_v11); |
|
1070 |
|
1071 tierDefaultAP->SetRecordId(1); |
|
1072 tierDefaultAP->LoadL(*iCDSession_vLatest); |
|
1073 |
|
1074 if ( 1 == *gsDefaultSnap && |
|
1075 1 == ((*tierDefaultAP & KCDMaskShowRecordId) >> 8) ) |
|
1076 { |
|
1077 //ok, the 2 fields are the same |
|
1078 *gsDefaultSnap = 2; |
|
1079 gsDefaultSnap->ModifyL(*iCDSession_v11); |
|
1080 |
|
1081 CMDBRecordLink<CCDAccessPointRecord>* gsDefaultSnap1 = new (ELeave) CMDBRecordLink<CCDAccessPointRecord>(KCDTIdDefaultSnap); |
|
1082 CMDBRecordLink<CCDAccessPointRecord>* tierDefaultAP1 = new (ELeave) CMDBRecordLink<CCDAccessPointRecord>(KCDTIdDefaultAccessPoint); |
|
1083 CleanupStack::PushL(gsDefaultSnap1); |
|
1084 CleanupStack::PushL(tierDefaultAP1); |
|
1085 |
|
1086 //let's check them once again... |
|
1087 gsDefaultSnap1->SetRecordId(1); |
|
1088 gsDefaultSnap1->LoadL(*iCDSession_v11); |
|
1089 |
|
1090 tierDefaultAP1->SetRecordId(1); |
|
1091 tierDefaultAP1->LoadL(*iCDSession_vLatest); |
|
1092 |
|
1093 if ( 2 == *gsDefaultSnap1 && |
|
1094 2 == ((*tierDefaultAP1 & KCDMaskShowRecordId) >> 8) ) |
|
1095 { |
|
1096 SetTestStepResult(EPass); |
|
1097 } |
|
1098 |
|
1099 CleanupStack::PopAndDestroy(tierDefaultAP1); |
|
1100 CleanupStack::PopAndDestroy(gsDefaultSnap1); |
|
1101 } |
|
1102 |
|
1103 CleanupStack::PopAndDestroy(tierDefaultAP); |
|
1104 CleanupStack::PopAndDestroy(gsDefaultSnap); |
|
1105 |
|
1106 return TestStepResult(); |
|
1107 } |
|
1108 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1109 |
|
1110 //---------------------------------------------------------------------------------------------------------------- |
|
1111 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1112 |
|
1113 CCommsdat310Step::~CCommsdat310Step() |
|
1114 /** |
|
1115 * Destructor |
|
1116 */ |
|
1117 { |
|
1118 delete iCDSession_v11; |
|
1119 delete iCDSession_vLatest; |
|
1120 } |
|
1121 |
|
1122 CCommsdat310Step::CCommsdat310Step() |
|
1123 /** |
|
1124 * Constructor |
|
1125 */ |
|
1126 { |
|
1127 SetTestStepName(KCommsdat310Step); |
|
1128 } |
|
1129 |
|
1130 TVerdict CCommsdat310Step::doTestStepPreambleL() |
|
1131 /** |
|
1132 * @return - TVerdict code |
|
1133 * Override of base class pure virtual |
|
1134 */ |
|
1135 { |
|
1136 SetTestStepResult(EFail); |
|
1137 |
|
1138 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1139 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1140 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1141 #else |
|
1142 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1143 #endif |
|
1144 |
|
1145 SetTestStepResult(EPass); |
|
1146 return TestStepResult(); |
|
1147 } |
|
1148 |
|
1149 TVerdict CCommsdat310Step::doTestStepL() |
|
1150 /** |
|
1151 * @return - TVerdict code |
|
1152 * Load the GlobalSettings record. |
|
1153 * This test step is dependent form the CCommsdat309Step!! |
|
1154 */ |
|
1155 { |
|
1156 SetTestStepResult(EFail); |
|
1157 |
|
1158 CCDGlobalSettingsRecord* gsRecord = static_cast<CCDGlobalSettingsRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdGlobalSettingsRecord)); |
|
1159 CCDTierRecord* tierRecord = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
1160 |
|
1161 CleanupStack::PushL(gsRecord); |
|
1162 CleanupStack::PushL(tierRecord); |
|
1163 |
|
1164 gsRecord->SetRecordId(1); |
|
1165 gsRecord->LoadL(*iCDSession_v11); |
|
1166 |
|
1167 tierRecord->SetRecordId(1); |
|
1168 tierRecord->LoadL(*iCDSession_vLatest); |
|
1169 |
|
1170 CMDBRecordLink<CCDAccessPointRecord>* gsDefaultSnap = &(gsRecord->iDefaultSnap); |
|
1171 CMDBRecordLink<CCDAccessPointRecord>* tierDefaultAP = &(tierRecord->iDefaultAccessPoint); |
|
1172 |
|
1173 if ( 2 == *gsDefaultSnap && |
|
1174 2 == ((*tierDefaultAP & KCDMaskShowRecordId) >> 8) ) |
|
1175 { |
|
1176 *gsDefaultSnap = 1; |
|
1177 |
|
1178 gsRecord->ModifyL(*iCDSession_v11); |
|
1179 |
|
1180 gsRecord->SetRecordId(1); |
|
1181 gsRecord->LoadL(*iCDSession_v11); |
|
1182 |
|
1183 tierRecord->SetRecordId(1); |
|
1184 tierRecord->LoadL(*iCDSession_vLatest); |
|
1185 |
|
1186 gsDefaultSnap = &(gsRecord->iDefaultSnap); |
|
1187 tierDefaultAP = &(tierRecord->iDefaultAccessPoint); |
|
1188 |
|
1189 if ( 1 == *gsDefaultSnap && |
|
1190 1 == ((*tierDefaultAP & KCDMaskShowRecordId) >> 8) ) |
|
1191 { |
|
1192 SetTestStepResult(EPass); |
|
1193 } |
|
1194 } |
|
1195 |
|
1196 CleanupStack::PopAndDestroy(tierRecord); |
|
1197 CleanupStack::PopAndDestroy(gsRecord); |
|
1198 |
|
1199 return TestStepResult(); |
|
1200 } |
|
1201 |
|
1202 //IAPPrioritySelectionPolicy mapping |
|
1203 |
|
1204 //---------------------------------------------------------------------------------------------------------------- |
|
1205 |
|
1206 CCommsdat311Step::~CCommsdat311Step() |
|
1207 /** |
|
1208 * Destructor |
|
1209 */ |
|
1210 { |
|
1211 delete iCDSession_v11; |
|
1212 delete iCDSession_vLatest; |
|
1213 } |
|
1214 |
|
1215 CCommsdat311Step::CCommsdat311Step() |
|
1216 /** |
|
1217 * Constructor |
|
1218 */ |
|
1219 { |
|
1220 SetTestStepName(KCommsdat311Step); |
|
1221 } |
|
1222 |
|
1223 TVerdict CCommsdat311Step::doTestStepPreambleL() |
|
1224 /** |
|
1225 * @return - TVerdict code |
|
1226 * Override of base class pure virtual |
|
1227 */ |
|
1228 { |
|
1229 SetTestStepResult(EFail); |
|
1230 |
|
1231 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1232 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1233 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1234 #else |
|
1235 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1236 #endif |
|
1237 |
|
1238 SetTestStepResult(EPass); |
|
1239 return TestStepResult(); |
|
1240 } |
|
1241 |
|
1242 TVerdict CCommsdat311Step::doTestStepL() |
|
1243 /** |
|
1244 * @return - TVerdict code |
|
1245 * Insert 1 more IAP link in to the default IAPPrioritySelectionPolicy record. |
|
1246 */ |
|
1247 { |
|
1248 SetTestStepResult(EFail); |
|
1249 |
|
1250 //first insert the new IAP record. This will trigger the generation of the |
|
1251 //linked link level AP. |
|
1252 _LIT(KIAPName1, "The new IAP"); |
|
1253 _LIT(KModemBearerType, "ModemBearer"); |
|
1254 _LIT(KLANServiceType, "LANService"); |
|
1255 |
|
1256 CCDIAPRecord* newIapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord)); |
|
1257 CleanupStack::PushL(newIapRecord); |
|
1258 |
|
1259 newIapRecord->SetRecordId(KCDNewRecordRequest); |
|
1260 newIapRecord->iRecordName.SetMaxLengthL(KIAPName1().Length()); |
|
1261 newIapRecord->iRecordName = KIAPName1; |
|
1262 newIapRecord->iBearer = 2; |
|
1263 newIapRecord->iBearerType.SetMaxLengthL(KModemBearerType().Length()); |
|
1264 newIapRecord->iBearerType = KModemBearerType; |
|
1265 newIapRecord->iService = 1; |
|
1266 newIapRecord->iServiceType.SetMaxLengthL(KLANServiceType().Length()); |
|
1267 newIapRecord->iServiceType = KLANServiceType; |
|
1268 newIapRecord->iLocation = 2; |
|
1269 newIapRecord->iNetworkWeighting = 14; // dummy value |
|
1270 newIapRecord->iNetwork = 1; |
|
1271 |
|
1272 newIapRecord->StoreL(*iCDSession_v11); |
|
1273 INFO_PRINTF2(_L("newIapRecord stored. Element id is %08x"), newIapRecord->ElementId()); |
|
1274 |
|
1275 //Now read the default IAPPrioritySelectionPolicy record. |
|
1276 CCDIAPPrioritySelectionPolicyRecord *selPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1277 CleanupStack::PushL(selPolRecord); |
|
1278 //We just know that this is the default IAPPrioritySelPol record. |
|
1279 selPolRecord->SetRecordId(1); |
|
1280 |
|
1281 selPolRecord->LoadL(*iCDSession_v11); |
|
1282 |
|
1283 //insert the new IAP link. |
|
1284 selPolRecord->iIap2 = newIapRecord->ElementId(); |
|
1285 selPolRecord->ModifyL(*iCDSession_v11); |
|
1286 |
|
1287 /* |
|
1288 * Now with the 1_1 session let's read the IAPPrioritySelPol record and with the latest session the mapped |
|
1289 * APPrioritySelPol record. The rule is that the recordIDs of the linked IAP records from the IAPPrioritySelPol |
|
1290 * record should be the same as the CustomSelectionPolicy fields of the linked APs from the mapped APPrioritySelPol |
|
1291 * record. |
|
1292 */ |
|
1293 |
|
1294 //Finding out the elementIds because here we create new containers for the loading of those... |
|
1295 TMDBElementId iapSelPolElemId = selPolRecord->ElementId(); |
|
1296 TMDBElementId apSelPolElemId = 0; |
|
1297 |
|
1298 CleanupStack::PopAndDestroy(selPolRecord); |
|
1299 CleanupStack::PopAndDestroy(newIapRecord); |
|
1300 |
|
1301 //search for the mapped APPrioritySelPol record based on the name |
|
1302 CMDBField<TDesC>* appriorityNameField = new (ELeave) CMDBField<TDesC>(KCDTIdApPrioritySelectionPolicyRecord | KCDTIdRecordName); |
|
1303 CleanupStack::PushL(appriorityNameField); |
|
1304 |
|
1305 _LIT(KSelName1, "SelectionPolicy1"); |
|
1306 |
|
1307 appriorityNameField->SetMaxLengthL(KSelName1().Length()); |
|
1308 appriorityNameField->SetL(KSelName1); |
|
1309 |
|
1310 if ( appriorityNameField->FindL(*iCDSession_vLatest) ) |
|
1311 { |
|
1312 apSelPolElemId = appriorityNameField->ElementId(); |
|
1313 |
|
1314 CCDIAPPrioritySelectionPolicyRecord *iapSelPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1315 CleanupStack::PushL(iapSelPolRecord); |
|
1316 |
|
1317 CCDAPPrioritySelectionPolicyRecord *apSelPolRecord = (CCDAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord); |
|
1318 CleanupStack::PushL(apSelPolRecord); |
|
1319 |
|
1320 iapSelPolRecord->SetElementId(iapSelPolElemId); |
|
1321 apSelPolRecord->SetElementId(apSelPolElemId & ~KCDMaskShowFieldType); |
|
1322 |
|
1323 iapSelPolRecord->LoadL(*iCDSession_v11); |
|
1324 apSelPolRecord->LoadL(*iCDSession_vLatest); |
|
1325 |
|
1326 CMDBField<TDesC>* iapSelPolFieldName = &(iapSelPolRecord->iRecordName); |
|
1327 CMDBField<TDesC>* apSelPolFieldName = &(apSelPolRecord->iRecordName); |
|
1328 |
|
1329 TPtrC iapSelPolname(*iapSelPolFieldName); |
|
1330 TPtrC apSelPolname(*apSelPolFieldName); |
|
1331 |
|
1332 if (iapSelPolname == apSelPolname && |
|
1333 iapSelPolRecord->iIapCount == apSelPolRecord->iApCount) |
|
1334 { |
|
1335 //let's check the customSelectionPolicy values of the pointed AP records |
|
1336 //from the APPrioritySelPol record |
|
1337 CMDBField<TInt>* custSelPol = new (ELeave) CMDBField<TInt>(KCDTIdCustomSelectionPolicy); |
|
1338 CleanupStack::PushL(custSelPol); |
|
1339 |
|
1340 CMDBRecordLink<CCDAccessPointRecord>* apXField = &(apSelPolRecord->iAp1); |
|
1341 CMDBRecordLink<CCDIAPRecord>* iapXField = &(iapSelPolRecord->iIap1); |
|
1342 TBool recordIDsAreTheSame = ETrue; |
|
1343 for (TInt i = 1; i <= apSelPolRecord->iApCount && recordIDsAreTheSame; ++i) |
|
1344 { |
|
1345 custSelPol->SetRecordId((*apXField & KCDMaskShowRecordId) >> 8); |
|
1346 custSelPol->LoadL(*iCDSession_vLatest); |
|
1347 if ( *custSelPol != ((*iapXField & KCDMaskShowRecordId) >> 8) ) |
|
1348 { |
|
1349 recordIDsAreTheSame = EFalse; |
|
1350 } |
|
1351 ++apXField; |
|
1352 ++iapXField; |
|
1353 } |
|
1354 |
|
1355 CleanupStack::PopAndDestroy(custSelPol); |
|
1356 |
|
1357 if (recordIDsAreTheSame) |
|
1358 { |
|
1359 SetTestStepResult(EPass); |
|
1360 } |
|
1361 } |
|
1362 |
|
1363 CleanupStack::PopAndDestroy(apSelPolRecord); |
|
1364 CleanupStack::PopAndDestroy(iapSelPolRecord); |
|
1365 } |
|
1366 |
|
1367 CleanupStack::PopAndDestroy(appriorityNameField); |
|
1368 |
|
1369 return TestStepResult(); |
|
1370 } |
|
1371 |
|
1372 //---------------------------------------------------------------------------------------------------------------- |
|
1373 |
|
1374 CCommsdat312Step::~CCommsdat312Step() |
|
1375 /** |
|
1376 * Destructor |
|
1377 */ |
|
1378 { |
|
1379 delete iCDSession_v11; |
|
1380 delete iCDSession_vLatest; |
|
1381 } |
|
1382 |
|
1383 CCommsdat312Step::CCommsdat312Step() |
|
1384 /** |
|
1385 * Constructor |
|
1386 */ |
|
1387 { |
|
1388 SetTestStepName(KCommsdat312Step); |
|
1389 } |
|
1390 |
|
1391 TVerdict CCommsdat312Step::doTestStepPreambleL() |
|
1392 /** |
|
1393 * @return - TVerdict code |
|
1394 * Override of base class pure virtual |
|
1395 */ |
|
1396 { |
|
1397 SetTestStepResult(EFail); |
|
1398 |
|
1399 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1400 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1401 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1402 #else |
|
1403 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1404 #endif |
|
1405 |
|
1406 SetTestStepResult(EPass); |
|
1407 return TestStepResult(); |
|
1408 } |
|
1409 |
|
1410 TVerdict CCommsdat312Step::doTestStepL() |
|
1411 /** |
|
1412 * @return - TVerdict code |
|
1413 * Insert 1 IAP link is deleted form the IAPPrioritySelectionPolicy record, inserted |
|
1414 * in the previous test step. |
|
1415 * This test ste is dependent from CCommsdat312Step |
|
1416 */ |
|
1417 { |
|
1418 SetTestStepResult(EFail); |
|
1419 |
|
1420 CCDIAPPrioritySelectionPolicyRecord *selPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1421 CleanupStack::PushL(selPolRecord); |
|
1422 //We just know that this is the 2nd record. |
|
1423 selPolRecord->SetRecordId(2); |
|
1424 |
|
1425 selPolRecord->LoadL(*iCDSession_v11); |
|
1426 |
|
1427 //and now let's remove the 2nd IAP link so this will cause a 'hole' in the IAP links in the record. |
|
1428 selPolRecord->iIap2 = 0; |
|
1429 |
|
1430 selPolRecord->ModifyL(*iCDSession_v11); |
|
1431 |
|
1432 //Finding out the elementIds because here we create new containers for the loading of those... |
|
1433 TMDBElementId iapSelPolElemId = selPolRecord->ElementId(); |
|
1434 TMDBElementId apSelPolElemId = 0; |
|
1435 |
|
1436 CleanupStack::PopAndDestroy(selPolRecord); |
|
1437 |
|
1438 //search for the mapped APPrioritySelPol record based on the name |
|
1439 CMDBField<TDesC>* appriorityNameField = new (ELeave) CMDBField<TDesC>(KCDTIdApPrioritySelectionPolicyRecord | KCDTIdRecordName); |
|
1440 CleanupStack::PushL(appriorityNameField); |
|
1441 |
|
1442 _LIT(KSelName1, "SelectionPolicy2"); |
|
1443 |
|
1444 appriorityNameField->SetMaxLengthL(KSelName1().Length()); |
|
1445 appriorityNameField->SetL(KSelName1); |
|
1446 |
|
1447 if ( appriorityNameField->FindL(*iCDSession_vLatest) ) |
|
1448 { |
|
1449 apSelPolElemId = appriorityNameField->ElementId(); |
|
1450 |
|
1451 CCDIAPPrioritySelectionPolicyRecord *iapSelPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1452 CleanupStack::PushL(iapSelPolRecord); |
|
1453 |
|
1454 CCDAPPrioritySelectionPolicyRecord *apSelPolRecord = (CCDAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord); |
|
1455 CleanupStack::PushL(apSelPolRecord); |
|
1456 |
|
1457 iapSelPolRecord->SetElementId(iapSelPolElemId); |
|
1458 apSelPolRecord->SetElementId(apSelPolElemId & ~KCDMaskShowFieldType); |
|
1459 |
|
1460 iapSelPolRecord->LoadL(*iCDSession_v11); |
|
1461 apSelPolRecord->LoadL(*iCDSession_vLatest); |
|
1462 |
|
1463 CMDBField<TDesC>* iapSelPolFieldName = &(iapSelPolRecord->iRecordName); |
|
1464 CMDBField<TDesC>* apSelPolFieldName = &(apSelPolRecord->iRecordName); |
|
1465 |
|
1466 TPtrC iapSelPolname(*iapSelPolFieldName); |
|
1467 TPtrC apSelPolname(*apSelPolFieldName); |
|
1468 |
|
1469 if (iapSelPolname == apSelPolname && |
|
1470 iapSelPolRecord->iIapCount == apSelPolRecord->iApCount) |
|
1471 { |
|
1472 //let's check the customSelectionPolicy values of the pointed AP records |
|
1473 //from the APPrioritySelPol record |
|
1474 CMDBField<TInt>* custSelPol = new (ELeave) CMDBField<TInt>(KCDTIdCustomSelectionPolicy); |
|
1475 CleanupStack::PushL(custSelPol); |
|
1476 |
|
1477 CMDBRecordLink<CCDAccessPointRecord>* apXField = &(apSelPolRecord->iAp1); |
|
1478 CMDBRecordLink<CCDIAPRecord>* iapXField = &(iapSelPolRecord->iIap1); |
|
1479 TBool recordIDsAreTheSame = ETrue; |
|
1480 TInt err = 0; |
|
1481 for (TInt i = 1; i <= apSelPolRecord->iApCount && recordIDsAreTheSame; ++i) |
|
1482 { |
|
1483 custSelPol->SetRecordId((*apXField & KCDMaskShowRecordId) >> 8); |
|
1484 TRAP(err, custSelPol->LoadL(*iCDSession_vLatest)); |
|
1485 if (KErrNotFound == err && *iapXField == 0 && *apXField == 0) |
|
1486 { |
|
1487 //it's ok |
|
1488 recordIDsAreTheSame = ETrue; |
|
1489 } |
|
1490 else if ( *custSelPol != ((*iapXField & KCDMaskShowRecordId) >> 8) ) |
|
1491 { |
|
1492 recordIDsAreTheSame = EFalse; |
|
1493 } |
|
1494 ++apXField; |
|
1495 ++iapXField; |
|
1496 } |
|
1497 |
|
1498 CleanupStack::PopAndDestroy(custSelPol); |
|
1499 |
|
1500 if (recordIDsAreTheSame) |
|
1501 { |
|
1502 SetTestStepResult(EPass); |
|
1503 } |
|
1504 } |
|
1505 |
|
1506 CleanupStack::PopAndDestroy(apSelPolRecord); |
|
1507 CleanupStack::PopAndDestroy(iapSelPolRecord); |
|
1508 } |
|
1509 |
|
1510 CleanupStack::PopAndDestroy(appriorityNameField); |
|
1511 |
|
1512 return TestStepResult(); |
|
1513 } |
|
1514 |
|
1515 //---------------------------------------------------------------------------------------------------------------- |
|
1516 |
|
1517 CCommsdat313Step::~CCommsdat313Step() |
|
1518 /** |
|
1519 * Destructor |
|
1520 */ |
|
1521 { |
|
1522 delete iCDSession_v11; |
|
1523 delete iCDSession_vLatest; |
|
1524 } |
|
1525 |
|
1526 CCommsdat313Step::CCommsdat313Step() |
|
1527 /** |
|
1528 * Constructor |
|
1529 */ |
|
1530 { |
|
1531 SetTestStepName(KCommsdat313Step); |
|
1532 } |
|
1533 |
|
1534 TVerdict CCommsdat313Step::doTestStepPreambleL() |
|
1535 /** |
|
1536 * @return - TVerdict code |
|
1537 * Override of base class pure virtual |
|
1538 */ |
|
1539 { |
|
1540 SetTestStepResult(EFail); |
|
1541 |
|
1542 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1543 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1544 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1545 #else |
|
1546 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1547 #endif |
|
1548 |
|
1549 SetTestStepResult(EPass); |
|
1550 return TestStepResult(); |
|
1551 } |
|
1552 |
|
1553 TVerdict CCommsdat313Step::doTestStepL() |
|
1554 /** |
|
1555 * @return - TVerdict code |
|
1556 * Delete 1 IAPPriorirytSelPol record form the DB - not the default one... |
|
1557 */ |
|
1558 { |
|
1559 SetTestStepResult(EFail); |
|
1560 |
|
1561 CCDIAPPrioritySelectionPolicyRecord *iapSelPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1562 CleanupStack::PushL(iapSelPolRecord); |
|
1563 //We just know that this is the 2nd record. |
|
1564 iapSelPolRecord->SetRecordId(2); |
|
1565 |
|
1566 iapSelPolRecord->LoadL(*iCDSession_v11); |
|
1567 |
|
1568 CCDAPPrioritySelectionPolicyRecord *apSelPolRecord = (CCDAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord); |
|
1569 CleanupStack::PushL(apSelPolRecord); |
|
1570 |
|
1571 apSelPolRecord->SetRecordId(iapSelPolRecord->RecordId()); |
|
1572 apSelPolRecord->LoadL(*iCDSession_vLatest); |
|
1573 |
|
1574 RArray<TInt> linkedIAPIds; |
|
1575 CleanupClosePushL(linkedIAPIds); |
|
1576 |
|
1577 CMDBRecordLink<CCDAccessPointRecord>* apXLink = &(apSelPolRecord->iAp1); |
|
1578 |
|
1579 for (TInt i = 1; i <= apSelPolRecord->iApCount; ++i) |
|
1580 { |
|
1581 linkedIAPIds.Append(*apXLink); |
|
1582 ++apXLink; |
|
1583 } |
|
1584 |
|
1585 iapSelPolRecord->DeleteL(*iCDSession_v11); |
|
1586 |
|
1587 //from this point none the original IAPPrioritySelPol record, nor the mapped APPrioritySelPol record |
|
1588 //should be available. However all of the linked AP records from the APPrioritySelPol |
|
1589 //should be available because as originally there were more thna 1 links to each. |
|
1590 TInt err = 0; |
|
1591 |
|
1592 TRAP(err, iapSelPolRecord->LoadL(*iCDSession_v11)); |
|
1593 if (KErrNotFound == err) |
|
1594 { |
|
1595 TRAP(err, apSelPolRecord->LoadL(*iCDSession_vLatest)); |
|
1596 if (KErrNotFound == err) |
|
1597 { |
|
1598 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
1599 CleanupStack::PushL(apRec); |
|
1600 |
|
1601 TInt i = 0; |
|
1602 |
|
1603 err = KErrNone; |
|
1604 |
|
1605 for (i = 0; (i < linkedIAPIds.Count()) && (KErrNone == err); ++i) |
|
1606 { |
|
1607 apRec->SetElementId(linkedIAPIds[i]); |
|
1608 TRAP(err, apRec->LoadL(*iCDSession_vLatest)); |
|
1609 } |
|
1610 |
|
1611 CleanupStack::PopAndDestroy(apRec); |
|
1612 |
|
1613 if (KErrNone == err && |
|
1614 i == linkedIAPIds.Count() ) |
|
1615 { |
|
1616 SetTestStepResult(EPass); |
|
1617 } |
|
1618 } |
|
1619 } |
|
1620 |
|
1621 CleanupStack::PopAndDestroy(&linkedIAPIds); |
|
1622 CleanupStack::PopAndDestroy(apSelPolRecord); |
|
1623 CleanupStack::PopAndDestroy(iapSelPolRecord); |
|
1624 |
|
1625 return TestStepResult(); |
|
1626 } |
|
1627 |
|
1628 //---------------------------------------------------------------------------------------------------------------- |
|
1629 |
|
1630 CCommsdat314Step::~CCommsdat314Step() |
|
1631 /** |
|
1632 * Destructor |
|
1633 */ |
|
1634 { |
|
1635 delete iCDSession_v11; |
|
1636 delete iCDSession_vLatest; |
|
1637 } |
|
1638 |
|
1639 CCommsdat314Step::CCommsdat314Step() |
|
1640 /** |
|
1641 * Constructor |
|
1642 */ |
|
1643 { |
|
1644 SetTestStepName(KCommsdat314Step); |
|
1645 } |
|
1646 |
|
1647 TVerdict CCommsdat314Step::doTestStepPreambleL() |
|
1648 /** |
|
1649 * @return - TVerdict code |
|
1650 * Override of base class pure virtual |
|
1651 */ |
|
1652 { |
|
1653 SetTestStepResult(EFail); |
|
1654 |
|
1655 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1656 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1657 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1658 #else |
|
1659 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1660 #endif |
|
1661 |
|
1662 SetTestStepResult(EPass); |
|
1663 return TestStepResult(); |
|
1664 } |
|
1665 |
|
1666 TVerdict CCommsdat314Step::doTestStepL() |
|
1667 /** |
|
1668 * @return - TVerdict code |
|
1669 * Delete 1 IAPPriorirytSelPol record form the DB - now the default one... |
|
1670 */ |
|
1671 { |
|
1672 SetTestStepResult(EFail); |
|
1673 |
|
1674 CCDIAPPrioritySelectionPolicyRecord *iapSelPolRecord = (CCDIAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord); |
|
1675 CleanupStack::PushL(iapSelPolRecord); |
|
1676 //We just know that this is the 1st record. |
|
1677 iapSelPolRecord->SetRecordId(1); |
|
1678 |
|
1679 iapSelPolRecord->LoadL(*iCDSession_v11); |
|
1680 |
|
1681 CCDAPPrioritySelectionPolicyRecord *apSelPolRecord = (CCDAPPrioritySelectionPolicyRecord *)CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord); |
|
1682 CleanupStack::PushL(apSelPolRecord); |
|
1683 |
|
1684 apSelPolRecord->SetRecordId(iapSelPolRecord->RecordId()); |
|
1685 apSelPolRecord->LoadL(*iCDSession_vLatest); |
|
1686 |
|
1687 RArray<TInt> linkedIAPIds; |
|
1688 CleanupClosePushL(linkedIAPIds); |
|
1689 |
|
1690 CMDBRecordLink<CCDAccessPointRecord>* apXLink = &(apSelPolRecord->iAp1); |
|
1691 |
|
1692 for (TInt i = 1; i <= apSelPolRecord->iApCount; ++i) |
|
1693 { |
|
1694 linkedIAPIds.Append(*apXLink); |
|
1695 ++apXLink; |
|
1696 } |
|
1697 |
|
1698 iapSelPolRecord->DeleteL(*iCDSession_v11); |
|
1699 |
|
1700 //from this point none the original IAPPrioritySelPol record, nor the mapped APPrioritySelPol record |
|
1701 //can be read. The IPProto TierRecord should point to the default IPProto AP (form the meshpreface file) |
|
1702 TInt err = 0; |
|
1703 |
|
1704 TRAP(err, iapSelPolRecord->LoadL(*iCDSession_v11)); |
|
1705 if (KErrNotFound == err) |
|
1706 { |
|
1707 TRAP(err, apSelPolRecord->LoadL(*iCDSession_vLatest)); |
|
1708 if (KErrNotFound == err) |
|
1709 { |
|
1710 //default IPProto Tier has to point to the default IPProto AP |
|
1711 CCDAccessPointRecord* defIPProtoAPRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
1712 CleanupStack::PushL(defIPProtoAPRec); |
|
1713 |
|
1714 defIPProtoAPRec->iCustomSelectionPolicy = CCDAccessPointRecord::KNoPolicy; |
|
1715 if (defIPProtoAPRec->FindL(*iCDSession_vLatest)) |
|
1716 { |
|
1717 TPtrC recName(defIPProtoAPRec->iRecordName); |
|
1718 _LIT(KIPProtoDefRecName, "IPProtoDefault"); |
|
1719 |
|
1720 if (0 == recName.Compare(KIPProtoDefRecName)) |
|
1721 { |
|
1722 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
1723 CleanupStack::PushL(ipprotoTierRec); |
|
1724 |
|
1725 //we just know that the given record is the 2nd one (it's possible to do a FindL based |
|
1726 //on the IPProto tagId) |
|
1727 ipprotoTierRec->SetRecordId(2); |
|
1728 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
1729 |
|
1730 if (ipprotoTierRec->iDefaultAccessPoint == (defIPProtoAPRec->ElementId() & ~KCDMaskShowFieldType)) |
|
1731 { |
|
1732 //based on the base configuration no IPProto AP should be deleted... |
|
1733 |
|
1734 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
1735 CleanupStack::PushL(apRec); |
|
1736 |
|
1737 TInt i = 0; |
|
1738 |
|
1739 TInt err = KErrNone; |
|
1740 |
|
1741 for (i = 0; (i < linkedIAPIds.Count()) && (KErrNone == err); ++i) |
|
1742 { |
|
1743 apRec->SetElementId(linkedIAPIds[i]); |
|
1744 TRAP(err, apRec->LoadL(*iCDSession_vLatest)); |
|
1745 } |
|
1746 |
|
1747 CleanupStack::PopAndDestroy(apRec); |
|
1748 |
|
1749 if (KErrNone == err && |
|
1750 i == linkedIAPIds.Count() ) |
|
1751 { |
|
1752 SetTestStepResult(EPass); |
|
1753 } |
|
1754 } |
|
1755 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
1756 } |
|
1757 } |
|
1758 |
|
1759 CleanupStack::PopAndDestroy(defIPProtoAPRec); |
|
1760 } |
|
1761 } |
|
1762 |
|
1763 CleanupStack::PopAndDestroy(&linkedIAPIds); |
|
1764 CleanupStack::PopAndDestroy(apSelPolRecord); |
|
1765 CleanupStack::PopAndDestroy(iapSelPolRecord); |
|
1766 |
|
1767 return TestStepResult(); |
|
1768 } |
|
1769 |
|
1770 //---------------------------------------------------------------------------------------------------------------- |
|
1771 |
|
1772 CCommsdat315Step::~CCommsdat315Step() |
|
1773 /** |
|
1774 * Destructor |
|
1775 */ |
|
1776 { |
|
1777 delete iCDSession_v11; |
|
1778 delete iCDSession_vLatest; |
|
1779 } |
|
1780 |
|
1781 CCommsdat315Step::CCommsdat315Step() |
|
1782 /** |
|
1783 * Constructor |
|
1784 */ |
|
1785 { |
|
1786 SetTestStepName(KCommsdat315Step); |
|
1787 } |
|
1788 |
|
1789 TVerdict CCommsdat315Step::doTestStepPreambleL() |
|
1790 /** |
|
1791 * @return - TVerdict code |
|
1792 * Override of base class pure virtual |
|
1793 */ |
|
1794 { |
|
1795 SetTestStepResult(EFail); |
|
1796 |
|
1797 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1798 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1799 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
1800 #else |
|
1801 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
1802 #endif |
|
1803 |
|
1804 SetTestStepResult(EPass); |
|
1805 return TestStepResult(); |
|
1806 } |
|
1807 |
|
1808 TVerdict CCommsdat315Step::doTestStepL() |
|
1809 /** |
|
1810 * @return - TVerdict code |
|
1811 * Modify 1 IAP link through a field container in the 2nd IAPPriorirytSelPol record. |
|
1812 */ |
|
1813 { |
|
1814 SetTestStepResult(EFail); |
|
1815 |
|
1816 CCDIAPRecord* linkedIAP = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord)); |
|
1817 CleanupStack::PushL(linkedIAP); |
|
1818 |
|
1819 linkedIAP->SetRecordId(3); |
|
1820 linkedIAP->LoadL(*iCDSession_v11); |
|
1821 |
|
1822 CMDBRecordLink<CCDIAPRecord>* iap5Link = new(ELeave) CMDBRecordLink<CCDIAPRecord>(KCDTIdIap5); |
|
1823 CleanupStack::PushL(iap5Link); |
|
1824 |
|
1825 iap5Link->SetRecordId(2); |
|
1826 *iap5Link = linkedIAP->ElementId(); |
|
1827 |
|
1828 //now modify the 2nd IAPPrioritySelPol record through a link container |
|
1829 iap5Link->ModifyL(*iCDSession_v11); |
|
1830 |
|
1831 CleanupStack::PopAndDestroy(iap5Link); |
|
1832 CleanupStack::PopAndDestroy(linkedIAP); |
|
1833 |
|
1834 //check the results... |
|
1835 CCDIAPPrioritySelectionPolicyRecord* iapSelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
1836 CleanupStack::PushL(iapSelPolRec); |
|
1837 |
|
1838 CCDAPPrioritySelectionPolicyRecord* apSelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
1839 CleanupStack::PushL(apSelPolRec); |
|
1840 |
|
1841 iapSelPolRec->SetRecordId(2); |
|
1842 apSelPolRec->SetRecordId(2); |
|
1843 |
|
1844 iapSelPolRec->LoadL(*iCDSession_v11); |
|
1845 apSelPolRec->LoadL(*iCDSession_vLatest); |
|
1846 |
|
1847 CMDBField<TDesC>* iapSelPolFieldName = &(iapSelPolRec->iRecordName); |
|
1848 CMDBField<TDesC>* apSelPolFieldName = &(apSelPolRec->iRecordName); |
|
1849 |
|
1850 TPtrC iapSelPolname(*iapSelPolFieldName); |
|
1851 TPtrC apSelPolname(*apSelPolFieldName); |
|
1852 |
|
1853 if (iapSelPolname == apSelPolname && |
|
1854 iapSelPolRec->iIapCount == apSelPolRec->iApCount) |
|
1855 { |
|
1856 //let's check the customSelectionPolicy values of the pointed AP records |
|
1857 //from the APPrioritySelPol record |
|
1858 CMDBField<TInt>* custSelPol = new (ELeave) CMDBField<TInt>(KCDTIdCustomSelectionPolicy); |
|
1859 CleanupStack::PushL(custSelPol); |
|
1860 |
|
1861 CMDBRecordLink<CCDAccessPointRecord>* apXField = &(apSelPolRec->iAp1); |
|
1862 CMDBRecordLink<CCDIAPRecord>* iapXField = &(iapSelPolRec->iIap1); |
|
1863 TBool recordIDsAreTheSame = ETrue; |
|
1864 |
|
1865 for (TInt i = 1; i <= apSelPolRec->iApCount && recordIDsAreTheSame; ++i) |
|
1866 { |
|
1867 if (4 == i) |
|
1868 { |
|
1869 //if we read the 4th link to LoadL should be called |
|
1870 if ((0 != *iapXField) || (0 != *apXField)) |
|
1871 { |
|
1872 //the AP4/IAP4 links have to 0! |
|
1873 recordIDsAreTheSame = EFalse; |
|
1874 break; |
|
1875 } |
|
1876 } |
|
1877 else |
|
1878 { |
|
1879 custSelPol->SetRecordId((*apXField & KCDMaskShowRecordId) >> 8); |
|
1880 custSelPol->LoadL(*iCDSession_vLatest); |
|
1881 |
|
1882 if ( *custSelPol != ((*iapXField & KCDMaskShowRecordId) >> 8) ) |
|
1883 { |
|
1884 recordIDsAreTheSame = EFalse; |
|
1885 } |
|
1886 } |
|
1887 ++apXField; |
|
1888 ++iapXField; |
|
1889 } |
|
1890 |
|
1891 CleanupStack::PopAndDestroy(custSelPol); |
|
1892 |
|
1893 if (recordIDsAreTheSame) |
|
1894 { |
|
1895 SetTestStepResult(EPass); |
|
1896 } |
|
1897 } |
|
1898 |
|
1899 CleanupStack::PopAndDestroy(apSelPolRec); |
|
1900 CleanupStack::PopAndDestroy(iapSelPolRec); |
|
1901 return TestStepResult(); |
|
1902 } |
|
1903 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1904 |
|
1905 //---------------------------------------------------------------------------------------------------------------- |
|
1906 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1907 |
|
1908 CCommsdat316Step::~CCommsdat316Step() |
|
1909 /** |
|
1910 * Destructor |
|
1911 */ |
|
1912 { |
|
1913 delete iCDSession_v11; |
|
1914 delete iCDSession_vLatest; |
|
1915 } |
|
1916 |
|
1917 CCommsdat316Step::CCommsdat316Step() |
|
1918 /** |
|
1919 * Constructor |
|
1920 */ |
|
1921 { |
|
1922 SetTestStepName(KCommsdat316Step); |
|
1923 } |
|
1924 |
|
1925 TVerdict CCommsdat316Step::doTestStepPreambleL() |
|
1926 /** |
|
1927 * @return - TVerdict code |
|
1928 * Override of base class pure virtual |
|
1929 */ |
|
1930 { |
|
1931 SetTestStepResult(EFail); |
|
1932 |
|
1933 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
1934 iCDSession_vLatest = NULL; |
|
1935 |
|
1936 SetTestStepResult(EPass); |
|
1937 return TestStepResult(); |
|
1938 } |
|
1939 |
|
1940 TVerdict CCommsdat316Step::doTestStepL() |
|
1941 /** |
|
1942 * @return - TVerdict code |
|
1943 * Find an IAPPrioritySelPol record based on an IAP link value... |
|
1944 * find that link in the IAP/APSelPol table. |
|
1945 */ |
|
1946 { |
|
1947 SetTestStepResult(EFail); |
|
1948 |
|
1949 |
|
1950 CMDBRecordLink<CCDIAPRecord>* iap5Link = new(ELeave) CMDBRecordLink<CCDIAPRecord>(KCDTIdIap5); |
|
1951 CleanupStack::PushL(iap5Link); |
|
1952 |
|
1953 iap5Link->SetRecordId(2); |
|
1954 *iap5Link = 1; |
|
1955 |
|
1956 iap5Link->ModifyL(*iCDSession_v11); |
|
1957 |
|
1958 CleanupStack::PopAndDestroy(iap5Link); |
|
1959 |
|
1960 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
1961 CleanupStack::PushL(selPolRecord); |
|
1962 |
|
1963 selPolRecord->iIap5 = 1; |
|
1964 |
|
1965 if (selPolRecord->FindL(*iCDSession_v11)) |
|
1966 { |
|
1967 SetTestStepResult(EPass); |
|
1968 } |
|
1969 |
|
1970 CleanupStack::PopAndDestroy(selPolRecord); |
|
1971 |
|
1972 |
|
1973 return TestStepResult(); |
|
1974 } |
|
1975 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1976 |
|
1977 //---------------------------------------------------------------------------------------------------------------- |
|
1978 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
1979 |
|
1980 CCommsdat317Step::~CCommsdat317Step() |
|
1981 /** |
|
1982 * Destructor |
|
1983 */ |
|
1984 { |
|
1985 delete iCDSession_v11; |
|
1986 delete iCDSession_vLatest; |
|
1987 } |
|
1988 |
|
1989 CCommsdat317Step::CCommsdat317Step() |
|
1990 /** |
|
1991 * Constructor |
|
1992 */ |
|
1993 { |
|
1994 SetTestStepName(KCommsdat317Step); |
|
1995 } |
|
1996 |
|
1997 TVerdict CCommsdat317Step::doTestStepPreambleL() |
|
1998 /** |
|
1999 * @return - TVerdict code |
|
2000 * Override of base class pure virtual |
|
2001 */ |
|
2002 { |
|
2003 SetTestStepResult(EFail); |
|
2004 |
|
2005 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2006 iCDSession_vLatest = NULL; |
|
2007 |
|
2008 SetTestStepResult(EPass); |
|
2009 return TestStepResult(); |
|
2010 } |
|
2011 |
|
2012 TVerdict CCommsdat317Step::doTestStepL() |
|
2013 /** |
|
2014 * @return - TVerdict code |
|
2015 * Find an IAPPrioritySelPol field based on an IAP link value... |
|
2016 */ |
|
2017 { |
|
2018 SetTestStepResult(EFail); |
|
2019 |
|
2020 CMDBRecordLink<CCDIAPRecord>* iapLinkField = new(ELeave) CMDBRecordLink<CCDIAPRecord>(KCDTIdIap3); |
|
2021 CleanupStack::PushL(iapLinkField); |
|
2022 |
|
2023 //this means - give me back the first IAPPrioritySelPol field which has the value of 3 |
|
2024 *iapLinkField = 3; |
|
2025 |
|
2026 if (iapLinkField->FindL(*iCDSession_v11)) |
|
2027 { |
|
2028 SetTestStepResult(EPass); |
|
2029 } |
|
2030 |
|
2031 CleanupStack::PopAndDestroy(iapLinkField); |
|
2032 |
|
2033 |
|
2034 return TestStepResult(); |
|
2035 } |
|
2036 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
2037 |
|
2038 //---------------------------------------------------------------------------------------------------------------- |
|
2039 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
2040 |
|
2041 CCommsdat318Step::~CCommsdat318Step() |
|
2042 /** |
|
2043 * Destructor |
|
2044 */ |
|
2045 { |
|
2046 delete iCDSession_v11; |
|
2047 delete iCDSession_vLatest; |
|
2048 } |
|
2049 |
|
2050 CCommsdat318Step::CCommsdat318Step() |
|
2051 /** |
|
2052 * Constructor |
|
2053 */ |
|
2054 { |
|
2055 SetTestStepName(KCommsdat318Step); |
|
2056 } |
|
2057 |
|
2058 TVerdict CCommsdat318Step::doTestStepPreambleL() |
|
2059 /** |
|
2060 * @return - TVerdict code |
|
2061 * Override of base class pure virtual |
|
2062 */ |
|
2063 { |
|
2064 SetTestStepResult(EFail); |
|
2065 |
|
2066 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2067 iCDSession_vLatest = NULL; |
|
2068 |
|
2069 SetTestStepResult(EPass); |
|
2070 return TestStepResult(); |
|
2071 } |
|
2072 |
|
2073 TVerdict CCommsdat318Step::doTestStepL() |
|
2074 /** |
|
2075 * @return - TVerdict code |
|
2076 * Load an IAPPrioritySelPol field... |
|
2077 */ |
|
2078 { |
|
2079 SetTestStepResult(EFail); |
|
2080 |
|
2081 CMDBRecordLink<CCDIAPRecord>* iapLinkField = new(ELeave) CMDBRecordLink<CCDIAPRecord>(KCDTIdIap3); |
|
2082 CleanupStack::PushL(iapLinkField); |
|
2083 |
|
2084 iapLinkField->SetRecordId(2); |
|
2085 |
|
2086 iapLinkField->LoadL(*iCDSession_v11); |
|
2087 |
|
2088 //there is no leave so it's ok |
|
2089 |
|
2090 SetTestStepResult(EPass); |
|
2091 |
|
2092 CleanupStack::PopAndDestroy(iapLinkField); |
|
2093 |
|
2094 return TestStepResult(); |
|
2095 } |
|
2096 |
|
2097 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
2098 |
|
2099 //---------------------------------------------------------------------------------------------------------------- |
|
2100 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
2101 |
|
2102 CCommsdat319Step::~CCommsdat319Step() |
|
2103 /** |
|
2104 * Destructor |
|
2105 */ |
|
2106 { |
|
2107 delete iCDSession_v11; |
|
2108 delete iCDSession_vLatest; |
|
2109 } |
|
2110 |
|
2111 CCommsdat319Step::CCommsdat319Step() |
|
2112 /** |
|
2113 * Constructor |
|
2114 */ |
|
2115 { |
|
2116 SetTestStepName(KCommsdat319Step); |
|
2117 } |
|
2118 |
|
2119 TVerdict CCommsdat319Step::doTestStepPreambleL() |
|
2120 /** |
|
2121 * @return - TVerdict code |
|
2122 * Override of base class pure virtual |
|
2123 */ |
|
2124 { |
|
2125 SetTestStepResult(EFail); |
|
2126 |
|
2127 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2128 iCDSession_vLatest = NULL; |
|
2129 |
|
2130 SetTestStepResult(EPass); |
|
2131 return TestStepResult(); |
|
2132 } |
|
2133 |
|
2134 TVerdict CCommsdat319Step::doTestStepL() |
|
2135 /** |
|
2136 * @return - TVerdict code |
|
2137 * Delete an IAPPrioritySelPol field... |
|
2138 */ |
|
2139 { |
|
2140 SetTestStepResult(EFail); |
|
2141 |
|
2142 CMDBRecordLink<CCDIAPRecord>* iapLinkField = new(ELeave) CMDBRecordLink<CCDIAPRecord>(KCDTIdIap3); |
|
2143 CleanupStack::PushL(iapLinkField); |
|
2144 |
|
2145 iapLinkField->SetRecordId(2); |
|
2146 |
|
2147 iapLinkField->DeleteL(*iCDSession_v11); |
|
2148 |
|
2149 //there is no leave so it's ok |
|
2150 |
|
2151 SetTestStepResult(EPass); |
|
2152 |
|
2153 CleanupStack::PopAndDestroy(iapLinkField); |
|
2154 |
|
2155 return TestStepResult(); |
|
2156 } |
|
2157 |
|
2158 //---------------------------------------------------------------------------------------------------------------- |
|
2159 |
|
2160 CCommsdat320Step::~CCommsdat320Step() |
|
2161 /** |
|
2162 * Destructor |
|
2163 */ |
|
2164 { |
|
2165 delete iCDSession_v11; |
|
2166 delete iCDSession_vLatest; |
|
2167 } |
|
2168 |
|
2169 CCommsdat320Step::CCommsdat320Step() |
|
2170 /** |
|
2171 * Constructor |
|
2172 */ |
|
2173 { |
|
2174 SetTestStepName(KCommsdat320Step); |
|
2175 } |
|
2176 |
|
2177 TVerdict CCommsdat320Step::doTestStepPreambleL() |
|
2178 /** |
|
2179 * @return - TVerdict code |
|
2180 * Override of base class pure virtual |
|
2181 */ |
|
2182 { |
|
2183 SetTestStepResult(EFail); |
|
2184 |
|
2185 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2186 iCDSession_vLatest = NULL; |
|
2187 |
|
2188 SetTestStepResult(EPass); |
|
2189 return TestStepResult(); |
|
2190 } |
|
2191 |
|
2192 TVerdict CCommsdat320Step::doTestStepL() |
|
2193 /** |
|
2194 * @return - TVerdict code |
|
2195 * Changing the IAPCount in the IAPPrioritySelPol table and then read it back |
|
2196 */ |
|
2197 { |
|
2198 SetTestStepResult(EFail); |
|
2199 |
|
2200 CMDBField<TUint32>* iapCount = new(ELeave) CMDBField<TUint32>(KCDTIdIapCount); |
|
2201 CleanupStack::PushL(iapCount); |
|
2202 |
|
2203 iapCount->SetRecordId(2); |
|
2204 *iapCount = 2; |
|
2205 |
|
2206 iapCount->ModifyL(*iCDSession_v11); |
|
2207 |
|
2208 CleanupStack::PopAndDestroy(iapCount); |
|
2209 |
|
2210 CMDBField<TUint32>* iapCount1 = new(ELeave) CMDBField<TUint32>(KCDTIdIapCount); |
|
2211 CleanupStack::PushL(iapCount1); |
|
2212 |
|
2213 iapCount1->SetRecordId(2); |
|
2214 iapCount1->LoadL(*iCDSession_v11); |
|
2215 if (2 == *iapCount1) |
|
2216 { |
|
2217 SetTestStepResult(EPass); |
|
2218 } |
|
2219 |
|
2220 CleanupStack::PopAndDestroy(iapCount1); |
|
2221 |
|
2222 return TestStepResult(); |
|
2223 } |
|
2224 |
|
2225 // AccessPoint mapping |
|
2226 |
|
2227 //---------------------------------------------------------------------------------------------------------------- |
|
2228 |
|
2229 CCommsdat321Step::~CCommsdat321Step() |
|
2230 /** |
|
2231 * Destructor |
|
2232 */ |
|
2233 { |
|
2234 delete iCDSession_v11; |
|
2235 delete iCDSession_vLatest; |
|
2236 } |
|
2237 |
|
2238 CCommsdat321Step::CCommsdat321Step() |
|
2239 /** |
|
2240 * Constructor |
|
2241 */ |
|
2242 { |
|
2243 SetTestStepName(KCommsdat321Step); |
|
2244 } |
|
2245 |
|
2246 TVerdict CCommsdat321Step::doTestStepPreambleL() |
|
2247 /** |
|
2248 * @return - TVerdict code |
|
2249 * Override of base class pure virtual |
|
2250 */ |
|
2251 { |
|
2252 SetTestStepResult(EFail); |
|
2253 |
|
2254 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2255 iCDSession_vLatest = NULL; |
|
2256 |
|
2257 SetTestStepResult(EPass); |
|
2258 return TestStepResult(); |
|
2259 } |
|
2260 |
|
2261 TVerdict CCommsdat321Step::doTestStepL() |
|
2262 /** |
|
2263 * @return - TVerdict code |
|
2264 * Modify the accesspointSelectionPolicy field in the 2nd AccessPoint record |
|
2265 * to point to the 3rd IAPPrioritySelPol record. Modification is made through |
|
2266 * a record container. |
|
2267 */ |
|
2268 { |
|
2269 SetTestStepResult(EFail); |
|
2270 |
|
2271 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
2272 CleanupStack::PushL(selPolRecord); |
|
2273 |
|
2274 selPolRecord->SetRecordId(3); |
|
2275 selPolRecord->LoadL(*iCDSession_v11); |
|
2276 |
|
2277 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2278 CleanupStack::PushL(apRec); |
|
2279 |
|
2280 apRec->SetRecordId(2); |
|
2281 apRec->LoadL(*iCDSession_v11); |
|
2282 |
|
2283 apRec->iSelectionPolicy = selPolRecord->ElementId(); |
|
2284 |
|
2285 apRec->ModifyL(*iCDSession_v11); |
|
2286 |
|
2287 CleanupStack::PopAndDestroy(apRec); |
|
2288 CleanupStack::PopAndDestroy(selPolRecord); |
|
2289 |
|
2290 CCDAccessPointRecord* apRec1 = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2291 CleanupStack::PushL(apRec1); |
|
2292 |
|
2293 apRec1->SetRecordId(2); |
|
2294 apRec1->LoadL(*iCDSession_v11); |
|
2295 |
|
2296 CMDBRecordLink<CCDSelectionPolicyRecordBase>* selPolField = &(apRec1->iSelectionPolicy); |
|
2297 |
|
2298 if ( 3 == ((*selPolField & KCDMaskShowRecordId) >> 8) ) |
|
2299 { |
|
2300 SetTestStepResult(EPass); |
|
2301 } |
|
2302 |
|
2303 CleanupStack::PopAndDestroy(apRec1); |
|
2304 |
|
2305 return TestStepResult(); |
|
2306 } |
|
2307 |
|
2308 //---------------------------------------------------------------------------------------------------------------- |
|
2309 |
|
2310 CCommsdat322Step::~CCommsdat322Step() |
|
2311 /** |
|
2312 * Destructor |
|
2313 */ |
|
2314 { |
|
2315 delete iCDSession_v11; |
|
2316 delete iCDSession_vLatest; |
|
2317 } |
|
2318 |
|
2319 CCommsdat322Step::CCommsdat322Step() |
|
2320 /** |
|
2321 * Constructor |
|
2322 */ |
|
2323 { |
|
2324 SetTestStepName(KCommsdat322Step); |
|
2325 } |
|
2326 |
|
2327 TVerdict CCommsdat322Step::doTestStepPreambleL() |
|
2328 /** |
|
2329 * @return - TVerdict code |
|
2330 * Override of base class pure virtual |
|
2331 */ |
|
2332 { |
|
2333 SetTestStepResult(EFail); |
|
2334 |
|
2335 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2336 iCDSession_vLatest = NULL; |
|
2337 |
|
2338 SetTestStepResult(EPass); |
|
2339 return TestStepResult(); |
|
2340 } |
|
2341 |
|
2342 TVerdict CCommsdat322Step::doTestStepL() |
|
2343 /** |
|
2344 * @return - TVerdict code |
|
2345 * Modify the accesspointSelectionPolicy field in the 3rd AccessPoint record |
|
2346 * to point to the 4th IAPPrioritySelPol record. Modification is made through |
|
2347 * a record container but this time without filling the GID field. |
|
2348 */ |
|
2349 { |
|
2350 SetTestStepResult(EFail); |
|
2351 |
|
2352 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
2353 CleanupStack::PushL(selPolRecord); |
|
2354 |
|
2355 selPolRecord->SetRecordId(4); |
|
2356 selPolRecord->LoadL(*iCDSession_v11); |
|
2357 |
|
2358 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2359 CleanupStack::PushL(apRec); |
|
2360 |
|
2361 apRec->SetRecordId(3); |
|
2362 apRec->iSelectionPolicy = selPolRecord->ElementId(); |
|
2363 |
|
2364 apRec->ModifyL(*iCDSession_v11); |
|
2365 |
|
2366 CleanupStack::PopAndDestroy(apRec); |
|
2367 CleanupStack::PopAndDestroy(selPolRecord); |
|
2368 |
|
2369 |
|
2370 CCDAccessPointRecord* apRec1 = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2371 CleanupStack::PushL(apRec1); |
|
2372 |
|
2373 apRec1->SetRecordId(3); |
|
2374 apRec1->LoadL(*iCDSession_v11); |
|
2375 |
|
2376 CMDBRecordLink<CCDSelectionPolicyRecordBase>* selPolField = &(apRec1->iSelectionPolicy); |
|
2377 |
|
2378 if (4 == ((KCDMaskShowRecordId & (*selPolField)) >> 8) && |
|
2379 KCDTIdIapPrioritySelectionPolicyRecord == (KCDMaskShowRecordType & (*selPolField)) ) |
|
2380 { |
|
2381 SetTestStepResult(EPass); |
|
2382 } |
|
2383 |
|
2384 CleanupStack::PopAndDestroy(apRec1); |
|
2385 |
|
2386 return TestStepResult(); |
|
2387 } |
|
2388 |
|
2389 //---------------------------------------------------------------------------------------------------------------- |
|
2390 |
|
2391 CCommsdat323Step::~CCommsdat323Step() |
|
2392 /** |
|
2393 * Destructor |
|
2394 */ |
|
2395 { |
|
2396 delete iCDSession_v11; |
|
2397 delete iCDSession_vLatest; |
|
2398 } |
|
2399 |
|
2400 CCommsdat323Step::CCommsdat323Step() |
|
2401 /** |
|
2402 * Constructor |
|
2403 */ |
|
2404 { |
|
2405 SetTestStepName(KCommsdat323Step); |
|
2406 } |
|
2407 |
|
2408 TVerdict CCommsdat323Step::doTestStepPreambleL() |
|
2409 /** |
|
2410 * @return - TVerdict code |
|
2411 * Override of base class pure virtual |
|
2412 */ |
|
2413 { |
|
2414 SetTestStepResult(EFail); |
|
2415 |
|
2416 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2417 iCDSession_vLatest = NULL; |
|
2418 |
|
2419 SetTestStepResult(EPass); |
|
2420 return TestStepResult(); |
|
2421 } |
|
2422 |
|
2423 TVerdict CCommsdat323Step::doTestStepL() |
|
2424 /** |
|
2425 * @return - TVerdict code |
|
2426 * Modify the accesspointSelectionPolicy field in the 3rd AccessPoint record |
|
2427 * to point to the 4th IAPPrioritySelPol record. Modification is made through |
|
2428 * a field container. |
|
2429 */ |
|
2430 { |
|
2431 SetTestStepResult(EFail); |
|
2432 |
|
2433 CCDIAPPrioritySelectionPolicyRecord* selPolRecord = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
2434 CleanupStack::PushL(selPolRecord); |
|
2435 |
|
2436 selPolRecord->SetRecordId(4); |
|
2437 selPolRecord->LoadL(*iCDSession_v11); |
|
2438 |
|
2439 CMDBRecordLink<CCDSelectionPolicyRecordBase>* apSelPolField = new(ELeave)CMDBRecordLink<CCDSelectionPolicyRecordBase>(KCDTIdSelectionPolicy); |
|
2440 CleanupStack::PushL(apSelPolField); |
|
2441 |
|
2442 apSelPolField->SetRecordId(3); |
|
2443 *apSelPolField = selPolRecord->ElementId(); |
|
2444 |
|
2445 apSelPolField->ModifyL(*iCDSession_v11); |
|
2446 |
|
2447 CleanupStack::PopAndDestroy(apSelPolField); |
|
2448 CleanupStack::PopAndDestroy(selPolRecord); |
|
2449 |
|
2450 |
|
2451 CMDBRecordLink<CCDSelectionPolicyRecordBase>* apSelPolField1 = new(ELeave)CMDBRecordLink<CCDSelectionPolicyRecordBase>(KCDTIdSelectionPolicy); |
|
2452 CleanupStack::PushL(apSelPolField1); |
|
2453 |
|
2454 apSelPolField1->SetRecordId(3); |
|
2455 apSelPolField1->LoadL(*iCDSession_v11); |
|
2456 |
|
2457 if (4 == ((KCDMaskShowRecordId & (*apSelPolField1)) >> 8) && |
|
2458 KCDTIdIapPrioritySelectionPolicyRecord == (KCDMaskShowRecordType & (*apSelPolField1)) ) |
|
2459 { |
|
2460 SetTestStepResult(EPass); |
|
2461 } |
|
2462 |
|
2463 CleanupStack::PopAndDestroy(apSelPolField1); |
|
2464 |
|
2465 return TestStepResult(); |
|
2466 } |
|
2467 |
|
2468 //---------------------------------------------------------------------------------------------------------------- |
|
2469 |
|
2470 CCommsdat324Step::~CCommsdat324Step() |
|
2471 /** |
|
2472 * Destructor |
|
2473 */ |
|
2474 { |
|
2475 delete iCDSession_v11; |
|
2476 delete iCDSession_vLatest; |
|
2477 } |
|
2478 |
|
2479 CCommsdat324Step::CCommsdat324Step() |
|
2480 /** |
|
2481 * Constructor |
|
2482 */ |
|
2483 { |
|
2484 SetTestStepName(KCommsdat324Step); |
|
2485 } |
|
2486 |
|
2487 TVerdict CCommsdat324Step::doTestStepPreambleL() |
|
2488 /** |
|
2489 * @return - TVerdict code |
|
2490 * Override of base class pure virtual |
|
2491 */ |
|
2492 { |
|
2493 SetTestStepResult(EFail); |
|
2494 |
|
2495 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2496 iCDSession_vLatest = NULL; |
|
2497 |
|
2498 SetTestStepResult(EPass); |
|
2499 return TestStepResult(); |
|
2500 } |
|
2501 |
|
2502 TVerdict CCommsdat324Step::doTestStepL() |
|
2503 /** |
|
2504 * @return - TVerdict code |
|
2505 * Modify the GID field to the value of 2. Modification is made through |
|
2506 * a field container. |
|
2507 */ |
|
2508 { |
|
2509 SetTestStepResult(EFail); |
|
2510 CMDBField<TInt>* gidField = new(ELeave)CMDBField<TInt>(KCDTIdAccessPointGID); |
|
2511 CleanupStack::PushL(gidField); |
|
2512 |
|
2513 gidField->SetRecordId(1); |
|
2514 *gidField = 2; |
|
2515 |
|
2516 TRAPD(err, gidField->ModifyL(*iCDSession_v11)); |
|
2517 if (KErrArgument == err) |
|
2518 { |
|
2519 SetTestStepResult(EPass); |
|
2520 } |
|
2521 |
|
2522 CleanupStack::PopAndDestroy(gidField); |
|
2523 return TestStepResult(); |
|
2524 } |
|
2525 |
|
2526 //---------------------------------------------------------------------------------------------------------------- |
|
2527 |
|
2528 CCommsdat325Step::~CCommsdat325Step() |
|
2529 /** |
|
2530 * Destructor |
|
2531 */ |
|
2532 { |
|
2533 delete iCDSession_v11; |
|
2534 delete iCDSession_vLatest; |
|
2535 } |
|
2536 |
|
2537 CCommsdat325Step::CCommsdat325Step() |
|
2538 /** |
|
2539 * Constructor |
|
2540 */ |
|
2541 { |
|
2542 SetTestStepName(KCommsdat325Step); |
|
2543 } |
|
2544 |
|
2545 TVerdict CCommsdat325Step::doTestStepPreambleL() |
|
2546 /** |
|
2547 * @return - TVerdict code |
|
2548 * Override of base class pure virtual |
|
2549 */ |
|
2550 { |
|
2551 SetTestStepResult(EFail); |
|
2552 |
|
2553 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2554 iCDSession_vLatest = NULL; |
|
2555 |
|
2556 SetTestStepResult(EPass); |
|
2557 return TestStepResult(); |
|
2558 } |
|
2559 |
|
2560 TVerdict CCommsdat325Step::doTestStepL() |
|
2561 /** |
|
2562 * @return - TVerdict code |
|
2563 * Modify the name field of the 1st accesspointRec. Modification is made through |
|
2564 * a field container. (this is field is not mapped) |
|
2565 */ |
|
2566 { |
|
2567 SetTestStepResult(EFail); |
|
2568 _LIT(KName, "Changed AP name field"); |
|
2569 |
|
2570 CMDBField<TDesC>* name = new(ELeave)CMDBField<TDesC>(KCDTIdAccessPointRecord | KCDTIdRecordName); |
|
2571 CleanupStack::PushL(name); |
|
2572 |
|
2573 name->SetRecordId(1); |
|
2574 name->SetMaxLengthL(KName().Length()); |
|
2575 name->SetL(KName); |
|
2576 |
|
2577 name->ModifyL(*iCDSession_v11); |
|
2578 |
|
2579 CleanupStack::PopAndDestroy(name); |
|
2580 |
|
2581 CMDBField<TDesC>* name1 = new(ELeave)CMDBField<TDesC>(KCDTIdAccessPointRecord | KCDTIdRecordName); |
|
2582 CleanupStack::PushL(name1); |
|
2583 |
|
2584 name1->SetMaxLengthL(KName().Length()); |
|
2585 name1->SetL(KName); |
|
2586 |
|
2587 if ( name1->FindL(*iCDSession_v11) ) |
|
2588 { |
|
2589 TPtrC name(*name1); |
|
2590 if (0 == name.Compare(KName)) |
|
2591 { |
|
2592 SetTestStepResult(EPass); |
|
2593 } |
|
2594 } |
|
2595 |
|
2596 CleanupStack::PopAndDestroy(name1); |
|
2597 |
|
2598 return TestStepResult(); |
|
2599 } |
|
2600 |
|
2601 //---------------------------------------------------------------------------------------------------------------- |
|
2602 |
|
2603 CCommsdat326Step::~CCommsdat326Step() |
|
2604 /** |
|
2605 * Destructor |
|
2606 */ |
|
2607 { |
|
2608 delete iCDSession_v11; |
|
2609 delete iCDSession_vLatest; |
|
2610 } |
|
2611 |
|
2612 CCommsdat326Step::CCommsdat326Step() |
|
2613 /** |
|
2614 * Constructor |
|
2615 */ |
|
2616 { |
|
2617 SetTestStepName(KCommsdat326Step); |
|
2618 } |
|
2619 |
|
2620 TVerdict CCommsdat326Step::doTestStepPreambleL() |
|
2621 /** |
|
2622 * @return - TVerdict code |
|
2623 * Override of base class pure virtual |
|
2624 */ |
|
2625 { |
|
2626 SetTestStepResult(EFail); |
|
2627 |
|
2628 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2629 iCDSession_vLatest = NULL; |
|
2630 |
|
2631 SetTestStepResult(EPass); |
|
2632 return TestStepResult(); |
|
2633 } |
|
2634 |
|
2635 TVerdict CCommsdat326Step::doTestStepL() |
|
2636 /** |
|
2637 * @return - TVerdict code |
|
2638 * Modify the GID field to the value of 2. Modification is made through |
|
2639 * a record container. |
|
2640 */ |
|
2641 { |
|
2642 SetTestStepResult(EFail); |
|
2643 |
|
2644 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2645 CleanupStack::PushL(apRecord); |
|
2646 |
|
2647 apRecord->SetRecordId(1); |
|
2648 apRecord->iAccessPointGID = 2; |
|
2649 |
|
2650 TRAPD(err, apRecord->ModifyL(*iCDSession_v11)); |
|
2651 |
|
2652 if (KErrArgument == err) |
|
2653 { |
|
2654 SetTestStepResult(EPass); |
|
2655 } |
|
2656 |
|
2657 CleanupStack::PopAndDestroy(apRecord); |
|
2658 |
|
2659 return TestStepResult(); |
|
2660 } |
|
2661 |
|
2662 //---------------------------------------------------------------------------------------------------------------- |
|
2663 |
|
2664 CCommsdat327Step::~CCommsdat327Step() |
|
2665 /** |
|
2666 * Destructor |
|
2667 */ |
|
2668 { |
|
2669 delete iCDSession_v11; |
|
2670 delete iCDSession_vLatest; |
|
2671 } |
|
2672 |
|
2673 CCommsdat327Step::CCommsdat327Step() |
|
2674 /** |
|
2675 * Constructor |
|
2676 */ |
|
2677 { |
|
2678 SetTestStepName(KCommsdat327Step); |
|
2679 } |
|
2680 |
|
2681 TVerdict CCommsdat327Step::doTestStepPreambleL() |
|
2682 /** |
|
2683 * @return - TVerdict code |
|
2684 * Override of base class pure virtual |
|
2685 */ |
|
2686 { |
|
2687 SetTestStepResult(EFail); |
|
2688 |
|
2689 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2690 iCDSession_vLatest = NULL; |
|
2691 |
|
2692 SetTestStepResult(EPass); |
|
2693 return TestStepResult(); |
|
2694 } |
|
2695 |
|
2696 TVerdict CCommsdat327Step::doTestStepL() |
|
2697 /** |
|
2698 * @return - TVerdict code |
|
2699 * Modify the name field of the 1st accesspointRec. Modification is made through |
|
2700 * a record container. (this is field is not mapped) |
|
2701 */ |
|
2702 { |
|
2703 SetTestStepResult(EFail); |
|
2704 |
|
2705 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2706 CleanupStack::PushL(apRecord); |
|
2707 |
|
2708 apRecord->SetRecordId(1); |
|
2709 |
|
2710 _LIT(KName, "Changed AP name field"); |
|
2711 apRecord->iRecordName.SetMaxLengthL(KName().Length()); |
|
2712 apRecord->iRecordName.SetL(KName); |
|
2713 |
|
2714 apRecord->ModifyL(*iCDSession_v11); |
|
2715 |
|
2716 CleanupStack::PopAndDestroy(apRecord); |
|
2717 |
|
2718 |
|
2719 CCDAccessPointRecord* apRecord1 = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2720 CleanupStack::PushL(apRecord1); |
|
2721 |
|
2722 apRecord1->iRecordName.SetMaxLengthL(KName().Length()); |
|
2723 apRecord1->iRecordName.SetL(KName); |
|
2724 |
|
2725 if (apRecord1->FindL(*iCDSession_v11)) |
|
2726 { |
|
2727 TPtrC name(apRecord1->iRecordName); |
|
2728 if (0 == name.Compare(KName)) |
|
2729 { |
|
2730 SetTestStepResult(EPass); |
|
2731 } |
|
2732 } |
|
2733 |
|
2734 CleanupStack::PopAndDestroy(apRecord); |
|
2735 |
|
2736 return TestStepResult(); |
|
2737 } |
|
2738 |
|
2739 //---------------------------------------------------------------------------------------------------------------- |
|
2740 |
|
2741 CCommsdat328Step::~CCommsdat328Step() |
|
2742 /** |
|
2743 * Destructor |
|
2744 */ |
|
2745 { |
|
2746 delete iCDSession_v11; |
|
2747 delete iCDSession_vLatest; |
|
2748 } |
|
2749 |
|
2750 CCommsdat328Step::CCommsdat328Step() |
|
2751 /** |
|
2752 * Constructor |
|
2753 */ |
|
2754 { |
|
2755 SetTestStepName(KCommsdat328Step); |
|
2756 } |
|
2757 |
|
2758 TVerdict CCommsdat328Step::doTestStepPreambleL() |
|
2759 /** |
|
2760 * @return - TVerdict code |
|
2761 * Override of base class pure virtual |
|
2762 */ |
|
2763 { |
|
2764 SetTestStepResult(EFail); |
|
2765 |
|
2766 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2767 iCDSession_vLatest = NULL; |
|
2768 |
|
2769 SetTestStepResult(EPass); |
|
2770 return TestStepResult(); |
|
2771 } |
|
2772 |
|
2773 TVerdict CCommsdat328Step::doTestStepL() |
|
2774 /** |
|
2775 * @return - TVerdict code |
|
2776 * Find the 1st AP record based on the linked IAPPrioritySelPol elementId. The find is made |
|
2777 * through a record container. |
|
2778 */ |
|
2779 { |
|
2780 SetTestStepResult(EFail); |
|
2781 |
|
2782 CCDAccessPointRecord* apRecord = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2783 CleanupStack::PushL(apRecord); |
|
2784 |
|
2785 apRecord->iSelectionPolicy = (KCDTIdIapPrioritySelectionPolicyRecord | (1 << 8)); |
|
2786 |
|
2787 if (apRecord->FindL(*iCDSession_v11)) |
|
2788 { |
|
2789 TPtrC recName(apRecord->iRecordName); |
|
2790 _LIT(KRecName, "SNAP1"); |
|
2791 |
|
2792 if (1 == apRecord->RecordId() && |
|
2793 0 == recName.Compare(KRecName)) |
|
2794 { |
|
2795 SetTestStepResult(EPass); |
|
2796 } |
|
2797 } |
|
2798 |
|
2799 CleanupStack::PopAndDestroy(apRecord); |
|
2800 |
|
2801 return TestStepResult(); |
|
2802 } |
|
2803 |
|
2804 //---------------------------------------------------------------------------------------------------------------- |
|
2805 |
|
2806 CCommsdat329Step::~CCommsdat329Step() |
|
2807 /** |
|
2808 * Destructor |
|
2809 */ |
|
2810 { |
|
2811 delete iCDSession_v11; |
|
2812 delete iCDSession_vLatest; |
|
2813 } |
|
2814 |
|
2815 CCommsdat329Step::CCommsdat329Step() |
|
2816 /** |
|
2817 * Constructor |
|
2818 */ |
|
2819 { |
|
2820 SetTestStepName(KCommsdat329Step); |
|
2821 } |
|
2822 |
|
2823 TVerdict CCommsdat329Step::doTestStepPreambleL() |
|
2824 /** |
|
2825 * @return - TVerdict code |
|
2826 * Override of base class pure virtual |
|
2827 */ |
|
2828 { |
|
2829 SetTestStepResult(EFail); |
|
2830 |
|
2831 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2832 iCDSession_vLatest = NULL; |
|
2833 |
|
2834 SetTestStepResult(EPass); |
|
2835 return TestStepResult(); |
|
2836 } |
|
2837 |
|
2838 TVerdict CCommsdat329Step::doTestStepL() |
|
2839 /** |
|
2840 * @return - TVerdict code |
|
2841 * Find the 1st AP record based on the linked IAPPrioritySelPol elementId. The find is made |
|
2842 * through a field container. |
|
2843 */ |
|
2844 { |
|
2845 SetTestStepResult(EFail); |
|
2846 CMDBRecordLink<CCDSelectionPolicyRecordBase>* selPolField = new(ELeave)CMDBRecordLink<CCDSelectionPolicyRecordBase>(KCDTIdSelectionPolicy); |
|
2847 CleanupStack::PushL(selPolField); |
|
2848 |
|
2849 *selPolField = (KCDTIdIapPrioritySelectionPolicyRecord | (1 << 8)); |
|
2850 if (selPolField->FindL(*iCDSession_v11)) |
|
2851 { |
|
2852 if (1 == selPolField->RecordId()) |
|
2853 { |
|
2854 SetTestStepResult(EPass); |
|
2855 } |
|
2856 } |
|
2857 |
|
2858 CleanupStack::PopAndDestroy(selPolField); |
|
2859 |
|
2860 return TestStepResult(); |
|
2861 } |
|
2862 |
|
2863 //---------------------------------------------------------------------------------------------------------------- |
|
2864 |
|
2865 CCommsdat330Step::~CCommsdat330Step() |
|
2866 /** |
|
2867 * Destructor |
|
2868 */ |
|
2869 { |
|
2870 delete iCDSession_v11; |
|
2871 delete iCDSession_vLatest; |
|
2872 } |
|
2873 |
|
2874 CCommsdat330Step::CCommsdat330Step() |
|
2875 /** |
|
2876 * Constructor |
|
2877 */ |
|
2878 { |
|
2879 SetTestStepName(KCommsdat330Step); |
|
2880 } |
|
2881 |
|
2882 TVerdict CCommsdat330Step::doTestStepPreambleL() |
|
2883 /** |
|
2884 * @return - TVerdict code |
|
2885 * Override of base class pure virtual |
|
2886 */ |
|
2887 { |
|
2888 SetTestStepResult(EFail); |
|
2889 |
|
2890 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2891 iCDSession_vLatest = NULL; |
|
2892 |
|
2893 SetTestStepResult(EPass); |
|
2894 return TestStepResult(); |
|
2895 } |
|
2896 |
|
2897 TVerdict CCommsdat330Step::doTestStepL() |
|
2898 /** |
|
2899 * @return - TVerdict code |
|
2900 * Delete the selPol link in the 1st AP record. The delete is made through a field container. |
|
2901 */ |
|
2902 { |
|
2903 SetTestStepResult(EFail); |
|
2904 CMDBRecordLink<CCDSelectionPolicyRecordBase>* selPolField = new(ELeave)CMDBRecordLink<CCDSelectionPolicyRecordBase>(KCDTIdSelectionPolicy); |
|
2905 CleanupStack::PushL(selPolField); |
|
2906 |
|
2907 selPolField->SetRecordId(1); |
|
2908 |
|
2909 selPolField->DeleteL(*iCDSession_v11); |
|
2910 |
|
2911 CleanupStack::PopAndDestroy(selPolField); |
|
2912 |
|
2913 |
|
2914 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2915 CleanupStack::PushL(apRec); |
|
2916 |
|
2917 apRec->SetRecordId(1); |
|
2918 apRec->LoadL(*iCDSession_v11); |
|
2919 |
|
2920 if (NULL == apRec->iSelectionPolicy) |
|
2921 { |
|
2922 SetTestStepResult(EPass); |
|
2923 } |
|
2924 |
|
2925 CleanupStack::PopAndDestroy(apRec); |
|
2926 |
|
2927 return TestStepResult(); |
|
2928 } |
|
2929 |
|
2930 //---------------------------------------------------------------------------------------------------------------- |
|
2931 |
|
2932 CCommsdat331Step::~CCommsdat331Step() |
|
2933 /** |
|
2934 * Destructor |
|
2935 */ |
|
2936 { |
|
2937 delete iCDSession_v11; |
|
2938 delete iCDSession_vLatest; |
|
2939 } |
|
2940 |
|
2941 CCommsdat331Step::CCommsdat331Step() |
|
2942 /** |
|
2943 * Constructor |
|
2944 */ |
|
2945 { |
|
2946 SetTestStepName(KCommsdat331Step); |
|
2947 } |
|
2948 |
|
2949 TVerdict CCommsdat331Step::doTestStepPreambleL() |
|
2950 /** |
|
2951 * @return - TVerdict code |
|
2952 * Override of base class pure virtual |
|
2953 */ |
|
2954 { |
|
2955 SetTestStepResult(EFail); |
|
2956 |
|
2957 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
2958 iCDSession_vLatest = NULL; |
|
2959 |
|
2960 SetTestStepResult(EPass); |
|
2961 return TestStepResult(); |
|
2962 } |
|
2963 |
|
2964 TVerdict CCommsdat331Step::doTestStepL() |
|
2965 /** |
|
2966 * @return - TVerdict code |
|
2967 * Delete the 2nd AP record. The delete is made through a record container. |
|
2968 */ |
|
2969 { |
|
2970 SetTestStepResult(EFail); |
|
2971 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2972 CleanupStack::PushL(apRec); |
|
2973 |
|
2974 apRec->SetRecordId(2); |
|
2975 apRec->DeleteL(*iCDSession_v11); |
|
2976 |
|
2977 CleanupStack::PopAndDestroy(apRec); |
|
2978 |
|
2979 CCDAccessPointRecord* apRec1 = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
2980 CleanupStack::PushL(apRec1); |
|
2981 |
|
2982 apRec1->SetRecordId(2); |
|
2983 apRec1->LoadL(*iCDSession_v11); |
|
2984 |
|
2985 if ( NULL == apRec1->iAccessPointGID && |
|
2986 NULL == apRec1->iSelectionPolicy ) |
|
2987 { |
|
2988 //although LoadL didn't leave no data is read from the database. |
|
2989 SetTestStepResult(EPass); |
|
2990 } |
|
2991 |
|
2992 CleanupStack::PopAndDestroy(apRec1); |
|
2993 |
|
2994 return TestStepResult(); |
|
2995 } |
|
2996 |
|
2997 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
2998 //---------------------------------------------------------------------------------------------------------------- |
|
2999 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3000 |
|
3001 CCommsdat3311Step::~CCommsdat3311Step() |
|
3002 /** |
|
3003 * Destructor |
|
3004 */ |
|
3005 { |
|
3006 delete iCDSession_v11; |
|
3007 delete iCDSession_vLatest; |
|
3008 } |
|
3009 |
|
3010 CCommsdat3311Step::CCommsdat3311Step() |
|
3011 /** |
|
3012 * Constructor |
|
3013 */ |
|
3014 { |
|
3015 SetTestStepName(KCommsdat3311Step); |
|
3016 } |
|
3017 |
|
3018 TVerdict CCommsdat3311Step::doTestStepPreambleL() |
|
3019 /** |
|
3020 * @return - TVerdict code |
|
3021 * Override of base class pure virtual |
|
3022 */ |
|
3023 { |
|
3024 SetTestStepResult(EFail); |
|
3025 |
|
3026 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3027 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3028 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3029 #else |
|
3030 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3031 #endif |
|
3032 |
|
3033 SetTestStepResult(EPass); |
|
3034 return TestStepResult(); |
|
3035 } |
|
3036 |
|
3037 TVerdict CCommsdat3311Step::doTestStepL() |
|
3038 /** |
|
3039 * @return - TVerdict code |
|
3040 * Insert a new IAP link into the record one - the same as IAP1. |
|
3041 * Insert is called on a field container. |
|
3042 * |
|
3043 * No new IPProto AP should be generated and the new link should be inserted into |
|
3044 * the record. |
|
3045 */ |
|
3046 { |
|
3047 SetTestStepResult(EFail); |
|
3048 |
|
3049 const TInt KIPProtoTierLink = 0x11800200; |
|
3050 |
|
3051 CMDBField<TInt>* iap2Link = new(ELeave)CMDBField<TInt>(KCDTIdIap2); |
|
3052 CleanupStack::PushL(iap2Link); |
|
3053 |
|
3054 iap2Link->SetRecordId(1); |
|
3055 *iap2Link = 1; |
|
3056 iap2Link->ModifyL(*iCDSession_v11); |
|
3057 |
|
3058 //The IPProto AP number is 4 because we have 3 generated APs and |
|
3059 //we have the default one as well in the DB... |
|
3060 if ( 4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest) ) |
|
3061 { |
|
3062 CCDIAPPrioritySelectionPolicyRecord* iapSelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
3063 CleanupStack::PushL(iapSelPolRec); |
|
3064 |
|
3065 iapSelPolRec->SetRecordId(1); |
|
3066 iapSelPolRec->LoadL(*iCDSession_v11); |
|
3067 |
|
3068 TInt iap1 = iapSelPolRec->iIap1; |
|
3069 TInt iap2 = iapSelPolRec->iIap2; |
|
3070 |
|
3071 if (iap1 == iap2 && |
|
3072 2 == iapSelPolRec->iIapCount) |
|
3073 { |
|
3074 SetTestStepResult(EPass); |
|
3075 } |
|
3076 |
|
3077 CleanupStack::PopAndDestroy(iapSelPolRec); |
|
3078 } |
|
3079 |
|
3080 CleanupStack::PopAndDestroy(iap2Link); |
|
3081 return TestStepResult(); |
|
3082 } |
|
3083 |
|
3084 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3085 |
|
3086 //---------------------------------------------------------------------------------------------------------------- |
|
3087 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3088 |
|
3089 CCommsdat3312Step::~CCommsdat3312Step() |
|
3090 /** |
|
3091 * Destructor |
|
3092 */ |
|
3093 { |
|
3094 delete iCDSession_v11; |
|
3095 delete iCDSession_vLatest; |
|
3096 } |
|
3097 |
|
3098 CCommsdat3312Step::CCommsdat3312Step() |
|
3099 /** |
|
3100 * Constructor |
|
3101 */ |
|
3102 { |
|
3103 SetTestStepName(KCommsdat3312Step); |
|
3104 } |
|
3105 |
|
3106 TVerdict CCommsdat3312Step::doTestStepPreambleL() |
|
3107 /** |
|
3108 * @return - TVerdict code |
|
3109 * Override of base class pure virtual |
|
3110 */ |
|
3111 { |
|
3112 SetTestStepResult(EFail); |
|
3113 |
|
3114 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3115 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3116 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3117 #else |
|
3118 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3119 #endif |
|
3120 |
|
3121 SetTestStepResult(EPass); |
|
3122 return TestStepResult(); |
|
3123 } |
|
3124 |
|
3125 TVerdict CCommsdat3312Step::doTestStepL() |
|
3126 /** |
|
3127 * @return - TVerdict code |
|
3128 * Now deleted the previously inserted IAP link form the record one. |
|
3129 * |
|
3130 * No IPProto AP should be deleted only the link |
|
3131 */ |
|
3132 { |
|
3133 SetTestStepResult(EFail); |
|
3134 |
|
3135 const TInt KIPProtoTierLink = 0x11800200; |
|
3136 |
|
3137 CMDBField<TInt>* iap2Link = new(ELeave)CMDBField<TInt>(KCDTIdIap2); |
|
3138 CleanupStack::PushL(iap2Link); |
|
3139 |
|
3140 iap2Link->SetRecordId(1); |
|
3141 //*iap2Link = 1; |
|
3142 iap2Link->DeleteL(*iCDSession_v11); |
|
3143 |
|
3144 CleanupStack::PopAndDestroy(iap2Link); |
|
3145 |
|
3146 //The IPProto AP number is 4 because we have 3 generated APs and |
|
3147 //we have the default one as well in the DB... |
|
3148 if ( 4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest) ) |
|
3149 { |
|
3150 CCDIAPPrioritySelectionPolicyRecord* iapSelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
3151 CleanupStack::PushL(iapSelPolRec); |
|
3152 |
|
3153 iapSelPolRec->SetRecordId(1); |
|
3154 iapSelPolRec->LoadL(*iCDSession_v11); |
|
3155 |
|
3156 TInt iap1 = iapSelPolRec->iIap1; |
|
3157 TInt iap2 = iapSelPolRec->iIap2; |
|
3158 |
|
3159 if (iap1 && |
|
3160 NULL == iap2 && |
|
3161 1 == iapSelPolRec->iIapCount) |
|
3162 { |
|
3163 SetTestStepResult(EPass); |
|
3164 } |
|
3165 |
|
3166 CleanupStack::PopAndDestroy(iapSelPolRec); |
|
3167 } |
|
3168 |
|
3169 return TestStepResult(); |
|
3170 } |
|
3171 |
|
3172 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3173 //---------------------------------------------------------------------------------------------------------------- |
|
3174 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3175 |
|
3176 CCommsdat3313Step::~CCommsdat3313Step() |
|
3177 /** |
|
3178 * Destructor |
|
3179 */ |
|
3180 { |
|
3181 delete iCDSession_v11; |
|
3182 delete iCDSession_vLatest; |
|
3183 } |
|
3184 |
|
3185 CCommsdat3313Step::CCommsdat3313Step() |
|
3186 /** |
|
3187 * Constructor |
|
3188 */ |
|
3189 { |
|
3190 SetTestStepName(KCommsdat3313Step); |
|
3191 } |
|
3192 |
|
3193 TVerdict CCommsdat3313Step::doTestStepPreambleL() |
|
3194 /** |
|
3195 * @return - TVerdict code |
|
3196 * Override of base class pure virtual |
|
3197 */ |
|
3198 { |
|
3199 SetTestStepResult(EFail); |
|
3200 |
|
3201 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3202 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3203 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3204 #else |
|
3205 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3206 #endif |
|
3207 |
|
3208 SetTestStepResult(EPass); |
|
3209 return TestStepResult(); |
|
3210 } |
|
3211 |
|
3212 TVerdict CCommsdat3313Step::doTestStepL() |
|
3213 /** |
|
3214 * @return - TVerdict code |
|
3215 * Delete the default IAPPrioritySelPol record. As a result the default IPProto |
|
3216 * AP should be linked from the IPProto Tier record and from the defualt APPriotySelPol record. |
|
3217 * The default APPrioritySelPol record should be linked form the Network default AP. |
|
3218 */ |
|
3219 { |
|
3220 SetTestStepResult(EFail); |
|
3221 |
|
3222 const TInt KIPProtoTierLink = 0x11800200; |
|
3223 |
|
3224 CCDIAPPrioritySelectionPolicyRecord* defIAPPrioritySelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
3225 CleanupStack::PushL(defIAPPrioritySelPolRec); |
|
3226 //we just know form the config file that the default IAPPrioritySelPol rec is the 1st one |
|
3227 |
|
3228 defIAPPrioritySelPolRec->SetRecordId(1); |
|
3229 defIAPPrioritySelPolRec->DeleteL(*iCDSession_v11); |
|
3230 |
|
3231 CleanupStack::PopAndDestroy(defIAPPrioritySelPolRec); |
|
3232 |
|
3233 CCDAccessPointRecord* ipprotoDefAPRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3234 CleanupStack::PushL(ipprotoDefAPRec); |
|
3235 |
|
3236 ipprotoDefAPRec->iCustomSelectionPolicy = CCDAccessPointRecord::KNoPolicy; |
|
3237 ipprotoDefAPRec->FindL(*iCDSession_vLatest); |
|
3238 |
|
3239 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3240 CleanupStack::PushL(ipprotoTierRec); |
|
3241 |
|
3242 ipprotoTierRec->SetElementId(KIPProtoTierLink); |
|
3243 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3244 |
|
3245 if (ipprotoTierRec->iDefaultAccessPoint == (ipprotoDefAPRec->ElementId() & ~KCDMaskShowFieldType)) |
|
3246 { |
|
3247 SetTestStepResult(EPass); |
|
3248 } |
|
3249 |
|
3250 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3251 CleanupStack::PopAndDestroy(ipprotoDefAPRec); |
|
3252 |
|
3253 return TestStepResult(); |
|
3254 } |
|
3255 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3256 |
|
3257 //---------------------------------------------------------------------------------------------------------------- |
|
3258 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3259 |
|
3260 CCommsdat3314Step::~CCommsdat3314Step() |
|
3261 /** |
|
3262 * Destructor |
|
3263 */ |
|
3264 { |
|
3265 delete iCDSession_v11; |
|
3266 delete iCDSession_vLatest; |
|
3267 } |
|
3268 |
|
3269 CCommsdat3314Step::CCommsdat3314Step() |
|
3270 /** |
|
3271 * Constructor |
|
3272 */ |
|
3273 { |
|
3274 SetTestStepName(KCommsdat3314Step); |
|
3275 } |
|
3276 |
|
3277 TVerdict CCommsdat3314Step::doTestStepPreambleL() |
|
3278 /** |
|
3279 * @return - TVerdict code |
|
3280 * Override of base class pure virtual |
|
3281 */ |
|
3282 { |
|
3283 SetTestStepResult(EFail); |
|
3284 |
|
3285 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3286 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3287 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3288 #else |
|
3289 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3290 #endif |
|
3291 |
|
3292 SetTestStepResult(EPass); |
|
3293 return TestStepResult(); |
|
3294 } |
|
3295 |
|
3296 TVerdict CCommsdat3314Step::doTestStepL() |
|
3297 /** |
|
3298 * @return - TVerdict code |
|
3299 * Delete the 1st link from the default IAPPrioritySelPol record. As a result the default IPProto |
|
3300 * AP should be linked from the IPProto Tier record and from the defualt APPriotySelPol record. |
|
3301 * The default APPrioritySelPol record should be linked form the Network default AP. |
|
3302 */ |
|
3303 { |
|
3304 SetTestStepResult(EFail); |
|
3305 |
|
3306 const TInt KIPProtoTierLink = 0x11800200; |
|
3307 |
|
3308 CMDBField<TInt>* defIAPPrioritySelPolLink = new(ELeave)CMDBField<TInt>(KCDTIdIap1); |
|
3309 CleanupStack::PushL(defIAPPrioritySelPolLink); |
|
3310 //we just know form the config file that the default IAPPrioritySelPol rec is the 1st one |
|
3311 |
|
3312 defIAPPrioritySelPolLink->SetRecordId(1); |
|
3313 defIAPPrioritySelPolLink->DeleteL(*iCDSession_v11); |
|
3314 |
|
3315 CleanupStack::PopAndDestroy(defIAPPrioritySelPolLink); |
|
3316 |
|
3317 CCDAccessPointRecord* ipprotoDefAPRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3318 CleanupStack::PushL(ipprotoDefAPRec); |
|
3319 |
|
3320 ipprotoDefAPRec->iCustomSelectionPolicy = CCDAccessPointRecord::KNoPolicy; |
|
3321 ipprotoDefAPRec->FindL(*iCDSession_vLatest); |
|
3322 |
|
3323 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3324 CleanupStack::PushL(ipprotoTierRec); |
|
3325 |
|
3326 ipprotoTierRec->SetElementId(KIPProtoTierLink); |
|
3327 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3328 |
|
3329 if (ipprotoTierRec->iDefaultAccessPoint == (ipprotoDefAPRec->ElementId() & ~KCDMaskShowFieldType)) |
|
3330 { |
|
3331 CCDAPPrioritySelectionPolicyRecord* defAPPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
3332 CleanupStack::PushL(defAPPrioritySelPolRec); |
|
3333 //we just know form the config file that the default IAPPrioritySelPol rec is the 1st one |
|
3334 |
|
3335 defAPPrioritySelPolRec->SetRecordId(1); |
|
3336 defAPPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
3337 |
|
3338 if (0 == defAPPrioritySelPolRec->iApCount) |
|
3339 { |
|
3340 SetTestStepResult(EPass); |
|
3341 } |
|
3342 CleanupStack::PopAndDestroy(defAPPrioritySelPolRec); |
|
3343 } |
|
3344 |
|
3345 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3346 CleanupStack::PopAndDestroy(ipprotoDefAPRec); |
|
3347 |
|
3348 return TestStepResult(); |
|
3349 } |
|
3350 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3351 //---------------------------------------------------------------------------------------------------------------- |
|
3352 |
|
3353 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3354 |
|
3355 CCommsdat3315Step::~CCommsdat3315Step() |
|
3356 /** |
|
3357 * Destructor |
|
3358 */ |
|
3359 { |
|
3360 delete iCDSession_v11; |
|
3361 delete iCDSession_vLatest; |
|
3362 } |
|
3363 |
|
3364 CCommsdat3315Step::CCommsdat3315Step() |
|
3365 /** |
|
3366 * Constructor |
|
3367 */ |
|
3368 { |
|
3369 SetTestStepName(KCommsdat3315Step); |
|
3370 } |
|
3371 |
|
3372 TVerdict CCommsdat3315Step::doTestStepPreambleL() |
|
3373 /** |
|
3374 * @return - TVerdict code |
|
3375 * Override of base class pure virtual |
|
3376 */ |
|
3377 { |
|
3378 SetTestStepResult(EFail); |
|
3379 |
|
3380 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3381 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3382 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3383 #else |
|
3384 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3385 #endif |
|
3386 |
|
3387 SetTestStepResult(EPass); |
|
3388 return TestStepResult(); |
|
3389 } |
|
3390 |
|
3391 TVerdict CCommsdat3315Step::doTestStepL() |
|
3392 /** |
|
3393 * @return - TVerdict code |
|
3394 * This test step modifies the 1st IAPLink in the default IAPPrioritySelPol record |
|
3395 * to 0. |
|
3396 * |
|
3397 * Modify is called on field container. |
|
3398 */ |
|
3399 { |
|
3400 SetTestStepResult(EFail); |
|
3401 |
|
3402 const TInt KIPProtoTierLink = 0x11800200; |
|
3403 |
|
3404 CMDBField<TInt>* defIAPPrioritySelPolLink = new(ELeave)CMDBField<TInt>(KCDTIdIap1); |
|
3405 CleanupStack::PushL(defIAPPrioritySelPolLink); |
|
3406 //we just know form the config file that the default IAPPrioritySelPol rec is the 1st one |
|
3407 |
|
3408 defIAPPrioritySelPolLink->SetRecordId(1); |
|
3409 *defIAPPrioritySelPolLink = 0; |
|
3410 defIAPPrioritySelPolLink->ModifyL(*iCDSession_v11); |
|
3411 |
|
3412 CleanupStack::PopAndDestroy(defIAPPrioritySelPolLink); |
|
3413 |
|
3414 CCDAccessPointRecord* ipprotoDefAPRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3415 CleanupStack::PushL(ipprotoDefAPRec); |
|
3416 |
|
3417 ipprotoDefAPRec->iCustomSelectionPolicy = CCDAccessPointRecord::KNoPolicy; |
|
3418 ipprotoDefAPRec->FindL(*iCDSession_vLatest); |
|
3419 |
|
3420 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3421 CleanupStack::PushL(ipprotoTierRec); |
|
3422 |
|
3423 ipprotoTierRec->SetElementId(KIPProtoTierLink); |
|
3424 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3425 |
|
3426 if (ipprotoTierRec->iDefaultAccessPoint == (ipprotoDefAPRec->ElementId() & ~KCDMaskShowFieldType)) |
|
3427 { |
|
3428 CCDAPPrioritySelectionPolicyRecord* defAPPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
3429 CleanupStack::PushL(defAPPrioritySelPolRec); |
|
3430 //we just know form the config file that the default IAPPrioritySelPol rec is the 1st one |
|
3431 |
|
3432 defAPPrioritySelPolRec->SetRecordId(1); |
|
3433 defAPPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
3434 |
|
3435 if (0 == defAPPrioritySelPolRec->iApCount) |
|
3436 { |
|
3437 SetTestStepResult(EPass); |
|
3438 } |
|
3439 CleanupStack::PopAndDestroy(defAPPrioritySelPolRec); |
|
3440 } |
|
3441 |
|
3442 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3443 CleanupStack::PopAndDestroy(ipprotoDefAPRec); |
|
3444 |
|
3445 return TestStepResult(); |
|
3446 } |
|
3447 |
|
3448 //---------------------------------------------------------------------------------------------------------------- |
|
3449 |
|
3450 CCommsdat3316Step::~CCommsdat3316Step() |
|
3451 /** |
|
3452 * Destructor |
|
3453 */ |
|
3454 { |
|
3455 delete iCDSession_v11; |
|
3456 delete iCDSession_vLatest; |
|
3457 } |
|
3458 |
|
3459 CCommsdat3316Step::CCommsdat3316Step() |
|
3460 /** |
|
3461 * Constructor |
|
3462 */ |
|
3463 { |
|
3464 SetTestStepName(KCommsdat3316Step); |
|
3465 } |
|
3466 |
|
3467 TVerdict CCommsdat3316Step::doTestStepPreambleL() |
|
3468 /** |
|
3469 * @return - TVerdict code |
|
3470 * Override of base class pure virtual |
|
3471 */ |
|
3472 { |
|
3473 SetTestStepResult(EFail); |
|
3474 |
|
3475 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3476 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3477 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3478 #else |
|
3479 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3480 #endif |
|
3481 |
|
3482 SetTestStepResult(EPass); |
|
3483 return TestStepResult(); |
|
3484 } |
|
3485 |
|
3486 TVerdict CCommsdat3316Step::doTestStepL() |
|
3487 /** |
|
3488 * @return - TVerdict code |
|
3489 * This test step modifies the 2nd IAPLink in the 2nd IAPPrioritySelPol record |
|
3490 * (not the default one) to 0. |
|
3491 * |
|
3492 * Modify is called on field container. |
|
3493 * This teststep is depending on CCommsdat3315Step |
|
3494 */ |
|
3495 { |
|
3496 SetTestStepResult(EFail); |
|
3497 |
|
3498 const TInt KIPProtoTierLink = 0x11800200; |
|
3499 |
|
3500 CMDBField<TInt>* defIAPPrioritySelPolLink = new(ELeave)CMDBField<TInt>(KCDTIdIap2); |
|
3501 CleanupStack::PushL(defIAPPrioritySelPolLink); |
|
3502 |
|
3503 defIAPPrioritySelPolLink->SetRecordId(2); |
|
3504 *defIAPPrioritySelPolLink = 0; |
|
3505 defIAPPrioritySelPolLink->ModifyL(*iCDSession_v11); |
|
3506 |
|
3507 CleanupStack::PopAndDestroy(defIAPPrioritySelPolLink); |
|
3508 |
|
3509 if (4 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
3510 { |
|
3511 CCDAPPrioritySelectionPolicyRecord* aPPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
3512 CleanupStack::PushL(aPPrioritySelPolRec); |
|
3513 |
|
3514 aPPrioritySelPolRec->SetRecordId(2); |
|
3515 aPPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
3516 |
|
3517 if ( NULL != aPPrioritySelPolRec->iAp1 && |
|
3518 NULL == aPPrioritySelPolRec->iAp2 && |
|
3519 NULL != aPPrioritySelPolRec->iAp3 && |
|
3520 3 == aPPrioritySelPolRec->iApCount ) |
|
3521 { |
|
3522 SetTestStepResult(EPass); |
|
3523 } |
|
3524 CleanupStack::PopAndDestroy(aPPrioritySelPolRec); |
|
3525 } |
|
3526 |
|
3527 return TestStepResult(); |
|
3528 } |
|
3529 |
|
3530 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3531 |
|
3532 //---------------------------------------------------------------------------------------------------------------- |
|
3533 |
|
3534 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3535 |
|
3536 CCommsdat3317Step::~CCommsdat3317Step() |
|
3537 /** |
|
3538 * Destructor |
|
3539 */ |
|
3540 { |
|
3541 delete iCDSession_v11; |
|
3542 delete iCDSession_vLatest; |
|
3543 } |
|
3544 |
|
3545 CCommsdat3317Step::CCommsdat3317Step() |
|
3546 /** |
|
3547 * Constructor |
|
3548 */ |
|
3549 { |
|
3550 SetTestStepName(KCommsdat3317Step); |
|
3551 } |
|
3552 |
|
3553 TVerdict CCommsdat3317Step::doTestStepPreambleL() |
|
3554 /** |
|
3555 * @return - TVerdict code |
|
3556 * Override of base class pure virtual |
|
3557 */ |
|
3558 { |
|
3559 SetTestStepResult(EFail); |
|
3560 |
|
3561 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3562 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3563 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3564 #else |
|
3565 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3566 #endif |
|
3567 |
|
3568 SetTestStepResult(EPass); |
|
3569 return TestStepResult(); |
|
3570 } |
|
3571 |
|
3572 TVerdict CCommsdat3317Step::doTestStepL() |
|
3573 /** |
|
3574 * @return - TVerdict code |
|
3575 * This test step modifies the 3rd IAPLink in the 3rd IAPPrioritySelPol record |
|
3576 * (not the default one) to 0. Note that this is the last reference to the given |
|
3577 * IPProto AP -> so as a result of the modification the given IPProto AP will be |
|
3578 * deleted. |
|
3579 * |
|
3580 * Modify is called on record container. |
|
3581 * This teststep is depending on CCommsdat3316Step |
|
3582 */ |
|
3583 { |
|
3584 SetTestStepResult(EFail); |
|
3585 |
|
3586 const TInt KIPProtoTierLink = 0x11800200; |
|
3587 |
|
3588 CCDIAPPrioritySelectionPolicyRecord* iAPPrioritySelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
3589 CleanupStack::PushL(iAPPrioritySelPolRec); |
|
3590 |
|
3591 iAPPrioritySelPolRec->SetRecordId(3); |
|
3592 iAPPrioritySelPolRec->LoadL(*iCDSession_v11); |
|
3593 |
|
3594 iAPPrioritySelPolRec->iIap3 = 0; |
|
3595 |
|
3596 iAPPrioritySelPolRec->ModifyL(*iCDSession_v11); |
|
3597 |
|
3598 CleanupStack::PopAndDestroy(iAPPrioritySelPolRec); |
|
3599 |
|
3600 if (3 == GetAPNumberL(KIPProtoTierLink, iCDSession_vLatest)) |
|
3601 { |
|
3602 CCDAPPrioritySelectionPolicyRecord* aPPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
3603 CleanupStack::PushL(aPPrioritySelPolRec); |
|
3604 |
|
3605 aPPrioritySelPolRec->SetRecordId(3); |
|
3606 aPPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
3607 |
|
3608 if ( NULL != aPPrioritySelPolRec->iAp1 && |
|
3609 NULL != aPPrioritySelPolRec->iAp2 && |
|
3610 NULL == aPPrioritySelPolRec->iAp3 && |
|
3611 2 == aPPrioritySelPolRec->iApCount ) |
|
3612 { |
|
3613 SetTestStepResult(EPass); |
|
3614 } |
|
3615 CleanupStack::PopAndDestroy(aPPrioritySelPolRec); |
|
3616 } |
|
3617 |
|
3618 return TestStepResult(); |
|
3619 } |
|
3620 |
|
3621 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3622 |
|
3623 //---------------------------------------------------------------------------------------------------------------- |
|
3624 |
|
3625 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3626 |
|
3627 CCommsdat3318Step::~CCommsdat3318Step() |
|
3628 /** |
|
3629 * Destructor |
|
3630 */ |
|
3631 { |
|
3632 delete iCDSession_v11; |
|
3633 delete iCDSession_vLatest; |
|
3634 } |
|
3635 |
|
3636 CCommsdat3318Step::CCommsdat3318Step() |
|
3637 /** |
|
3638 * Constructor |
|
3639 */ |
|
3640 { |
|
3641 SetTestStepName(KCommsdat3318Step); |
|
3642 } |
|
3643 |
|
3644 TVerdict CCommsdat3318Step::doTestStepPreambleL() |
|
3645 /** |
|
3646 * @return - TVerdict code |
|
3647 * Override of base class pure virtual |
|
3648 */ |
|
3649 { |
|
3650 SetTestStepResult(EFail); |
|
3651 |
|
3652 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3653 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3654 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3655 #else |
|
3656 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3657 #endif |
|
3658 |
|
3659 SetTestStepResult(EPass); |
|
3660 return TestStepResult(); |
|
3661 } |
|
3662 |
|
3663 TVerdict CCommsdat3318Step::doTestStepL() |
|
3664 /** |
|
3665 * @return - TVerdict code |
|
3666 * This test step delets the 1st IAP link form the 1st IAPPriotySelPol record |
|
3667 * (the default one). At this point the AP link in the IPProto tier record points |
|
3668 * to the default IPProto AP. |
|
3669 * After this the 1st IAP link in the 1st IAPPrioritySelPol record is modified |
|
3670 * again to point to a valid IAP. |
|
3671 * |
|
3672 * The AP link in the IPProto tier has to be modified as well to point to the |
|
3673 * right IPProto AP. |
|
3674 * |
|
3675 * Modify is called on field container. |
|
3676 */ |
|
3677 { |
|
3678 SetTestStepResult(EFail); |
|
3679 |
|
3680 const TInt KIAPNumber = 3; |
|
3681 TBool keepGoing = EFalse; |
|
3682 |
|
3683 CMDBField<TInt>* defIAPPrioritySelPolLink = new(ELeave)CMDBField<TInt>(KCDTIdIap1); |
|
3684 CleanupStack::PushL(defIAPPrioritySelPolLink); |
|
3685 |
|
3686 defIAPPrioritySelPolLink->SetRecordId(1); |
|
3687 defIAPPrioritySelPolLink->DeleteL(*iCDSession_v11); |
|
3688 |
|
3689 CleanupStack::PopAndDestroy(defIAPPrioritySelPolLink); |
|
3690 |
|
3691 CCDAccessPointRecord* defApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3692 CleanupStack::PushL(defApRec); |
|
3693 |
|
3694 defApRec->iCustomSelectionPolicy = CCDAccessPointRecord::KNoPolicy; |
|
3695 |
|
3696 if (defApRec->FindL(*iCDSession_vLatest)) |
|
3697 { |
|
3698 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3699 CleanupStack::PushL(ipprotoTierRec); |
|
3700 |
|
3701 ipprotoTierRec->SetRecordId(2); |
|
3702 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3703 |
|
3704 if (ipprotoTierRec->iDefaultAccessPoint == (defApRec->ElementId() & ~KCDMaskShowFieldType)) |
|
3705 { |
|
3706 keepGoing = ETrue; |
|
3707 } |
|
3708 |
|
3709 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3710 } |
|
3711 CleanupStack::PopAndDestroy(defApRec); |
|
3712 |
|
3713 |
|
3714 if (keepGoing) |
|
3715 { |
|
3716 //do the modification |
|
3717 CMDBField<TInt>* defIAPPrioritySelPolLink1 = new(ELeave)CMDBField<TInt>(KCDTIdIap1); |
|
3718 CleanupStack::PushL(defIAPPrioritySelPolLink1); |
|
3719 |
|
3720 defIAPPrioritySelPolLink1->SetRecordId(1); |
|
3721 *defIAPPrioritySelPolLink1 = KIAPNumber; |
|
3722 |
|
3723 defIAPPrioritySelPolLink1->ModifyL(*iCDSession_v11); |
|
3724 |
|
3725 CleanupStack::PopAndDestroy(defIAPPrioritySelPolLink1); |
|
3726 |
|
3727 CCDAPPrioritySelectionPolicyRecord* defAPPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
3728 CleanupStack::PushL(defAPPrioritySelPolRec); |
|
3729 |
|
3730 //we just know that it's the 1st record... |
|
3731 defAPPrioritySelPolRec->SetRecordId(1); |
|
3732 defAPPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
3733 |
|
3734 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3735 CleanupStack::PushL(ipprotoTierRec); |
|
3736 |
|
3737 ipprotoTierRec->SetRecordId(2); |
|
3738 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3739 |
|
3740 TInt aPFromTheIPProtoTier = ipprotoTierRec->iDefaultAccessPoint; |
|
3741 TInt defAPPriorioritySelPolLink = defAPPrioritySelPolRec->iAp1; |
|
3742 |
|
3743 if (aPFromTheIPProtoTier == defAPPriorioritySelPolLink) |
|
3744 { |
|
3745 //ok the 2 links are the same. Now let's load the IPProto AP and check |
|
3746 //its' CustomSelectionPolicy. It has to be the same as the IAP number we |
|
3747 //modified the IAPPriorioritySelPol field with |
|
3748 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3749 CleanupStack::PushL(apRec); |
|
3750 |
|
3751 apRec->SetElementId(aPFromTheIPProtoTier); |
|
3752 apRec->LoadL(*iCDSession_vLatest); |
|
3753 |
|
3754 if (KIAPNumber == apRec->iCustomSelectionPolicy) |
|
3755 { |
|
3756 SetTestStepResult(EPass); |
|
3757 } |
|
3758 |
|
3759 CleanupStack::PopAndDestroy(apRec); |
|
3760 } |
|
3761 |
|
3762 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3763 CleanupStack::PopAndDestroy(defAPPrioritySelPolRec); |
|
3764 } |
|
3765 |
|
3766 return TestStepResult(); |
|
3767 } |
|
3768 |
|
3769 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3770 |
|
3771 //---------------------------------------------------------------------------------------------------------------- |
|
3772 |
|
3773 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3774 |
|
3775 CCommsdat3319Step::~CCommsdat3319Step() |
|
3776 /** |
|
3777 * Destructor |
|
3778 */ |
|
3779 { |
|
3780 delete iCDSession_v11; |
|
3781 delete iCDSession_vLatest; |
|
3782 } |
|
3783 |
|
3784 CCommsdat3319Step::CCommsdat3319Step() |
|
3785 /** |
|
3786 * Constructor |
|
3787 */ |
|
3788 { |
|
3789 SetTestStepName(KCommsdat3319Step); |
|
3790 } |
|
3791 |
|
3792 TVerdict CCommsdat3319Step::doTestStepPreambleL() |
|
3793 /** |
|
3794 * @return - TVerdict code |
|
3795 * Override of base class pure virtual |
|
3796 */ |
|
3797 { |
|
3798 SetTestStepResult(EFail); |
|
3799 |
|
3800 iCDSession_v11 = CMDBSession::NewL(KCDVersion1_1); |
|
3801 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |
|
3802 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_2); |
|
3803 #else |
|
3804 iCDSession_vLatest = CMDBSession::NewL(KCDVersion1_1); |
|
3805 #endif |
|
3806 |
|
3807 SetTestStepResult(EPass); |
|
3808 return TestStepResult(); |
|
3809 } |
|
3810 |
|
3811 TVerdict CCommsdat3319Step::doTestStepL() |
|
3812 /** |
|
3813 * @return - TVerdict code |
|
3814 * This test step delets the 1st IAP link form the 1st IAPPriotySelPol record |
|
3815 * (the default one). At this point the AP link in the IPProto tier record points |
|
3816 * to the default IPProto AP. |
|
3817 * After this the 1st IAP link in the 1st IAPPrioritySelPol record is modified |
|
3818 * again to point to a valid IAP. |
|
3819 * |
|
3820 * The AP link in the IPProto tier has to be modified as well to point to the |
|
3821 * right IPProto AP. |
|
3822 * |
|
3823 * Modify is called on record container. |
|
3824 */ |
|
3825 { |
|
3826 SetTestStepResult(EFail); |
|
3827 |
|
3828 const TInt KIAPNumber = 3; |
|
3829 TBool keepGoing = EFalse; |
|
3830 |
|
3831 CCDIAPPrioritySelectionPolicyRecord* iAPPrioritySelPolRec = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
3832 CleanupStack::PushL(iAPPrioritySelPolRec); |
|
3833 |
|
3834 iAPPrioritySelPolRec->SetRecordId(1); |
|
3835 iAPPrioritySelPolRec->DeleteL(*iCDSession_v11); |
|
3836 |
|
3837 CleanupStack::PopAndDestroy(iAPPrioritySelPolRec); |
|
3838 |
|
3839 CCDAccessPointRecord* defApRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3840 CleanupStack::PushL(defApRec); |
|
3841 |
|
3842 defApRec->iCustomSelectionPolicy = CCDAccessPointRecord::KNoPolicy; |
|
3843 |
|
3844 if (defApRec->FindL(*iCDSession_vLatest)) |
|
3845 { |
|
3846 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3847 CleanupStack::PushL(ipprotoTierRec); |
|
3848 |
|
3849 ipprotoTierRec->SetRecordId(2); |
|
3850 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3851 |
|
3852 if (ipprotoTierRec->iDefaultAccessPoint == (defApRec->ElementId() & ~KCDMaskShowFieldType)) |
|
3853 { |
|
3854 keepGoing = ETrue; |
|
3855 } |
|
3856 |
|
3857 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3858 } |
|
3859 CleanupStack::PopAndDestroy(defApRec); |
|
3860 |
|
3861 |
|
3862 if (keepGoing) |
|
3863 { |
|
3864 //do the modification |
|
3865 CCDIAPPrioritySelectionPolicyRecord* iAPPrioritySelPolRec1 = static_cast<CCDIAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIapPrioritySelectionPolicyRecord)); |
|
3866 CleanupStack::PushL(iAPPrioritySelPolRec1); |
|
3867 |
|
3868 iAPPrioritySelPolRec1->SetRecordId(1); |
|
3869 iAPPrioritySelPolRec1->iIap1 = KIAPNumber; |
|
3870 |
|
3871 iAPPrioritySelPolRec1->ModifyL(*iCDSession_v11); |
|
3872 |
|
3873 CleanupStack::PopAndDestroy(iAPPrioritySelPolRec1); |
|
3874 |
|
3875 CCDAPPrioritySelectionPolicyRecord* defAPPrioritySelPolRec = static_cast<CCDAPPrioritySelectionPolicyRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdApPrioritySelectionPolicyRecord)); |
|
3876 CleanupStack::PushL(defAPPrioritySelPolRec); |
|
3877 |
|
3878 //we just know that it's the 1st record... |
|
3879 defAPPrioritySelPolRec->SetRecordId(1); |
|
3880 defAPPrioritySelPolRec->LoadL(*iCDSession_vLatest); |
|
3881 |
|
3882 CCDTierRecord* ipprotoTierRec = static_cast<CCDTierRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdTierRecord)); |
|
3883 CleanupStack::PushL(ipprotoTierRec); |
|
3884 |
|
3885 ipprotoTierRec->SetRecordId(2); |
|
3886 ipprotoTierRec->LoadL(*iCDSession_vLatest); |
|
3887 |
|
3888 TInt aPFromTheIPProtoTier = ipprotoTierRec->iDefaultAccessPoint; |
|
3889 TInt defAPPriorioritySelPolLink = defAPPrioritySelPolRec->iAp1; |
|
3890 |
|
3891 if (aPFromTheIPProtoTier == defAPPriorioritySelPolLink) |
|
3892 { |
|
3893 //ok the 2 links are the same. Now let's load the IPProto AP and check |
|
3894 //its' CustomSelectionPolicy. It has to be the same as the IAP number we |
|
3895 //modified the IAPPriorioritySelPol field with |
|
3896 CCDAccessPointRecord* apRec = static_cast<CCDAccessPointRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdAccessPointRecord)); |
|
3897 CleanupStack::PushL(apRec); |
|
3898 |
|
3899 apRec->SetElementId(aPFromTheIPProtoTier); |
|
3900 apRec->LoadL(*iCDSession_vLatest); |
|
3901 |
|
3902 if (KIAPNumber == apRec->iCustomSelectionPolicy) |
|
3903 { |
|
3904 SetTestStepResult(EPass); |
|
3905 } |
|
3906 |
|
3907 CleanupStack::PopAndDestroy(apRec); |
|
3908 } |
|
3909 |
|
3910 CleanupStack::PopAndDestroy(ipprotoTierRec); |
|
3911 CleanupStack::PopAndDestroy(defAPPrioritySelPolRec); |
|
3912 } |
|
3913 |
|
3914 return TestStepResult(); |
|
3915 } |
|
3916 |
|
3917 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY |