cbsref/telephonyrefplugins/atltsy/integrationtest/src/testltsycallcontroldialemergencycall.cpp
changeset 49 f50f4094acd7
equal deleted inserted replaced
48:14460bf2a402 49:f50f4094acd7
       
     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 #include "testltsycallcontroldialemergencycall.h"
       
    18 
       
    19 //const define
       
    20 _LIT16(KLtsyEmergencyNum, "58848158");
       
    21 
       
    22 
       
    23 CTestLtsyCallControlDialEmergencyCall::CTestLtsyCallControlDialEmergencyCall(CTestLtsyModel& aModel)
       
    24 	: CTestLtsyCallControlBase(aModel)
       
    25 	{
       
    26 	
       
    27 	}
       
    28 
       
    29 
       
    30 CTestLtsyCallControlDialEmergencyCall::~CTestLtsyCallControlDialEmergencyCall()
       
    31 	{
       
    32 	
       
    33 	}
       
    34 
       
    35 TVerdict CTestLtsyCallControlDialEmergencyCall::doTestStepL()
       
    36 	{
       
    37 	INFO_PRINTF1(_L("starting CTestLtsyCallControlDialEmergencyCall::doTestStepL()"));
       
    38 	
       
    39 	if(TestStepResult() == EPass)
       
    40 		{
       
    41 		TRAPD(err,iLtsyModel.CallSharedData().EmergencyCall().OpenNewCall(iLtsyModel.CallSharedData().VoiceLine()));
       
    42 		if (err != KErrNone)
       
    43 			{
       
    44 			SetTestStepResult(EFail);
       
    45 			INFO_PRINTF2(_L("The error was %d when open emergency call"),err);
       
    46 			return TestStepResult();			
       
    47 			}
       
    48 		}
       
    49 	
       
    50 	TRequestStatus iStatus;
       
    51 	iLtsyModel.CallSharedData().EmergencyCall().DialEmergencyCall(iStatus, KLtsyEmergencyNum);
       
    52 	User::WaitForRequest(iStatus);
       
    53 	
       
    54 	INFO_PRINTF2(_L("Dial emergency call result = %d"),iStatus.Int());
       
    55 	
       
    56 	User::After(1000*4000);
       
    57 	
       
    58 	iLtsyModel.CallSharedData().EmergencyCall().Close();
       
    59 	
       
    60 	return TestStepResult();
       
    61 	}
       
    62 
       
    63 //End of file