cbsref/telephonyrefplugins/atltsy/integrationtest/src/testltsycallcontrolnotifyincomingcallcase2.cpp
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     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 "testltsycallcontrolnotifyincomingcallcase2.h"
       
    19 
       
    20 
       
    21 CTestLtsyCallControlNotifyIncomingCallCase2::CTestLtsyCallControlNotifyIncomingCallCase2(CTestLtsyModel& aModel)
       
    22 	: CTestLtsyCallControlBase(aModel)
       
    23 	{
       
    24 	
       
    25 	}
       
    26 
       
    27 
       
    28 CTestLtsyCallControlNotifyIncomingCallCase2::~CTestLtsyCallControlNotifyIncomingCallCase2()
       
    29 	{
       
    30 	
       
    31 	}
       
    32 
       
    33 
       
    34 TVerdict CTestLtsyCallControlNotifyIncomingCallCase2::doTestStepL()
       
    35 	{
       
    36 	INFO_PRINTF1(_L("starting CTestLtsyCallControlNotifyIncomingCallCase2::doTestStepL()"));
       
    37 	
       
    38 	if(TestStepResult() == EPass)
       
    39 		{
       
    40 		TRAPD(err,NotifyIncomingCallOneL());
       
    41 		if (err != KErrNone)
       
    42 			{
       
    43 			SetTestStepResult(EFail);
       
    44 			INFO_PRINTF2(_L("The error was %d when notify incoming call one"),err);
       
    45 			return TestStepResult();
       
    46 			}
       
    47 		
       
    48 		TRAP(err, AnswerIncomingCallOneL());
       
    49 		if (err != KErrNone)
       
    50 			{
       
    51 			SetTestStepResult(EFail);
       
    52 			INFO_PRINTF2(_L("The error was %d when answer incoming call one"),err);
       
    53 			return TestStepResult();
       
    54 			}
       
    55 		
       
    56 		User::After(1000*1000);
       
    57 		
       
    58 		TRAP(err, NotifyIncomingCallTwoL());
       
    59 		if (err != KErrNone)
       
    60 			{
       
    61 			SetTestStepResult(EFail);
       
    62 			INFO_PRINTF2(_L("The error was %d when notify incoming call two"),err);
       
    63 			return TestStepResult();
       
    64 			}
       
    65 		
       
    66 		TRAP(err, AnswerIncomingCallTwoL());
       
    67 		if (err != KErrNone)
       
    68 			{
       
    69 			SetTestStepResult(EFail);
       
    70 			INFO_PRINTF2(_L("The error was %d when answer incoming call two"),err);
       
    71 			return TestStepResult();
       
    72 			}		
       
    73 		
       
    74 		TRAP(err ,HangupCallOneL());
       
    75 		if (err != KErrNone)
       
    76 			{
       
    77 			SetTestStepResult(EFail);
       
    78 			INFO_PRINTF2(_L("The error was %d when hang up call one"),err);
       
    79 			return TestStepResult();
       
    80 			}	
       
    81 		
       
    82 		TRAP(err ,HangupCallTwoL());
       
    83 		if (err != KErrNone)
       
    84 			{
       
    85 			SetTestStepResult(EFail);
       
    86 			INFO_PRINTF2(_L("The error was %d when hang up call two"),err);
       
    87 			return TestStepResult();
       
    88 			}			
       
    89 		
       
    90 		//Close call one
       
    91 		CloseCallOne();
       
    92 		
       
    93 		//Close call two
       
    94 		CloseCallTwo();
       
    95 		}
       
    96 	
       
    97 	return TestStepResult();
       
    98 	}
       
    99 
       
   100 //End of file