| 44 |      1 | // Copyright (c) 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 | // 
 | 
|  |     15 | // 
 | 
|  |     16 | 
 | 
|  |     17 | //user include
 | 
|  |     18 | #include "testltsycallcontroldialemergencycallstopallcalls.h"
 | 
|  |     19 | 
 | 
|  |     20 | _LIT16(KLtsyEmergencyTelNum, "58848157");
 | 
|  |     21 | 
 | 
|  |     22 | CTestLtsyCallControlDialEmergencyCallStopAllCall::CTestLtsyCallControlDialEmergencyCallStopAllCall(CTestLtsyModel& aModel)
 | 
|  |     23 | 	: CTestLtsyCallControlBase(aModel)
 | 
|  |     24 | 	{
 | 
|  |     25 | 	
 | 
|  |     26 | 	}
 | 
|  |     27 | 
 | 
|  |     28 | 
 | 
|  |     29 | CTestLtsyCallControlDialEmergencyCallStopAllCall::~CTestLtsyCallControlDialEmergencyCallStopAllCall()
 | 
|  |     30 | 	{
 | 
|  |     31 | 	
 | 
|  |     32 | 	}
 | 
|  |     33 | 
 | 
|  |     34 | TVerdict CTestLtsyCallControlDialEmergencyCallStopAllCall::doTestStepL()
 | 
|  |     35 | 	{
 | 
|  |     36 | 	INFO_PRINTF1(_L("starting CTestLtsyCallControlDialEmergencyCallStopAllCall::doTestStepL()"));
 | 
|  |     37 | 	
 | 
|  |     38 | 	TRAPD(err,OpenCallOneL());
 | 
|  |     39 | 	if (err != KErrNone)
 | 
|  |     40 | 		{
 | 
|  |     41 | 		SetTestStepResult(EFail);
 | 
|  |     42 | 		INFO_PRINTF2(_L("The error was %d when opne call one"),err);
 | 
|  |     43 | 		return TestStepResult();
 | 
|  |     44 | 		}			
 | 
|  |     45 | 	
 | 
|  |     46 | 	DialCallOne();
 | 
|  |     47 | 	
 | 
|  |     48 | 	User::After(1000*2000);
 | 
|  |     49 | 
 | 
|  |     50 | 	if(TestStepResult() == EPass)
 | 
|  |     51 | 		{
 | 
|  |     52 | 		TRAPD(err,iLtsyModel.CallSharedData().EmergencyCall().OpenNewCall(iLtsyModel.CallSharedData().VoiceLine()));
 | 
|  |     53 | 		if (err != KErrNone)
 | 
|  |     54 | 			{
 | 
|  |     55 | 			SetTestStepResult(EFail);
 | 
|  |     56 | 			INFO_PRINTF2(_L("The error was %d when open emergency call"),err);
 | 
|  |     57 | 			return TestStepResult();			
 | 
|  |     58 | 			}
 | 
|  |     59 | 		}	
 | 
|  |     60 | 	
 | 
|  |     61 | 	TRequestStatus iStatus;
 | 
|  |     62 | 	iLtsyModel.CallSharedData().EmergencyCall().DialEmergencyCall(iStatus, KLtsyEmergencyTelNum);
 | 
|  |     63 | 	User::WaitForRequest(iStatus);
 | 
|  |     64 | 	
 | 
|  |     65 | 	INFO_PRINTF2(_L("Dial emergency call result = %d"),iStatus.Int());
 | 
|  |     66 | 	
 | 
|  |     67 | 	User::After(1000*4000);
 | 
|  |     68 | 	
 | 
|  |     69 | 	iLtsyModel.CallSharedData().EmergencyCall().Close();
 | 
|  |     70 | 	
 | 
|  |     71 | 	CloseCallOne();
 | 
|  |     72 | 	
 | 
|  |     73 | 	return TestStepResult();
 | 
|  |     74 | 	}	
 | 
|  |     75 | 
 | 
|  |     76 | //End of file
 |