telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestcallcontrol.cpp
branchRCL_3
changeset 8 3f227a47ad75
parent 0 3553901f7fa8
equal deleted inserted replaced
7:fe8b59ab9fa0 8:3f227a47ad75
   567 	// ===  Check call info ===
   567 	// ===  Check call info ===
   568 
   568 
   569 	// Check RCall::GetInfo returns valid call name.
   569 	// Check RCall::GetInfo returns valid call name.
   570 	// Check RCall::GetInfo returns valid voice line name.
   570 	// Check RCall::GetInfo returns valid voice line name.
   571 	// Check RCall::GetInfo returns call status of EStatusIdle.
   571 	// Check RCall::GetInfo returns call status of EStatusIdle.
   572 	// Check RCall::GetInfo returns call duration of 0.
   572 
   573 	RCall::TCallInfo callInfo;
   573 	RCall::TCallInfo callInfo;
   574 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone,  
   574 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone,  
   575 			_L("RCall::GetInfo returned an error"));
   575 			_L("RCall::GetInfo returned an error"));
   576 	ASSERT_TRUE(callInfo.iCallName.Length() >0,  
   576 	ASSERT_TRUE(callInfo.iCallName.Length() >0,  
   577 			_L("RCall::GetInfo returned an invalid  name"));
   577 			_L("RCall::GetInfo returned an invalid  name"));
   578 	ASSERT_TRUE(callInfo.iLineName.Length() >0,  
   578 	ASSERT_TRUE(callInfo.iLineName.Length() >0,  
   579 			_L("RCall::GetInfo returned an invalid  Line name"));
   579 			_L("RCall::GetInfo returned an invalid  Line name"));
   580 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle,    
   580 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle,    
   581 			_L("RCall::GetInfo wrong iStatus, should be EStatusIdle"));
   581 			_L("RCall::GetInfo wrong iStatus, should be EStatusIdle"));
   582 	ASSERT_EQUALS(callInfo.iDuration.Int(), 0,    
       
   583 			_L("RCall::GetInfo wrong iDuration, should be 0"));
       
   584 
   582 
   585 	// Check RMobileCall::GetMobileCallInfo returns iValid with correct flags for returned parameters set.
   583 	// Check RMobileCall::GetMobileCallInfo returns iValid with correct flags for returned parameters set.
   586 	// Check RMobileCall::GetMobileCallInfo returns valid call name.
   584 	// Check RMobileCall::GetMobileCallInfo returns valid call name.
   587 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
   585 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
   588 	RMobileCall::TMobileCallInfoV1 mobileCallInfo;
   586 	RMobileCall::TMobileCallInfoV1 mobileCallInfo;
  9088 	// Post notifier for RMobileCall::NotifyCallEvent
  9086 	// Post notifier for RMobileCall::NotifyCallEvent
  9089 	call1.NotifyCallEvent(notifyCallEventStatus, event);
  9087 	call1.NotifyCallEvent(notifyCallEventStatus, event);
  9090 
  9088 
  9091 	// Post notification RMobilePhone::NotifyDTMFCapsChange
  9089 	// Post notification RMobilePhone::NotifyDTMFCapsChange
  9092 	mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus, dTMFcaps);
  9090 	mobilePhone.NotifyDTMFCapsChange(notifyDTMFCapsChangeStatus, dTMFcaps);
       
  9091 	
       
  9092 	// Post notifier for RCall::NotifyStatusChange
       
  9093 	call1.NotifyStatusChange(notifyCallStatusChangeStatus, callStatus);
       
  9094 	
  9093 	// Resume the call 
  9095 	// Resume the call 
  9094 	TExtEtelRequestStatus resumeStatus(call1, EMobileCallResume);
  9096 	TExtEtelRequestStatus resumeStatus(call1, EMobileCallResume);
  9095 	CleanupStack::PushL(resumeStatus);
  9097 	CleanupStack::PushL(resumeStatus);
  9096 	call1.Resume(resumeStatus);
  9098 	call1.Resume(resumeStatus);
  9097 	ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeStatus, ETimeMedium), KErrNone,  
  9099 	ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeStatus, ETimeMedium), KErrNone,  
  9175 									RMobileCall::ELocalResume,
  9177 									RMobileCall::ELocalResume,
  9176 									wantedStatus);
  9178 									wantedStatus);
  9177 
  9179 
  9178 	// ===  Check DTMF caps ===
  9180 	// ===  Check DTMF caps ===
  9179 
  9181 
  9180     ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10024);
  9182     // Check RMobilePhone::NotifyDTMFCapsChange completes with caps in set of KCapsSendDTMFString | KCapsSendDTMFSingleTone
  9181 	// Check RMobilePhone::NotifyDTMFCapsChange completes with caps in set of KCapsSendDTMFString | KCapsSendDTMFSingleTone
       
  9182 	TUint32 wantedDtmfCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone;
  9183 	TUint32 wantedDtmfCaps = RMobilePhone::KCapsSendDTMFString | RMobilePhone::KCapsSendDTMFSingleTone;
  9183 	iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange(
  9184 	iCallControlTestHelper.WaitForMobilePhoneNotifyDTMFCapsChange(
  9184 										mobilePhone,
  9185 										mobilePhone,
  9185 									  	notifyDTMFCapsChangeStatus,
  9186 									  	notifyDTMFCapsChangeStatus,
  9186 									  	dTMFcaps, 
  9187 									  	dTMFcaps, 
 12806 		callToTransfer->Transfer(transferStatus);
 12807 		callToTransfer->Transfer(transferStatus);
 12807 		ASSERT_EQUALS(WaitForRequestWithTimeOut(transferStatus, ETimeLong), KErrNone, _L("RCall::Transfer timed-out"));
 12808 		ASSERT_EQUALS(WaitForRequestWithTimeOut(transferStatus, ETimeLong), KErrNone, _L("RCall::Transfer timed-out"));
 12808 
 12809 
 12809 		if(callToTransfer == &call2)
 12810 		if(callToTransfer == &call2)
 12810 			{
 12811 			{
 12811 			// There is a Ctsy defect when attempting to transfer call2 (the unheld call), which causes the operation to time-out.
       
 12812 			ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10052);
       
 12813 			ASSERT_EQUALS(transferStatus.Int(), KErrNone, _L("RCall::Transfer of call2 returned with an error"));
 12812 			ASSERT_EQUALS(transferStatus.Int(), KErrNone, _L("RCall::Transfer of call2 returned with an error"));
 12814 			}
 12813 			}
 12815 		else
 12814 		else
 12816 			{
 12815 			{
 12817 			ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10048);
 12816 			ASSERT_EQUALS(transferStatus.Int(), KErrNone, _L("RCall::Transfer returned an unexpected status"));
 12818 			ASSERT_EQUALS(transferStatus.Int(), KErrGsmCCFacilityRejected, _L("RCall::Transfer returned an unexpected status"));
       
 12819 			}
 12817 			}
 12820 		
 12818 		
 12821 		iEtelSessionMgr.ReleaseCall(KMainServer,KMainPhone,KVoiceLine,KCall3);
 12819 		iEtelSessionMgr.ReleaseCall(KMainServer,KMainPhone,KVoiceLine,KCall3);
 12822 		iEtelSessionMgr.ReleaseCall(KMainServer,KMainPhone,KVoiceLine,KCall4);
 12820 		iEtelSessionMgr.ReleaseCall(KMainServer,KMainPhone,KVoiceLine,KCall4);
 12823 	
 12821 	
 13009 	// Post notifier
 13007 	// Post notifier
 13010 	const TInt expectedStatus = KErrNone;
 13008 	const TInt expectedStatus = KErrNone;
 13011 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus (call1, EMobileCallNotifyMobileCallStatusChange);
 13009 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus (call1, EMobileCallNotifyMobileCallStatusChange);
 13012 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus);
 13010 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus);
 13013 	RMobileCall::TMobileCallStatus mobileCallStatus;
 13011 	RMobileCall::TMobileCallStatus mobileCallStatus;
       
 13012 	RMobileCall::TMobileCallStatus mobileCallStatus2;
 13014 	call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
 13013 	call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
 13015 	
 13014 	
 13016 	// Dial a number that answers. 
 13015 	// Dial a number that answers. 
 13017 	TPtrC number; 
 13016 	TPtrC number; 
 13018 	ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("CTestStep::GetStringFromConfig did not complete as expected"));
 13017 	ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("CTestStep::GetStringFromConfig did not complete as expected"));
 13042 	ASSERT_EQUALS(getHoldStatus.Int(), KErrNone, _L("RMobileCall::Hold returned error."));
 13041 	ASSERT_EQUALS(getHoldStatus.Int(), KErrNone, _L("RMobileCall::Hold returned error."));
 13043 	
 13042 	
 13044 	// Post notifier
 13043 	// Post notifier
 13045 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus2 (call2, EMobileCallNotifyMobileCallStatusChange);
 13044 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus2 (call2, EMobileCallNotifyMobileCallStatusChange);
 13046 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus2);
 13045 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus2);
 13047 	call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus);
 13046 	call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2);
 13048 	
 13047 	
 13049 	// Dial another number that answers. 
 13048 	// Dial another number that answers. 
 13050 	ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber2, number) != EFalse, _L("CTestStep::GetStringFromConfig did not complete as expected"));
 13049 	ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber2, number) != EFalse, _L("CTestStep::GetStringFromConfig did not complete as expected"));
 13051 	TCoreEtelRequestStatus<RCall> dialStatus2(call2, &RCall::DialCancel);
 13050 	TCoreEtelRequestStatus<RCall> dialStatus2(call2, &RCall::DialCancel);
 13052 	CleanupStack::PushL(dialStatus2);
 13051 	CleanupStack::PushL(dialStatus2);
 13056 	
 13055 	
 13057 	// Wait for call to be connected.
 13056 	// Wait for call to be connected.
 13058 	expectedMobileCallStatus  = RMobileCall::EStatusConnected;
 13057 	expectedMobileCallStatus  = RMobileCall::EStatusConnected;
 13059 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2,
 13058 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2,
 13060 														                notifyMobileCallStatusChangeStatus2,
 13059 														                notifyMobileCallStatusChangeStatus2,
 13061 														                mobileCallStatus,
 13060 														                mobileCallStatus2,
 13062 														                expectedMobileCallStatus ,
 13061 														                expectedMobileCallStatus ,
 13063 														                expectedStatus);
 13062 														                expectedStatus);
 13064 					
 13063 	
       
 13064 	// Post notifier
       
 13065 	call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
       
 13066 	call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2);
       
 13067 	
 13065 	// Transfer call 1.
 13068 	// Transfer call 1.
 13066 	TExtEtelRequestStatus getTransferStatus(call1, EMobileCallTransfer);
 13069 	TExtEtelRequestStatus getTransferStatus(call1, EMobileCallTransfer);
 13067 	CleanupStack::PushL(getTransferStatus);
 13070 	CleanupStack::PushL(getTransferStatus);
 13068 	call1.Transfer(getTransferStatus);
 13071 	call1.Transfer(getTransferStatus);
 13069 			
 13072 			
 13070 	// Cancel transfer. 
 13073 	// Cancel transfer. 
 13071 	phone.CancelAsyncRequest(EMobileCallTransfer);
 13074 	phone.CancelAsyncRequest(EMobileCallTransfer);
 13072 	
 13075 	
 13073 	// Check KErrGsmCCFacilityRejected returned.
       
 13074 	// $CTSYProblem LTSY propagating error -4285(KErrGsmCCFacilityRejected) to CTSY, which is correctly returning it back to client
       
 13075 	// therefore error code does not indicate an error in the CTSY but rather that the LTSY / network is not supporting the requested operation.
       
 13076 	// Changed test to check if KErrGsmCCFacilityRejected is returned instead of KErrCancel | KErrNone.
       
 13077 	ASSERT_EQUALS(WaitForRequestWithTimeOut(getTransferStatus, ETimeMedium), KErrNone, _L("RTelSubSessionBase::CancelAsyncRequest timed-out"));
 13076 	ASSERT_EQUALS(WaitForRequestWithTimeOut(getTransferStatus, ETimeMedium), KErrNone, _L("RTelSubSessionBase::CancelAsyncRequest timed-out"));
 13078 	ASSERT_EQUALS(getTransferStatus.Int(), KErrGsmCCFacilityRejected, _L("RMobilePhone::CancelAsyncRequest returned with an incorrect status"));
 13077 	ASSERT_TRUE((getTransferStatus.Int() == KErrNone) || (getTransferStatus.Int() == KErrCancel), _L("RMobileCall::Transfer did not return KErrNone or KErrCancel"));
 13079 	
 13078 	
 13080 	// Hang up call1. 
 13079 	if(getTransferStatus.Int() == KErrNone)
 13081 	TCoreEtelRequestStatus<RCall> hangUpStatus (call1,&RCall::HangUpCancel);	
 13080 	    { // call transfering has not been canceled
 13082 	CleanupStack::PushL(hangUpStatus);
 13081         ERR_PRINTF1(_L("<font color=Orange>TransferCancel didn't succeed</font>"));
 13083 	call1.HangUp(hangUpStatus);
 13082         expectedMobileCallStatus  = RMobileCall::EStatusDisconnecting;
 13084 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
 13083         iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
 13085 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone,  _L("RCall::HangUp returned with an error"));
 13084                                                                         notifyMobileCallStatusChangeStatus,
 13086 
 13085                                                                         mobileCallStatus,
 13087 	// Hang up call2. 
 13086                                                                         expectedMobileCallStatus ,
 13088 	TCoreEtelRequestStatus<RCall> hangUpStatus2 (call2,&RCall::HangUpCancel);	
 13087                                                                         expectedStatus);
 13089 	CleanupStack::PushL(hangUpStatus2);
 13088         
 13090 	call2.HangUp(hangUpStatus2);	
 13089         call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
 13091 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus2, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
 13090         
 13092 	ASSERT_EQUALS(hangUpStatus2.Int(), KErrNone,  _L("RCall::HangUp returned with an error"));
 13091         iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2,
       
 13092                                                                         notifyMobileCallStatusChangeStatus2,
       
 13093                                                                         mobileCallStatus2,
       
 13094                                                                         expectedMobileCallStatus ,
       
 13095                                                                         expectedStatus);
       
 13096 
       
 13097         call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2);
       
 13098         expectedMobileCallStatus = RMobileCall::EStatusIdle;
       
 13099         iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
 13100                                                                         notifyMobileCallStatusChangeStatus,
       
 13101                                                                         mobileCallStatus,
       
 13102                                                                         expectedMobileCallStatus ,
       
 13103                                                                         expectedStatus);
       
 13104         
       
 13105         iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2,
       
 13106                                                                         notifyMobileCallStatusChangeStatus2,
       
 13107                                                                         mobileCallStatus2,
       
 13108                                                                         expectedMobileCallStatus ,
       
 13109                                                                         expectedStatus);
       
 13110 
       
 13111         // Check RMobileCall::GetMobileCallStatus returns status of EStatusIdle.
       
 13112         ASSERT_EQUALS(call1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned an error"));
       
 13113         ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusIdle, _L("RMobileCall::GetMobileCallStatus did not set call status EStatusIdle as expected"));
       
 13114 
       
 13115         ASSERT_EQUALS(call2.GetMobileCallStatus(mobileCallStatus2), KErrNone, _L("RMobileCall::GetMobileCallStatus returned an error"));
       
 13116         ASSERT_EQUALS(mobileCallStatus2, RMobileCall::EStatusIdle, _L("RMobileCall::GetMobileCallStatus did not set call status EStatusIdle as expected"));
       
 13117 
       
 13118 	    }
       
 13119 	else
       
 13120 	    { // call transfering has been canceled.
       
 13121         // Hang up call1. 
       
 13122         TCoreEtelRequestStatus<RCall> hangUpStatus (call1,&RCall::HangUpCancel);    
       
 13123         CleanupStack::PushL(hangUpStatus);
       
 13124         call1.HangUp(hangUpStatus);
       
 13125         ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
 13126         ASSERT_EQUALS(hangUpStatus.Int(), KErrNone,  _L("RCall::HangUp returned with an error"));
       
 13127     
       
 13128         // Hang up call2. 
       
 13129         TCoreEtelRequestStatus<RCall> hangUpStatus2 (call2,&RCall::HangUpCancel);   
       
 13130         CleanupStack::PushL(hangUpStatus2);
       
 13131         call2.HangUp(hangUpStatus2);    
       
 13132         ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus2, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
 13133         ASSERT_EQUALS(hangUpStatus2.Int(), KErrNone,  _L("RCall::HangUp returned with an error"));
       
 13134         
       
 13135         // hangUpStatus
       
 13136         // hangUpStatus2
       
 13137         CleanupStack::PopAndDestroy(2, &hangUpStatus);
       
 13138 	    }
       
 13139 	
       
 13140 	
 13093 	
 13141 	
 13094 	////////////////////////////////////////////////////////////////
 13142 	////////////////////////////////////////////////////////////////
 13095 	// TEST END
 13143 	// TEST END
 13096 	////////////////////////////////////////////////////////////////
 13144 	////////////////////////////////////////////////////////////////
 13097 
 13145 
 13102 	// dialStatus
 13150 	// dialStatus
 13103 	// getHoldStatus
 13151 	// getHoldStatus
 13104 	// notifyMobileCallStatusChangeStatus2
 13152 	// notifyMobileCallStatusChangeStatus2
 13105 	// dialStatus2
 13153 	// dialStatus2
 13106 	// getTransferStatus
 13154 	// getTransferStatus
 13107 	// hangUpStatus
 13155 
 13108 	// hangUpStatus2
 13156 	CleanupStack::PopAndDestroy(6, &notifyMobileCallStatusChangeStatus);
 13109 	CleanupStack::PopAndDestroy(8, &notifyMobileCallStatusChangeStatus);
       
 13110 	
 13157 	
 13111 	return TestStepResult();
 13158 	return TestStepResult();
 13112 	}
 13159 	}
 13113 
 13160 
 13114 TPtrC CCTSYIntegrationTestCallControl0038::GetTestStepName()
 13161 TPtrC CCTSYIntegrationTestCallControl0038::GetTestStepName()
 13628     TExtEtelRequestStatus setMSClassStatus(packetService, EPacketSetMSClass);
 13675     TExtEtelRequestStatus setMSClassStatus(packetService, EPacketSetMSClass);
 13629 	CleanupStack::PushL(setMSClassStatus);
 13676 	CleanupStack::PushL(setMSClassStatus);
 13630     packetService.SetMSClass(setMSClassStatus, RPacketService::EMSClassAlternateMode);
 13677     packetService.SetMSClass(setMSClassStatus, RPacketService::EMSClassAlternateMode);
 13631     CHECK_EQUALS_L(WaitForRequestWithTimeOut(setMSClassStatus, ETimeLong), KErrNone, _L("RPacketService::SetMSClass timed out"));
 13678     CHECK_EQUALS_L(WaitForRequestWithTimeOut(setMSClassStatus, ETimeLong), KErrNone, _L("RPacketService::SetMSClass timed out"));
 13632     ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10050);
 13679     ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10050);
 13633 	CHECK_TRUE_L(EFalse, _L("This test has been made to leave intentionally as CTSY currently does not support the SetMSClass operation."));		
 13680 //	CTSY currently does not support the SetMSClass operation		
 13634     CHECK_EQUALS_L(setMSClassStatus.Int(), KErrNone, _L("RPacketService::SetMSClass returned an error"));
 13681     CHECK_EQUALS_L(setMSClassStatus.Int(), KErrNone, _L("RPacketService::SetMSClass returned an error"));
 13635 
 13682 
 13636 	// Set the preferred bearer to EBearerPacketSwitched
 13683 	// Set the preferred bearer to EBearerPacketSwitched
 13637 	TExtEtelRequestStatus setPreferredBearerStatus(packetService, EPacketSetPrefBearer);
 13684 	TExtEtelRequestStatus setPreferredBearerStatus(packetService, EPacketSetPrefBearer);
 13638 	CleanupStack::PushL(setPreferredBearerStatus);
 13685 	CleanupStack::PushL(setPreferredBearerStatus);
 13924 
 13971 
 13925 	// Immediately cancel the hang up request with RCall::HangUpCancel.
 13972 	// Immediately cancel the hang up request with RCall::HangUpCancel.
 13926 	call1.HangUpCancel();
 13973 	call1.HangUpCancel();
 13927 		
 13974 		
 13928 	// Check hang up is cancelled.
 13975 	// Check hang up is cancelled.
 13929 	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 50007);
       
 13930 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeShort), KErrNone, _L("RCall::HangUpCancel timed-out"));
 13976 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeShort), KErrNone, _L("RCall::HangUpCancel timed-out"));
 13931 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNotSupported, _L("RCall::HangUpCancel returned with an error"));
 13977 	ASSERT_TRUE((hangUpStatus.Int() == KErrNone) || (hangUpStatus.Int() == KErrCancel), _L("RMobileCall::HangUpCancel did not return KErrNone or KErrCancel"));
 13932 
 13978 	if(hangUpStatus.Int() == KErrNone)
       
 13979 	    {
       
 13980         ERR_PRINTF1(_L("<font color=Orange>HangUpCancel didn't succeed</font>"));
       
 13981 	    }
       
 13982 	else
       
 13983 	    {
       
 13984         call1.HangUp(hangUpStatus);
       
 13985         ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeShort), KErrNone, _L("RCall::HangUpCancel timed-out"));
       
 13986         ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RMobileCall::HangUp did not return KErrNone"));
       
 13987 	    }
 13933 	////////////////////////////////////////////////////////////////
 13988 	////////////////////////////////////////////////////////////////
 13934 	// TEST END
 13989 	// TEST END
 13935 	////////////////////////////////////////////////////////////////
 13990 	////////////////////////////////////////////////////////////////
 13936 
 13991 
 13937     StartCleanup();
 13992     StartCleanup();
 14839 	// ===  Check call info ===
 14894 	// ===  Check call info ===
 14840 
 14895 
 14841 	// Check RCall::GetInfo returns valid call name.
 14896 	// Check RCall::GetInfo returns valid call name.
 14842 	// Check RCall::GetInfo returns valid voice line name.
 14897 	// Check RCall::GetInfo returns valid voice line name.
 14843 	// Check RCall::GetInfo returns call status of EStatusIdle.
 14898 	// Check RCall::GetInfo returns call status of EStatusIdle.
 14844 	// Check RCall::GetInfo returns call duration of 0.
       
 14845 	RCall::TCallInfo callInfo;
 14899 	RCall::TCallInfo callInfo;
 14846 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
 14900 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
 14847 	ASSERT_TRUE(callInfo.iCallName.Length() > 0, _L("RCall::GetInfo returned an invalid call name"));
 14901 	ASSERT_TRUE(callInfo.iCallName.Length() > 0, _L("RCall::GetInfo returned an invalid call name"));
 14848 	ASSERT_TRUE(callInfo.iLineName.Length() > 0,_L("RCall::GetInfo returned an invalid  line name"));
 14902 	ASSERT_TRUE(callInfo.iLineName.Length() > 0,_L("RCall::GetInfo returned an invalid  line name"));
 14849 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, _L("RCall::GetInfo returned wrong status, should be EStatusIdle"));
 14903 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, _L("RCall::GetInfo returned wrong status, should be EStatusIdle"));
 14850 	ASSERT_EQUALS(callInfo.iDuration.Int(), 0, _L("RCall::GetInfo returned a duration other than 0"));
       
 14851 
 14904 
 14852 	// Check RMobileCall::GetMobileCallInfo returns iValid with correct flags for returned parameters set.
 14905 	// Check RMobileCall::GetMobileCallInfo returns iValid with correct flags for returned parameters set.
 14853 	RMobileCall::TMobileCallInfoV1 mobileCallInfo;
 14906 	RMobileCall::TMobileCallInfoV1 mobileCallInfo;
 14854 	RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(mobileCallInfo);
 14907 	RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(mobileCallInfo);
 14855 	ASSERT_EQUALS(call1.GetMobileCallInfo(callInfoPckg), KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error"));
 14908 	ASSERT_EQUALS(call1.GetMobileCallInfo(callInfoPckg), KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error"));
 14856 	iCallControlTestHelper.CheckForValidCallInfo(mobileCallInfo, KErrNone, EFalse);
 14909 
 14857 
 14910 	// Check RMobileCall::GetMobileCallInfo returns valid call status.
       
 14911 	ASSERT_EQUALS(mobileCallInfo.iStatus, RMobileCall::EStatusIdle, _L("RMobileCall::GetMobileCallInfo returned an invalid status"));
       
 14912 	
 14858 	// Check RMobileCall::GetMobileCallInfo returns valid call name.
 14913 	// Check RMobileCall::GetMobileCallInfo returns valid call name.
 14859 	ASSERT_TRUE(mobileCallInfo.iCallName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned an invalid call name"));
 14914 	ASSERT_TRUE(mobileCallInfo.iCallName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned an invalid call name"));
 14860 	
 14915 	
 14861 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
 14916 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
 14862 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
 14917 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
 15598 	
 15653 	
 15599 	////////////////////////////////////////////////////////////////
 15654 	////////////////////////////////////////////////////////////////
 15600 	// TEST START
 15655 	// TEST START
 15601 	////////////////////////////////////////////////////////////////
 15656 	////////////////////////////////////////////////////////////////
 15602 	
 15657 	
 15603 	// Check RCall::GetCallDuration returns KErrEtelCallNotActive
 15658     // Check RCall::GetInfo returns call status of EStatusIdle.
 15604 	// $CTSYProblem.  RCall::GetCallDuration returns KErrNone although there is no active call
 15659     RCall::TCallInfo callInfo;
 15605 	// Got 0, Expected -2007, (KErrEtelCoreBase = -2000 and KErrEtelCallNotActive=KErrEtelCoreBase-7) 
 15660     ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
 15606 	TTimeIntervalSeconds duration;
 15661     ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, _L("RCall::GetInfo returned wrong status, should be EStatusIdle"));
 15607 	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10055);
       
 15608 	ASSERT_EQUALS(call1.GetCallDuration(duration), KErrEtelCallNotActive, 
       
 15609 			_L("RCall::GetCallDuration returned wrong error code, should be KErrEtelCallNotActive"));
       
 15610 
 15662 
 15611 	// post RCall::NotifyCallDurationChange
 15663 	// post RCall::NotifyCallDurationChange
 15612 	TCoreEtelRequestStatus<RCall> notifyCallDurationChangeStatus(call1, &RCall::NotifyCallDurationChangeCancel);
 15664 	TCoreEtelRequestStatus<RCall> notifyCallDurationChangeStatus(call1, &RCall::NotifyCallDurationChangeCancel);
 15613 	CleanupStack::PushL(notifyCallDurationChangeStatus);
 15665 	CleanupStack::PushL(notifyCallDurationChangeStatus);
 15614 	TTimeIntervalSeconds notifyDuration;
 15666 	TTimeIntervalSeconds notifyDuration;
 17296     customApi.GetLifeTime(getLifeTimeStatus, lifeTimePckg);    
 17348     customApi.GetLifeTime(getLifeTimeStatus, lifeTimePckg);    
 17297     ASSERT_EQUALS(WaitForRequestWithTimeOut(getLifeTimeStatus, ETimeLong), KErrNone, _L("RMmCustomAPI::GetLifeTime timed out"));
 17349     ASSERT_EQUALS(WaitForRequestWithTimeOut(getLifeTimeStatus, ETimeLong), KErrNone, _L("RMmCustomAPI::GetLifeTime timed out"));
 17298     ASSERT_EQUALS(getLifeTimeStatus.Int(), KErrNone, _L("RMmCustomAPI::GetLifeTime returned an error"));    
 17350     ASSERT_EQUALS(getLifeTimeStatus.Int(), KErrNone, _L("RMmCustomAPI::GetLifeTime returned an error"));    
 17299     DEBUG_PRINTF3(_L("Life Time param before the call: hours=%d, min=%d"), lifeTimeData.iHours, lifeTimeData.iMinutes);
 17351     DEBUG_PRINTF3(_L("Life Time param before the call: hours=%d, min=%d"), lifeTimeData.iHours, lifeTimeData.iMinutes);
 17300     
 17352     
 17301     TUint8 minutes = lifeTimeData.iMinutes ;
 17353     TUint32 lifTimeInMintues = lifeTimeData.iHours * 60 + lifeTimeData.iMinutes;
 17302     
 17354     
 17303     // Check RPhone::GetLineInfo returns iStatus of EStatusIdle
 17355     // Check RPhone::GetLineInfo returns iStatus of EStatusIdle
 17304     RPhone::TLineInfo lineInfo;
 17356     RPhone::TLineInfo lineInfo;
 17305     TInt lineIndex=0;
 17357     TInt lineIndex=0;
 17306     ASSERT_EQUALS(phone.GetLineInfo(lineIndex, lineInfo), KErrNone,
 17358     ASSERT_EQUALS(phone.GetLineInfo(lineIndex, lineInfo), KErrNone,
 17358 
 17410 
 17359         ASSERT_EQUALS(WaitForRequestWithTimeOut(getLifeTimeStatus, ETimeLong), KErrNone, _L("RMmCustomAPI::GetLifeTime timed out"));
 17411         ASSERT_EQUALS(WaitForRequestWithTimeOut(getLifeTimeStatus, ETimeLong), KErrNone, _L("RMmCustomAPI::GetLifeTime timed out"));
 17360         ASSERT_EQUALS(getLifeTimeStatus.Int(), KErrNone, _L("RMmCustomAPI::GetLifeTime returned an error"));    
 17412         ASSERT_EQUALS(getLifeTimeStatus.Int(), KErrNone, _L("RMmCustomAPI::GetLifeTime returned an error"));    
 17361         DEBUG_PRINTF3(_L("Life Time param after the call: hours=%d, min=%d"), lifeTimeData.iHours, lifeTimeData.iMinutes);   
 17413         DEBUG_PRINTF3(_L("Life Time param after the call: hours=%d, min=%d"), lifeTimeData.iHours, lifeTimeData.iMinutes);   
 17362         
 17414         
 17363         minutes++;
 17415         lifTimeInMintues++;
 17364         ASSERT_TRUE( minutes <= lifeTimeData.iMinutes, _L("Life Time was not updated properly") );
 17416         ASSERT_TRUE( lifTimeInMintues <= (lifeTimeData.iHours * 60 + lifeTimeData.iMinutes), _L("Life Time was not updated properly") );
 17365         }
 17417         }
 17366 
 17418 
 17367     ////////////////////////////////////////////////////////////////
 17419     ////////////////////////////////////////////////////////////////
 17368     // TEST END
 17420     // TEST END
 17369     ////////////////////////////////////////////////////////////////
 17421     ////////////////////////////////////////////////////////////////
 17370 
 17422 
 17371     StartCleanup();
 17423     StartCleanup();
 17372     CleanupStack::PopAndDestroy(3,&getLifeTimeStatus);
 17424     CleanupStack::PopAndDestroy(5,&getLifeTimeStatus);
 17373     return TestStepResult();
 17425     return TestStepResult();
 17374     }
 17426     }
 17375 
 17427 
 17376 TPtrC CCTSYIntegrationTestCallControl0060::GetTestStepName()
 17428 TPtrC CCTSYIntegrationTestCallControl0060::GetTestStepName()
 17377 /**
 17429 /**