|
1 // Copyright (c) 1998-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 // Test harness for Internet Access Configuration Parser (Internet Database settings) |
|
15 // |
|
16 // |
|
17 |
|
18 #include <commdb.h> |
|
19 #include "BioTestUtils.h" |
|
20 // |
|
21 #include "iacperr.h" |
|
22 #include "iacpdef.h" |
|
23 |
|
24 #define BIO_MSG_ENTRY_PARSED 1 // Set entry .iMtmData3 to 1 to indicate that the entry has store i.e parsed,externalised |
|
25 #define BIO_MSG_ENTRY_PROCESSED 2 // Set TMsvEntry iMtmData3 to 2 to indicate that a message has been processed |
|
26 |
|
27 //SMS configuration file paths |
|
28 _LIT(SMS_ISP_FILE, "c:\\test\\bio\\iacp\\sms_isp.txt"); |
|
29 |
|
30 //forward reference |
|
31 class CExampleScheduler; |
|
32 |
|
33 //global declarations |
|
34 LOCAL_D CExampleScheduler *exampleScheduler; |
|
35 LOCAL_D RTest test(_L("IACP Test Harness")); |
|
36 |
|
37 |
|
38 // |
|
39 //-- CExampleScheduler -- |
|
40 // |
|
41 class CExampleScheduler : public CActiveScheduler |
|
42 { |
|
43 public: |
|
44 void Error (TInt aError) const; |
|
45 }; |
|
46 |
|
47 |
|
48 void CExampleScheduler::Error(TInt anError) const |
|
49 { |
|
50 CActiveScheduler::Stop(); |
|
51 test.Printf(_L("\nLeave signalled, reason=%d\n"),anError); |
|
52 } |
|
53 |
|
54 LOCAL_C void DisplayErrorReason(TInt& aReason, CBioTestUtils& aBioTestUtils) |
|
55 { |
|
56 if(aReason==KErrNone) |
|
57 { |
|
58 aBioTestUtils.TestHarnessCompleted(); |
|
59 return; |
|
60 } |
|
61 |
|
62 //failure cases |
|
63 TBuf<256> tempBuf; |
|
64 switch (aReason) |
|
65 { |
|
66 case KErrCancel: |
|
67 tempBuf= _L("\r\n-->Session cancelled"); |
|
68 break; |
|
69 case KErrEof: |
|
70 tempBuf= _L("\r\n-->KErrEof"); |
|
71 break; |
|
72 case KErrNoMemory: |
|
73 tempBuf= _L("\r\n-->KErrNoMemory"); |
|
74 break; |
|
75 case KErrDisconnected: |
|
76 tempBuf= _L("\r\n-->KErrDisconnected"); |
|
77 break; |
|
78 case KErrAccessDenied: |
|
79 tempBuf= _L("\r\n-->KErrAccessDenied"); |
|
80 break; |
|
81 case KBspInvalidMessage: |
|
82 tempBuf= _L("\r\n-->Error: Invalid SMS Message. For Internet Access Configuration,\r\nSMS Header Field should be //SIAP11 "); |
|
83 break; |
|
84 case KIacpUnknownSmsType: |
|
85 tempBuf=_L("\r\n-->Error:SMS 1st Left Token does not start with niether M nor I "); |
|
86 break; |
|
87 case KIacpBIOMsgTypeNotSupported: |
|
88 tempBuf= _L("\r\n-->this Bio msg is not suppported"); |
|
89 break; |
|
90 case KIacpMandatoryDataNotSet: |
|
91 tempBuf= _L("\r\n-->Error: Mandatory data missing in SMS message."); |
|
92 break; |
|
93 case KIacpUnknownMailProtocol: |
|
94 tempBuf= _L("\r\n-->Error: Unknown Mail Protocol Not a Pop3/Imap4"); |
|
95 break; |
|
96 case KIacpErrRightToken: |
|
97 tempBuf= _L("\r\n-->Error: improper right token i.e not equal t/f (True/False)"); |
|
98 break; |
|
99 case KIacpErrLeftToken: |
|
100 tempBuf=_L("\r\n-->Error:SMS Left Tokens should start with 'M' for Mailbox account configuration\r\n and with 'I' for Internet service configuration"); |
|
101 break; |
|
102 case KIacpErrSmsDataNotParsed: |
|
103 tempBuf= _L("\r\n-->sms data should be parsed before processing"); |
|
104 break; |
|
105 case KIacpErrSmsDataNotRestored: |
|
106 tempBuf= _L("\r\n-->Error: sms data should be parsed before commiting (KIacpErrSmsDataNotRestored)"); |
|
107 break; |
|
108 case KIacpScriptErrISPNotFound: |
|
109 tempBuf= _L("\r\n-->Internet Service not found in Dial Out DB"); |
|
110 break; |
|
111 case KIacpErrScriptNotDefined: |
|
112 tempBuf= _L("\r\n-->Sript not included in sms"); |
|
113 break; |
|
114 case KIacpErrScriptNotFoundInDB: |
|
115 tempBuf= _L("\r\n-->There is no script in DB to append to."); |
|
116 break; |
|
117 case KIacpErrScriptAlreadyAdd: |
|
118 tempBuf= _L("\r\n-->Script cannot be add more than ounce for each Bio Msg"); |
|
119 break; |
|
120 default: |
|
121 tempBuf.Format(_L("\r\n-->Error !!!= %d"), aReason ); |
|
122 break; |
|
123 } |
|
124 |
|
125 aBioTestUtils.Printf(tempBuf); |
|
126 aBioTestUtils.TestHarnessFailed(aReason); |
|
127 } |
|
128 |
|
129 |
|
130 //-------------------------------------- |
|
131 // |
|
132 //-- CTestIacp -- |
|
133 // |
|
134 enum TSessionState |
|
135 { |
|
136 EParse, // parsing is done at ParseL() stage. and data are externalised. |
|
137 EProcess, //parsed data are internalised, then commited |
|
138 EDisplay, //Display/Log entry data |
|
139 }; |
|
140 |
|
141 class CTestIacp : public CActive |
|
142 { |
|
143 public: |
|
144 ~CTestIacp(); |
|
145 static CTestIacp* NewL(CBioTestUtils* aBioTestUtils); |
|
146 void StartL(TInt aCmd); |
|
147 |
|
148 public: |
|
149 CTestIacp(CBioTestUtils* aBioTestUtils); |
|
150 void ConstructL(); |
|
151 |
|
152 void RequestComplete(TRequestStatus& aStatus,TInt aCompletion); |
|
153 void DoCancel(); |
|
154 void RunL(); |
|
155 |
|
156 //logging utility functions... |
|
157 void GetMessageBodyL(); |
|
158 void DisplayEntryDataL(); |
|
159 void LogCommsDbSettingsL(); |
|
160 void LogCommsDbDialOutIapL(); |
|
161 void LogCommsDbDialInIapL(); |
|
162 void LogCommsDbDialOutIspL(); |
|
163 void LogCommsDbDialInIspL(); |
|
164 void LogProxiesL(); |
|
165 void LogCommsDbModemSettingsL(); |
|
166 void LogCommsDbLocationSettingsL(); |
|
167 void LogCommsDbChargeCardSettingsL(); |
|
168 void LogCommsDbGlobalSettings(); |
|
169 |
|
170 private: |
|
171 TInt iState; |
|
172 CBaseScriptParser2* iParser; |
|
173 |
|
174 CBioTestUtils* iBioTestUtils; |
|
175 TMsvId iEntryId; //ID of BioMsg entry created |
|
176 HBufC* iIspName; |
|
177 TUint32 iProxyIsp; |
|
178 CCommsDatabase* iCommDb; |
|
179 |
|
180 HBufC* iSmsMsg; //sms body build dependent |
|
181 TInt iParseFailCount;//heap testing (Parsing state) |
|
182 TInt iProcessFailCount;//heap testing (processing state) |
|
183 }; |
|
184 |
|
185 |
|
186 CTestIacp::CTestIacp(CBioTestUtils* aBioTestUtils) |
|
187 :CActive(EPriorityStandard),iBioTestUtils(aBioTestUtils) |
|
188 { |
|
189 } |
|
190 |
|
191 CTestIacp* CTestIacp::NewL(CBioTestUtils* aBioTestUtils) |
|
192 { |
|
193 CTestIacp* self = new(ELeave) CTestIacp(aBioTestUtils); |
|
194 CleanupStack::PushL(self); |
|
195 self->ConstructL(); |
|
196 CleanupStack::Pop(); //self |
|
197 return self; |
|
198 } |
|
199 |
|
200 void CTestIacp::ConstructL() |
|
201 { |
|
202 iBioTestUtils->WriteComment(_L("CTestIacp::ConstructL().")); |
|
203 |
|
204 iCommDb=CCommsDatabase::NewL(EDatabaseTypeIAP); |
|
205 iBioTestUtils->WriteComment(_L("Created CCommsDatabase Object.")); |
|
206 |
|
207 |
|
208 TBool finished = EFalse; |
|
209 #ifdef _DEBUG |
|
210 // TInt failCount = 0; |
|
211 #endif |
|
212 // while(!finished) |
|
213 // { |
|
214 // __UHEAP_FAILNEXT(failCount++); |
|
215 TRAPD(error,(iParser = iBioTestUtils->CreateParserTypeL(KUidBIOInternetAccessPointMsg))); |
|
216 if (error == KErrNone) |
|
217 { |
|
218 // __UHEAP_RESET; |
|
219 iBioTestUtils->WriteComment(_L("Created IACP Parser object")); |
|
220 finished = ETrue; |
|
221 // __UHEAP_RESET; |
|
222 } |
|
223 // Handle error |
|
224 else |
|
225 { |
|
226 // test(error == KErrNoMemory); |
|
227 // __UHEAP_RESET; |
|
228 } |
|
229 // } |
|
230 |
|
231 /* |
|
232 TRAPD(error, (iParser = iBioTestUtils->CreateParserTypeL(KUidBIOInternetAccessPointMsg))); |
|
233 if(error) |
|
234 { |
|
235 iBioTestUtils->WriteComment(_L("Failed to Create IACP Parser object")); |
|
236 iBioTestUtils->Printf(_L("error= %d\n"), error); |
|
237 User::Leave(error); |
|
238 } |
|
239 else |
|
240 iBioTestUtils->WriteComment(_L("Created IACP Parser object")); |
|
241 */ |
|
242 |
|
243 TRAPD(err,(iEntryId= iBioTestUtils->CreateBIOEntryFromFileL(SMS_ISP_FILE, EBioIapSettingsMessage))); |
|
244 if(err) |
|
245 { |
|
246 iBioTestUtils->Printf(_L("Failed to Create Bio entry from %S\n"), &SMS_ISP_FILE); |
|
247 iBioTestUtils->Printf(_L("error= %d\n"), err); |
|
248 User::Leave(err); |
|
249 } |
|
250 else |
|
251 iBioTestUtils->Printf(_L("Created Bio entry with ID=0x%x from %S"),iEntryId, &SMS_ISP_FILE); |
|
252 |
|
253 /* |
|
254 error = KErrNone; |
|
255 finished = EFalse; |
|
256 failCount = 0; |
|
257 while(!finished) |
|
258 { |
|
259 __UHEAP_FAILNEXT(failCount++); |
|
260 |
|
261 TRAP(error,(iEntryId= iBioTestUtils->CreateBIOEntryFromFileL(SMS_MAIL_FILE, EBioIapSettingsMessage))); |
|
262 if (error == KErrNone) |
|
263 { |
|
264 __UHEAP_RESET; |
|
265 iBioTestUtils->Printf(_L("Created Bio entry with ID=0x%x from %S"),iEntryId, &SMS_MAIL_FILE); |
|
266 finished = ETrue; |
|
267 __UHEAP_RESET; |
|
268 } |
|
269 // Handle error |
|
270 else |
|
271 { |
|
272 // Check if error is out of memory or a specific fax rendering error |
|
273 test(error == KErrNoMemory); |
|
274 __UHEAP_RESET; |
|
275 } |
|
276 } |
|
277 */ |
|
278 CActiveScheduler::Add(this); |
|
279 } |
|
280 |
|
281 CTestIacp::~CTestIacp() |
|
282 { |
|
283 Cancel(); |
|
284 delete iSmsMsg; |
|
285 delete iParser; |
|
286 delete iCommDb; |
|
287 delete iIspName; |
|
288 } |
|
289 |
|
290 void CTestIacp::GetMessageBodyL() |
|
291 { |
|
292 delete iSmsMsg; |
|
293 iSmsMsg = NULL; |
|
294 iSmsMsg= iBioTestUtils->MessageBodyL(iEntryId).AllocL(); |
|
295 } |
|
296 |
|
297 void CTestIacp::StartL(TInt aCmd) |
|
298 { |
|
299 iBioTestUtils->WriteComment(_L("StartL()")); |
|
300 iState=aCmd; |
|
301 |
|
302 TInt error = KErrNone; |
|
303 // TBool finished = EFalse; |
|
304 |
|
305 switch (iState) |
|
306 { |
|
307 case EParse: |
|
308 iBioTestUtils->Printf(_L("Parsing...\n")); |
|
309 iBioTestUtils->SetEntryL(iEntryId); //clients have to set the right context before calling ParseL() |
|
310 //iParser->ParseL(iStatus, iBioTestUtils->MessageBodyL(iEntryId)); //parse and externalise |
|
311 //SetActive(); |
|
312 GetMessageBodyL(); |
|
313 |
|
314 // while(!finished) |
|
315 // { |
|
316 // __UHEAP_FAILNEXT(iParseFailCount++); |
|
317 // |
|
318 TRAP(error, iParser->ParseL(iStatus,iSmsMsg->Des())); |
|
319 if (error == KErrNone) |
|
320 { |
|
321 // __UHEAP_RESET; |
|
322 // finished = ETrue; |
|
323 SetActive(); |
|
324 } |
|
325 else |
|
326 { |
|
327 // test(error == KErrNoMemory); |
|
328 // __UHEAP_RESET; |
|
329 } |
|
330 // } |
|
331 break; |
|
332 |
|
333 case EProcess: |
|
334 iBioTestUtils->Printf(_L("Committing...\n")); |
|
335 iBioTestUtils->SetEntryL(iEntryId); //clients have to set the right context before calling ProcessL() |
|
336 //iParser->ProcessL(iStatus); //internalise and process |
|
337 //SetActive(); |
|
338 // while(!finished) |
|
339 // { |
|
340 // __UHEAP_FAILNEXT(iProcessFailCount++); |
|
341 // |
|
342 TRAP(error, iParser->ProcessL(iStatus)); //internalise and process |
|
343 if (error == KErrNone) |
|
344 { |
|
345 // __UHEAP_RESET; |
|
346 // finished = ETrue; |
|
347 SetActive(); |
|
348 } |
|
349 else |
|
350 { |
|
351 test(error == KErrNoMemory); |
|
352 // __UHEAP_RESET; |
|
353 } |
|
354 // } |
|
355 break; |
|
356 |
|
357 case EDisplay: |
|
358 DisplayEntryDataL(); |
|
359 RequestComplete(iStatus,KErrNone); |
|
360 SetActive(); |
|
361 break; |
|
362 |
|
363 default: |
|
364 break; |
|
365 } |
|
366 } |
|
367 |
|
368 void CTestIacp::DoCancel() |
|
369 { |
|
370 iBioTestUtils->WriteComment(_L("DoCancel()")); |
|
371 } |
|
372 |
|
373 void CTestIacp::RequestComplete(TRequestStatus& aStatus,TInt aCompletion) |
|
374 { |
|
375 iBioTestUtils->WriteComment(_L("RequestComplete()")); |
|
376 TRequestStatus* statusPtr=&aStatus; |
|
377 User::RequestComplete(statusPtr,aCompletion); |
|
378 } |
|
379 |
|
380 void CTestIacp::RunL() |
|
381 { |
|
382 iBioTestUtils->WriteComment(_L("RunL()")); |
|
383 TInt result=iStatus.Int(); |
|
384 |
|
385 //heap test faillure |
|
386 if( result == KErrNoMemory) |
|
387 { |
|
388 if(iState==EParse) |
|
389 { |
|
390 iParseFailCount++; |
|
391 StartL(EParse); |
|
392 return; |
|
393 } |
|
394 else if(iState==EProcess) |
|
395 { |
|
396 iProcessFailCount++; |
|
397 StartL(EProcess); |
|
398 return; |
|
399 } |
|
400 } |
|
401 |
|
402 if ( result!=KErrNone && result!=KIacpErrSmsDataNotRestored) |
|
403 { |
|
404 iBioTestUtils->ClearScreen(); |
|
405 //test.Console()->SetPos(0,0); |
|
406 DisplayErrorReason(result,*iBioTestUtils); |
|
407 CActiveScheduler::Stop(); |
|
408 return; |
|
409 } |
|
410 |
|
411 switch (iState) |
|
412 { |
|
413 case EParse: |
|
414 iBioTestUtils->WriteComment(_L("Parsed Ok.")); |
|
415 StartL(EProcess); |
|
416 break; |
|
417 case EProcess: |
|
418 iBioTestUtils->WriteComment(_L("Processed Ok.")); |
|
419 StartL(EDisplay); |
|
420 break; |
|
421 case EDisplay: |
|
422 |
|
423 DisplayErrorReason(result,*iBioTestUtils); |
|
424 iParser->Cancel(); |
|
425 CActiveScheduler::Stop(); |
|
426 break; |
|
427 default: |
|
428 break; |
|
429 } |
|
430 } |
|
431 |
|
432 void CTestIacp::DisplayEntryDataL() |
|
433 { |
|
434 iBioTestUtils->WriteComment(_L("DisplayEntryDataL()")); |
|
435 |
|
436 iBioTestUtils->ClearScreen(); |
|
437 //test.Console()->SetPos(0,0); |
|
438 |
|
439 iBioTestUtils->SetEntryL(iEntryId); |
|
440 TMsvEntry entry = iBioTestUtils->Entry(); |
|
441 iBioTestUtils->Printf(_L("===== BIO-MSG Entry Details =====\n")); |
|
442 iBioTestUtils->Printf(_L("Id: 0x%x\n"), iEntryId); |
|
443 iBioTestUtils->Printf(_L("iServiceId: 0x%x\n"), entry.iServiceId); |
|
444 iBioTestUtils->Printf(_L("iRelatedId: 0x%x\n"), entry.iRelatedId); |
|
445 |
|
446 iBioTestUtils->Printf(_L("iType: 0x%x\n"), entry.iType); |
|
447 iBioTestUtils->Printf(_L("iMtm: 0x%x\n"), entry.iMtm); |
|
448 TBuf<128> dateStr; |
|
449 entry.iDate.FormatL(dateStr, (_L("%D%M%Y%/0%1%/1%2%/2%3%/3"))); |
|
450 iBioTestUtils->Printf(_L("iDate: %S\n"),&dateStr); |
|
451 iBioTestUtils->Printf(_L("iSize: %d\n"), entry.iSize); |
|
452 iBioTestUtils->Printf(_L("iError: %d\n"), entry.iError); |
|
453 iBioTestUtils->Printf(_L("iBioType: 0x%x\n"), entry.iBioType); |
|
454 iBioTestUtils->Printf(_L("iMtmData1: %d\n"), entry.iMtmData1); |
|
455 iBioTestUtils->Printf(_L("iMtmData2: %d\n"), entry.iMtmData2); |
|
456 iBioTestUtils->Printf(_L("iMtmData3: %d\n"), entry.iMtmData3); |
|
457 iBioTestUtils->Printf(_L("iDescription: %S\n"),&entry.iDescription); |
|
458 iBioTestUtils->Printf(_L("iDetails: %S\n"),&entry.iDetails); |
|
459 |
|
460 iBioTestUtils->ClearScreen(); |
|
461 |
|
462 if (iBioTestUtils->Entry().iMtmData3 != BIO_MSG_ENTRY_PARSED && |
|
463 iBioTestUtils->Entry().iMtmData3 != BIO_MSG_ENTRY_PROCESSED) |
|
464 { |
|
465 iBioTestUtils->WriteComment(_L("BioMg has not been parsed")); |
|
466 User::Leave(KErrGeneral); |
|
467 } |
|
468 |
|
469 iBioTestUtils->Printf(_L("===== Extracted Fields =====\n")); |
|
470 iBioTestUtils->LogExtractedFieldsL(iEntryId); |
|
471 //Get Isp Name from parsed fields |
|
472 CArrayPtrSeg<CParsedField>* parsedFieldArray= &(iBioTestUtils->ParsedFieldArray()); |
|
473 |
|
474 for (TInt j = 0; j < parsedFieldArray->Count(); j++) |
|
475 { |
|
476 if(parsedFieldArray->At(j)->FieldName().CompareF(SMS_ISP_I_NAME) == 0 || |
|
477 parsedFieldArray->At(j)->FieldName().CompareF(SMS_SCRIPT_NAME) == 0) |
|
478 { |
|
479 delete iIspName; |
|
480 iIspName= parsedFieldArray->At(j)->FieldValue().AllocL(); |
|
481 } |
|
482 } |
|
483 |
|
484 LogCommsDbSettingsL(); |
|
485 } |
|
486 |
|
487 void CTestIacp::LogCommsDbSettingsL() |
|
488 { |
|
489 iBioTestUtils->WriteComment(_L("LogCommsDbSettings()")); |
|
490 if(!iIspName) |
|
491 { |
|
492 iBioTestUtils->WriteComment(_L("ISP Name Not found in parsed data")); |
|
493 User::Leave(KErrNotFound); |
|
494 } |
|
495 |
|
496 LogCommsDbDialOutIapL(); |
|
497 LogCommsDbDialInIapL(); |
|
498 LogCommsDbDialOutIspL(); |
|
499 LogCommsDbDialInIspL(); |
|
500 LogProxiesL(); |
|
501 LogCommsDbModemSettingsL(); |
|
502 LogCommsDbLocationSettingsL(); |
|
503 LogCommsDbChargeCardSettingsL(); |
|
504 LogCommsDbGlobalSettings(); |
|
505 } |
|
506 |
|
507 void CTestIacp::LogCommsDbDialOutIapL() |
|
508 { |
|
509 iBioTestUtils->WriteComment(_L("\r\n============= DIAL OUT IAP TABLE ============")); |
|
510 TBuf<1024> tempBuf; |
|
511 TUint32 uval=0ul; |
|
512 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(IAP),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
513 TInt ret =view->GotoFirstRecord(); |
|
514 if(ret== KErrNotFound) |
|
515 { |
|
516 tempBuf = iIspName->Des(); |
|
517 tempBuf.Append(_L(" record not found in IAP table")); |
|
518 iBioTestUtils->WriteComment(tempBuf); |
|
519 CleanupStack::PopAndDestroy(); //view |
|
520 return; |
|
521 } |
|
522 |
|
523 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
524 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
525 iBioTestUtils->WriteComment(tempBuf); |
|
526 |
|
527 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
528 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
529 iBioTestUtils->WriteComment(tempBuf); |
|
530 |
|
531 |
|
532 view->ReadUintL(TPtrC(IAP_ISP), uval); |
|
533 tempBuf.Format(_L("IAP_ISP:\t%d"), uval); |
|
534 iBioTestUtils->WriteComment(tempBuf); |
|
535 |
|
536 //Taken of read IAP_MODEM and IAP_LOCATION as they are no longer valid fields in commdb |
|
537 |
|
538 /* |
|
539 view->ReadUintL(TPtrC(IAP_CHARGECARD), uval); |
|
540 tempBuf.Format(_L("IAP_CHARGECARD:\t%d"), uval); |
|
541 iBioTestUtils->WriteComment(tempBuf); |
|
542 */ |
|
543 |
|
544 CleanupStack::PopAndDestroy(); //view |
|
545 } |
|
546 |
|
547 void CTestIacp::LogCommsDbDialInIapL() |
|
548 { |
|
549 iBioTestUtils->WriteComment(_L("\r\n============= DIAL IN IAP TABLE ============")); |
|
550 TBuf<1024> tempBuf; |
|
551 TUint32 uval=0ul; |
|
552 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(DIAL_IN_IAP),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
553 TInt ret =view->GotoFirstRecord(); |
|
554 if(ret== KErrNotFound) |
|
555 { |
|
556 tempBuf = iIspName->Des(); |
|
557 tempBuf.Append(_L(" record not found in DIAL_IN_IAP table")); |
|
558 iBioTestUtils->WriteComment(tempBuf); |
|
559 CleanupStack::PopAndDestroy(); //view |
|
560 return; |
|
561 } |
|
562 |
|
563 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
564 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
565 iBioTestUtils->WriteComment(tempBuf); |
|
566 |
|
567 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
568 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
569 iBioTestUtils->WriteComment(tempBuf); |
|
570 |
|
571 view->ReadUintL(TPtrC(IAP_ISP),uval); |
|
572 tempBuf.Format(_L("IAP_ISP:\t%d"), uval); |
|
573 iBioTestUtils->WriteComment(tempBuf); |
|
574 |
|
575 //Taken out reading of IAP_MODEM test as it is not part of commdb anymore |
|
576 |
|
577 CleanupStack::PopAndDestroy(); //view |
|
578 } |
|
579 |
|
580 void CTestIacp::LogCommsDbDialOutIspL() |
|
581 { |
|
582 iBioTestUtils->WriteComment(_L("\r\n============= DIAL OUT ISP TABLE ============")); |
|
583 TBuf<1024> tempBuf; |
|
584 TBool boolVal; |
|
585 TUint32 uval=0ul; |
|
586 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(DIAL_OUT_ISP),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
587 TInt ret =view->GotoFirstRecord(); |
|
588 if(ret== KErrNotFound) |
|
589 { |
|
590 tempBuf = iIspName->Des(); |
|
591 tempBuf.Append(_L(" record not found in DIAL_OUT_ISP table")); |
|
592 iBioTestUtils->WriteComment(tempBuf); |
|
593 CleanupStack::PopAndDestroy(); //view |
|
594 return; |
|
595 } |
|
596 |
|
597 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
598 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
599 iBioTestUtils->WriteComment(tempBuf); |
|
600 |
|
601 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
602 iProxyIsp=uval; |
|
603 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
604 iBioTestUtils->WriteComment(tempBuf); |
|
605 |
|
606 view->ReadBoolL(TPtrC(ISP_DIAL_RESOLUTION), boolVal); |
|
607 tempBuf.Format(_L("ISP_DIAL_RESOLUTION:\t%d"), boolVal); |
|
608 iBioTestUtils->WriteComment(tempBuf); |
|
609 |
|
610 view->ReadTextL(TPtrC(ISP_DEFAULT_TEL_NUM), tempBuf); |
|
611 tempBuf.Insert(0, _L("ISP_DEFAULT_TEL_NUM:\t")); |
|
612 iBioTestUtils->WriteComment(tempBuf); |
|
613 |
|
614 view->ReadBoolL(TPtrC(ISP_PROMPT_FOR_LOGIN), boolVal); |
|
615 tempBuf.Format(_L("ISP_PROMPT_FOR_LOGIN:\t%d"), boolVal); |
|
616 iBioTestUtils->WriteComment(tempBuf); |
|
617 |
|
618 view->ReadBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT), boolVal); //EFalse by default |
|
619 tempBuf.Format(_L("ISP_USE_LOGIN_SCRIPT:\t%d"), boolVal); |
|
620 iBioTestUtils->WriteComment(tempBuf); |
|
621 |
|
622 view->ReadTextL(TPtrC(ISP_LOGIN_NAME), tempBuf); |
|
623 tempBuf.Insert(0, _L("ISP_LOGIN_NAME:\t")); |
|
624 iBioTestUtils->WriteComment(tempBuf); |
|
625 |
|
626 view->ReadTextL(TPtrC(ISP_LOGIN_PASS), tempBuf); |
|
627 tempBuf.Insert(0, _L("ISP_LOGIN_PASS:\t")); |
|
628 iBioTestUtils->WriteComment(tempBuf); |
|
629 |
|
630 view->ReadBoolL(TPtrC(ISP_DISPLAY_PCT), boolVal); |
|
631 tempBuf.Format(_L("ISP_DISPLAY_PCT:\t%d"), boolVal); |
|
632 iBioTestUtils->WriteComment(tempBuf); |
|
633 |
|
634 /* |
|
635 view->ReadTextL(TPtrC(ISP_IF_NAME), tempBuf); |
|
636 tempBuf.Insert(0, _L("ISP_IF_NAME:\t")); |
|
637 iBioTestUtils->WriteComment(tempBuf); |
|
638 */ |
|
639 |
|
640 view->ReadTextL(TPtrC(ISP_IF_PARAMS), tempBuf); |
|
641 tempBuf.Insert(0, _L("ISP_IF_PARAMS:\t")); |
|
642 iBioTestUtils->WriteComment(tempBuf); |
|
643 |
|
644 view->ReadTextL(TPtrC(ISP_IF_NETWORKS), tempBuf); |
|
645 tempBuf.Insert(0, _L("ISP_IF_NETWORKS:\t")); |
|
646 iBioTestUtils->WriteComment(tempBuf); |
|
647 |
|
648 view->ReadBoolL(TPtrC(ISP_IF_PROMPT_FOR_AUTH), boolVal); |
|
649 tempBuf.Format(_L("ISP_IF_PROMPT_FOR_AUTH:\t%d"), boolVal); |
|
650 iBioTestUtils->WriteComment(tempBuf); |
|
651 |
|
652 view->ReadTextL(TPtrC(ISP_IF_AUTH_NAME), tempBuf); |
|
653 tempBuf.Insert(0, _L("ISP_IF_AUTH_NAME:\t")); |
|
654 iBioTestUtils->WriteComment(tempBuf); |
|
655 |
|
656 view->ReadTextL(TPtrC(ISP_IF_AUTH_PASS), tempBuf); |
|
657 tempBuf.Insert(0, _L("ISP_IF_AUTH_PASS:\t")); |
|
658 iBioTestUtils->WriteComment(tempBuf); |
|
659 |
|
660 view->ReadBoolL(TPtrC(ISP_IF_CALLBACK_ENABLED), boolVal); |
|
661 tempBuf.Format(_L("ISP_IF_CALLBACK_ENABLED:\t%d"), boolVal); |
|
662 iBioTestUtils->WriteComment(tempBuf); |
|
663 |
|
664 // view->ReadUintL(TPtrC(ISP_IF_CALLBACK_TYPE), uval); |
|
665 // tempBuf.Format(_L("ISP_IF_CALLBACK_TYPE:\t%d"), uval); |
|
666 // iBioTestUtils->WriteComment(tempBuf); |
|
667 |
|
668 TBuf8<256> tempBuf8; |
|
669 view->ReadTextL(TPtrC(ISP_IF_CALLBACK_INFO), tempBuf8); |
|
670 tempBuf.Copy(tempBuf8); |
|
671 tempBuf.Insert(0, _L("ISP_IF_CALLBACK_INFO:\t")); |
|
672 iBioTestUtils->WriteComment(tempBuf); |
|
673 |
|
674 view->ReadBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER), boolVal); |
|
675 tempBuf.Format(_L("ISP_IP_ADDR_FROM_SERVER:\t%d"), boolVal); |
|
676 iBioTestUtils->WriteComment(tempBuf); |
|
677 |
|
678 view->ReadTextL(TPtrC(ISP_IP_ADDR), tempBuf); |
|
679 tempBuf.Insert(0, _L("ISP_IP_ADDR:\t")); |
|
680 iBioTestUtils->WriteComment(tempBuf); |
|
681 |
|
682 view->ReadTextL(TPtrC(ISP_IP_NETMASK), tempBuf); |
|
683 tempBuf.Insert(0, _L("ISP_IP_NETMASK:\t")); |
|
684 iBioTestUtils->WriteComment(tempBuf); |
|
685 |
|
686 view->ReadTextL(TPtrC(ISP_IP_GATEWAY), tempBuf); |
|
687 tempBuf.Insert(0, _L("ISP_IP_GATEWAY:\t")); |
|
688 iBioTestUtils->WriteComment(tempBuf); |
|
689 |
|
690 view->ReadBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER), boolVal); |
|
691 tempBuf.Format(_L("ISP_IP_DNS_ADDR_FROM_SERVER:\t%d"), boolVal); |
|
692 iBioTestUtils->WriteComment(tempBuf); |
|
693 |
|
694 view->ReadTextL(TPtrC(ISP_IP_NAME_SERVER1), tempBuf); |
|
695 tempBuf.Insert(0, _L("ISP_IP_NAME_SERVER1:\t")); |
|
696 iBioTestUtils->WriteComment(tempBuf); |
|
697 |
|
698 view->ReadTextL(TPtrC(ISP_IP_NAME_SERVER2), tempBuf); |
|
699 tempBuf.Insert(0, _L("ISP_IP_NAME_SERVER2:\t")); |
|
700 iBioTestUtils->WriteComment(tempBuf); |
|
701 |
|
702 view->ReadBoolL(TPtrC(ISP_ENABLE_IP_HEADER_COMP), boolVal); |
|
703 tempBuf.Format(_L("ISP_ENABLE_IP_HEADER_COMP:\t%d"), boolVal); |
|
704 iBioTestUtils->WriteComment(tempBuf); |
|
705 |
|
706 view->ReadBoolL(TPtrC(ISP_DISABLE_PLAIN_TEXT_AUTH), boolVal); |
|
707 tempBuf.Format(_L("ISP_DISABLE_PLAIN_TEXT_AUTH:\t%d"), boolVal); |
|
708 iBioTestUtils->WriteComment(tempBuf); |
|
709 |
|
710 view->ReadBoolL(TPtrC(ISP_ENABLE_SW_COMP), boolVal); |
|
711 tempBuf.Format(_L("ISP_ENABLE_SW_COMP:\t%d"), boolVal); |
|
712 iBioTestUtils->WriteComment(tempBuf); |
|
713 |
|
714 view->ReadTextL(TPtrC(ISP_DESCRIPTION), tempBuf); |
|
715 tempBuf.Insert(0, _L("ISP_DESCRIPTION:\t")); |
|
716 iBioTestUtils->WriteComment(tempBuf); |
|
717 |
|
718 view->ReadTextL(TPtrC(ISP_INIT_STRING), tempBuf8); |
|
719 tempBuf.Copy(tempBuf8); |
|
720 tempBuf.Insert(0, _L("ISP_INIT_STRING:\t")); |
|
721 iBioTestUtils->WriteComment(tempBuf); |
|
722 |
|
723 HBufC* existingScript=0; |
|
724 existingScript= view->ReadLongTextLC(TPtrC(ISP_LOGIN_SCRIPT)); |
|
725 iBioTestUtils->WriteComment(_L("ISP_LOGIN_SCRIPT: ")); |
|
726 if(existingScript->Length() > 0) |
|
727 { |
|
728 //Log script (64 chars at time) |
|
729 TPtrC ptr= existingScript->Des(); |
|
730 TInt scriptLength = existingScript->Length(); |
|
731 TInt BufSize=64; |
|
732 TInt count=0; |
|
733 while(count <= scriptLength) |
|
734 { |
|
735 if(scriptLength-count > BufSize ) |
|
736 tempBuf= ptr.Mid(count,BufSize); |
|
737 else |
|
738 tempBuf=ptr.Mid(count,scriptLength-count); |
|
739 |
|
740 iBioTestUtils->WriteComment(tempBuf); |
|
741 count+=BufSize; |
|
742 } |
|
743 } |
|
744 |
|
745 CleanupStack::PopAndDestroy(2); // existingScript, view |
|
746 } |
|
747 |
|
748 void CTestIacp::LogCommsDbDialInIspL() |
|
749 { |
|
750 iBioTestUtils->WriteComment(_L("\r\n============= DIAL IN ISP TABLE ============")); |
|
751 TBuf<1024> tempBuf; |
|
752 TUint32 uval=0ul; |
|
753 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(DIAL_IN_ISP),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
754 TInt ret =view->GotoFirstRecord(); |
|
755 if(ret== KErrNotFound) |
|
756 { |
|
757 tempBuf = iIspName->Des(); |
|
758 tempBuf.Append(_L(" record not found in DIAL_IN_ISP table!!!")); |
|
759 iBioTestUtils->WriteComment(tempBuf); |
|
760 CleanupStack::PopAndDestroy(); //view |
|
761 return; |
|
762 } |
|
763 |
|
764 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
765 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
766 iBioTestUtils->WriteComment(tempBuf); |
|
767 |
|
768 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
769 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
770 iBioTestUtils->WriteComment(tempBuf); |
|
771 |
|
772 CleanupStack::PopAndDestroy(); //view |
|
773 } |
|
774 |
|
775 void CTestIacp::LogProxiesL() |
|
776 { |
|
777 iBioTestUtils->WriteComment(_L("\r\n============= PROXIES TABLE ============")); |
|
778 TBuf<1024> tempBuf; |
|
779 TUint32 uval=0ul; |
|
780 TBool boolVal; |
|
781 CCommsDbTableView* view=iCommDb->OpenViewMatchingUintLC(TPtrC(PROXIES),TPtrC(PROXY_ISP),iProxyIsp); |
|
782 TInt ret =view->GotoFirstRecord(); |
|
783 if(ret== KErrNotFound) |
|
784 { |
|
785 tempBuf = iIspName->Des(); |
|
786 tempBuf.Append(_L(" record not found in PROXIES table!!!")); |
|
787 iBioTestUtils->WriteComment(tempBuf); |
|
788 CleanupStack::PopAndDestroy(); //view |
|
789 return; |
|
790 } |
|
791 |
|
792 // view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
793 // tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
794 // iBioTestUtils->WriteComment(tempBuf); |
|
795 |
|
796 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
797 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
798 iBioTestUtils->WriteComment(tempBuf); |
|
799 |
|
800 view->ReadUintL(TPtrC(PROXY_ISP),uval); |
|
801 tempBuf.Format(_L("PROXY_ISP:\t%d"), uval); |
|
802 iBioTestUtils->WriteComment(tempBuf); |
|
803 |
|
804 HBufC* proxyServerName=0; |
|
805 proxyServerName=view->ReadLongTextLC(TPtrC(PROXY_SERVER_NAME)); |
|
806 iBioTestUtils->WriteComment(_L("PROXY_SERVER_NAME: ")); |
|
807 if(proxyServerName->Length() > 0) |
|
808 { |
|
809 //Log script (64 chars at time) |
|
810 TPtrC ptr= proxyServerName->Des(); |
|
811 TInt proxyLength = proxyServerName->Length(); |
|
812 TInt BufSize=64; |
|
813 TInt count=0; |
|
814 while(count <= proxyLength) |
|
815 { |
|
816 if(proxyLength-count > BufSize ) |
|
817 tempBuf= ptr.Mid(count,BufSize); |
|
818 else |
|
819 tempBuf=ptr.Mid(count,proxyLength-count); |
|
820 |
|
821 iBioTestUtils->WriteComment(tempBuf); |
|
822 count+=BufSize; |
|
823 } |
|
824 } |
|
825 |
|
826 view->ReadBoolL(TPtrC(PROXY_USE_PROXY_SERVER), boolVal); |
|
827 tempBuf.Format(_L("PROXY_USE_PROXY_SERVER:\t%d"), boolVal); |
|
828 iBioTestUtils->WriteComment(tempBuf); |
|
829 |
|
830 |
|
831 view->ReadTextL(TPtrC(PROXY_PROTOCOL_NAME),tempBuf); |
|
832 tempBuf.Insert(0, _L("PROXY_PROTOCOL_NAME:\t")); |
|
833 iBioTestUtils->WriteComment(tempBuf); |
|
834 |
|
835 view->ReadUintL(TPtrC(PROXY_PORT_NUMBER),uval); |
|
836 tempBuf.Format(_L("PROXY_PORT_NUMBER:\t%d"), uval); |
|
837 iBioTestUtils->WriteComment(tempBuf); |
|
838 |
|
839 HBufC* proxyExeptions=0; |
|
840 proxyExeptions=view->ReadLongTextLC(TPtrC(PROXY_EXCEPTIONS)); |
|
841 iBioTestUtils->WriteComment(_L("PROXY_EXCEPTIONS: ")); |
|
842 if(proxyExeptions->Length() > 0) |
|
843 { |
|
844 //Log script (64 chars at time) |
|
845 TPtrC ptr= proxyExeptions->Des(); |
|
846 TInt proxyLength = proxyExeptions->Length(); |
|
847 TInt BufSize=64; |
|
848 TInt count=0; |
|
849 while(count <= proxyLength) |
|
850 { |
|
851 if(proxyLength-count > BufSize ) |
|
852 tempBuf= ptr.Mid(count,BufSize); |
|
853 else |
|
854 tempBuf=ptr.Mid(count,proxyLength-count); |
|
855 |
|
856 iBioTestUtils->WriteComment(tempBuf); |
|
857 count+=BufSize; |
|
858 } |
|
859 } |
|
860 |
|
861 CleanupStack::PopAndDestroy(3); // proxyExeptions,proxyServerName, view |
|
862 } |
|
863 void CTestIacp::LogCommsDbModemSettingsL() |
|
864 { |
|
865 iBioTestUtils->WriteComment(_L("\r\n============= MODEM TABLE ============")); |
|
866 TBuf<1024> tempBuf; |
|
867 TUint32 uval=0ul; |
|
868 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(MODEM),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
869 TInt ret =view->GotoFirstRecord(); |
|
870 if(ret== KErrNotFound) |
|
871 { |
|
872 tempBuf = iIspName->Des(); |
|
873 tempBuf.Append(_L(" record not found in MODEM table!!!")); |
|
874 iBioTestUtils->WriteComment(tempBuf); |
|
875 CleanupStack::PopAndDestroy(); //view |
|
876 return; |
|
877 } |
|
878 |
|
879 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
880 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
881 iBioTestUtils->WriteComment(tempBuf); |
|
882 |
|
883 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
884 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
885 iBioTestUtils->WriteComment(tempBuf); |
|
886 |
|
887 CleanupStack::PopAndDestroy(); //view |
|
888 } |
|
889 |
|
890 void CTestIacp::LogCommsDbLocationSettingsL() |
|
891 { |
|
892 iBioTestUtils->WriteComment(_L("\r\n============= LOCATION TABLE ============")); |
|
893 TBuf<1024> tempBuf; |
|
894 TUint32 uval=0ul; |
|
895 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(LOCATION),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
896 TInt ret =view->GotoFirstRecord(); |
|
897 if(ret== KErrNotFound) |
|
898 { |
|
899 tempBuf = iIspName->Des(); |
|
900 tempBuf.Append(_L(" record not found in LOCATION table!!!")); |
|
901 iBioTestUtils->WriteComment(tempBuf); |
|
902 CleanupStack::PopAndDestroy(); //view |
|
903 return; |
|
904 } |
|
905 |
|
906 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
907 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
908 iBioTestUtils->WriteComment(tempBuf); |
|
909 |
|
910 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
911 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
912 iBioTestUtils->WriteComment(tempBuf); |
|
913 |
|
914 CleanupStack::PopAndDestroy(); //view |
|
915 } |
|
916 |
|
917 void CTestIacp::LogCommsDbChargeCardSettingsL() |
|
918 { |
|
919 iBioTestUtils->WriteComment(_L("\r\n============= CHARGECARD TABLE ============")); |
|
920 TBuf<1024> tempBuf; |
|
921 TUint32 uval=0ul; |
|
922 CCommsDbTableView* view=iCommDb->OpenViewMatchingTextLC(TPtrC(CHARGECARD),TPtrC(COMMDB_NAME),iIspName->Des()); |
|
923 TInt ret =view->GotoFirstRecord(); |
|
924 if(ret== KErrNotFound) |
|
925 { |
|
926 tempBuf = iIspName->Des(); |
|
927 tempBuf.Append(_L(" record not found in CHARGECARD table!!!")); |
|
928 iBioTestUtils->WriteComment(tempBuf); |
|
929 CleanupStack::PopAndDestroy(); //view |
|
930 return; |
|
931 } |
|
932 |
|
933 view->ReadTextL(TPtrC(COMMDB_NAME), tempBuf); |
|
934 tempBuf.Insert(0, _L("COMMDB_NAME:\t")); |
|
935 iBioTestUtils->WriteComment(tempBuf); |
|
936 |
|
937 view->ReadUintL(TPtrC(COMMDB_ID),uval); |
|
938 tempBuf.Format(_L("COMMDB_ID:\t%d"), uval); |
|
939 iBioTestUtils->WriteComment(tempBuf); |
|
940 |
|
941 CleanupStack::PopAndDestroy(); //view |
|
942 } |
|
943 |
|
944 void CTestIacp::LogCommsDbGlobalSettings() |
|
945 { |
|
946 } |
|
947 |
|
948 LOCAL_C void doMainL() |
|
949 { |
|
950 //create a scheduler |
|
951 exampleScheduler = new (ELeave) CExampleScheduler; |
|
952 CleanupStack::PushL( exampleScheduler ); |
|
953 CActiveScheduler::Install( exampleScheduler ); |
|
954 |
|
955 CBioTestUtils* BioTestUtils = CBioTestUtils::NewL(test,ETuGoClientSide | ETuDeleteService | ETuCreateService); |
|
956 CleanupStack::PushL(BioTestUtils); |
|
957 |
|
958 BioTestUtils->GoClientSideL(); |
|
959 BioTestUtils->WriteComment(_L("Msv Client Side Created")); |
|
960 |
|
961 CTestIacp* testParser = CTestIacp::NewL(BioTestUtils); |
|
962 CleanupStack::PushL( testParser ); |
|
963 test(testParser!=NULL); |
|
964 BioTestUtils->WriteComment(_L("CTestIacp Object Created.")); |
|
965 |
|
966 testParser->StartL(EParse); |
|
967 |
|
968 CActiveScheduler::Start(); |
|
969 |
|
970 CleanupStack::PopAndDestroy(3); // testParser, BioTestUtils,exampleScheduler |
|
971 |
|
972 testParser=NULL; |
|
973 BioTestUtils=NULL; |
|
974 exampleScheduler = NULL; |
|
975 } |
|
976 |
|
977 GLDEF_C TInt E32Main() |
|
978 { |
|
979 test.Title(); |
|
980 test.Start(_L("IACP Test Harness")); |
|
981 __UHEAP_MARK; |
|
982 CTrapCleanup* cleanup=CTrapCleanup::New(); |
|
983 test(cleanup!=NULL); |
|
984 TRAPD(error,doMainL()); |
|
985 if (error) |
|
986 test.Printf(_L("Completed with return code %d"),error); |
|
987 delete cleanup; |
|
988 __UHEAP_MARKEND; |
|
989 test.Close(); |
|
990 test.End(); |
|
991 return KErrNone; |
|
992 } |