cbsref/telephonyrefplugins/atltsy/integrationtest/src/testltsycallcontrolcustomapiterminateallcalls.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 "testltsycallcontrolcustomapiterminateallcalls.h"
       
    18 
       
    19 CTestLtsyCallControlCustomAPITerminateAllCalls::CTestLtsyCallControlCustomAPITerminateAllCalls(CTestLtsyModel& aModel)
       
    20 	: CTestLtsyCallControlBase(aModel)
       
    21 	{
       
    22 	
       
    23 	}
       
    24 
       
    25 CTestLtsyCallControlCustomAPITerminateAllCalls::~CTestLtsyCallControlCustomAPITerminateAllCalls()
       
    26 	{
       
    27 	
       
    28 	}
       
    29 
       
    30 TVerdict CTestLtsyCallControlCustomAPITerminateAllCalls::doTestStepL()
       
    31 	{
       
    32 	INFO_PRINTF1(_L("starting CTestLtsyCallControlCustomAPITerminateAllCalls::doTestStepL()"));
       
    33 	
       
    34 	if(TestStepResult() == EPass)
       
    35 		{
       
    36 		TRAPD(err,NotifyIncomingCallOneL());
       
    37 		if (err != KErrNone)
       
    38 			{
       
    39 			SetTestStepResult(EFail);
       
    40 			INFO_PRINTF2(_L("The error was %d when notify incoming call one"),err);
       
    41 			return TestStepResult();
       
    42 			}
       
    43 		
       
    44 		TRAP(err, AnswerIncomingCallOneL());
       
    45 		if (err != KErrNone)
       
    46 			{
       
    47 			SetTestStepResult(EFail);
       
    48 			INFO_PRINTF2(_L("The error was %d when answer incoming call one"),err);
       
    49 			return TestStepResult();
       
    50 			}
       
    51 		
       
    52 		TRAP(err, CustomAPITerminateAllCallsL());
       
    53 		if (err != KErrNone)
       
    54 			{
       
    55 			SetTestStepResult(EFail);
       
    56 			INFO_PRINTF2(_L("The error was %d when terminat all calls"),err);
       
    57 			return TestStepResult();
       
    58 			}
       
    59 		
       
    60 		//Close call
       
    61 		CloseCallOne();
       
    62 		}
       
    63 	
       
    64 	return TestStepResult();
       
    65 	}
       
    66 
       
    67 //End of file