telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestdatacallcontrol.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2007-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 // Test step definitions for the DataCallControl functional unit.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalTechnology
       
    20 */
       
    21 
       
    22 #include "cctsyintegrationtestdatacallcontrol.h"
       
    23 #include "cctsyinidata.h"
       
    24 #include "tcallcontroltsytesthelper.h"
       
    25 
       
    26 _LIT8(KWriteTestData, "Some data");
       
    27 
       
    28 	
       
    29 CCTSYIntegrationTestDataCallControlBase::CCTSYIntegrationTestDataCallControlBase(CEtelSessionMgr& aEtelSessionMgr)
       
    30 	: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr),
       
    31 		iCallControlTestHelper(*this),
       
    32 		iNetworkTestHelper(*this)
       
    33 /**
       
    34  * Constructor
       
    35  */
       
    36 	{
       
    37 	}
       
    38 
       
    39 CCTSYIntegrationTestDataCallControlBase::~CCTSYIntegrationTestDataCallControlBase()
       
    40 /*
       
    41  * Destructor
       
    42  */
       
    43 	{
       
    44 	}
       
    45 	
       
    46 
       
    47 CCTSYIntegrationTestDataCallControl0001::CCTSYIntegrationTestDataCallControl0001(CEtelSessionMgr& aEtelSessionMgr)
       
    48 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
    49 /**
       
    50  * Constructor.
       
    51  */
       
    52 	{
       
    53 	SetTestStepName(CCTSYIntegrationTestDataCallControl0001::GetTestStepName());
       
    54 	}
       
    55 
       
    56 CCTSYIntegrationTestDataCallControl0001::~CCTSYIntegrationTestDataCallControl0001()
       
    57 /**
       
    58  * Destructor.
       
    59  */
       
    60 	{
       
    61 	}
       
    62 
       
    63 TVerdict CCTSYIntegrationTestDataCallControl0001::doTestStepL()
       
    64 /**
       
    65  * @SYMTestCaseID BA-CTSY-INT-DATC-0001
       
    66  * @SYMFssID BA/CTSY/DATC-0001
       
    67  * @SYMTestCaseDesc Make a circuit switched data call.
       
    68  * @SYMTestPriority High
       
    69  * @SYMTestActions RCall::GetCaps, RMobileCall::GetMobileCallCaps, RCall::HangUp, RMobileCall::NotifyMobileCallCapsChange, RCall::RecoverDataPort, RMobileCall::GetMobileCallStatus, RCall::GetCallParams, RMobileCall::GetMobileCallInfo, RCall::GetInfo, RCall::NotifyStatusChange, RMobileCall::NotifyMobileCallStatusChange, RCall::NotifyHookChange, RCall::NotifyCapsChange, RCall::LoanDataPort, RCall::GetStatus
       
    70  * @SYMTestExpectedResults Pass - Data call can be made. Data can be sent.
       
    71  * @SYMTestType CIT
       
    72  * @SYMTestCaseDependencies live/automatic
       
    73  *
       
    74  * Reason for test: Verify call status, call caps and call info are correct.
       
    75  *
       
    76  * @return - TVerdict code
       
    77  */
       
    78 	{
       
    79 
       
    80 	//
       
    81 	// SET UP
       
    82 	//
       
    83 
       
    84 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
    85  	
       
    86  	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
       
    87 				   _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
    88 		
       
    89 	// Ensure phone supports KCapsData caps. 
       
    90 	RMobilePhone::TCaps mobilephonecaps;
       
    91 	CHECK_EQUALS_L(phone.GetCaps(mobilephonecaps), KErrNone, _L("RMobilePhone::GetCaps"));
       
    92 	TUint32 expectedmobilephoneCaps = RMobilePhone::KCapsData | RMobilePhone::KCapsVoice;
       
    93 	TUint32 unwantedmobilephoneCaps = KNoUnwantedBits;
       
    94 	CHECK_BITS_SET_L(mobilephonecaps.iFlags, expectedmobilephoneCaps, unwantedmobilephoneCaps,
       
    95 					_L("RMobilePhone::GetCaps returned wrong dynamic caps"));
       
    96 	
       
    97 	// Get data line 1. 
       
    98 	RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
    99 
       
   100 	// Get Call 1.
       
   101 	RMobileCall& call1= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
   102 
       
   103 	//
       
   104 	// SET UP END
       
   105 	//
       
   106 	
       
   107 	StartTest();
       
   108 	
       
   109 	//
       
   110 	// TEST START
       
   111 	//
       
   112 	
       
   113 	
       
   114 	// ===  Check call caps ===
       
   115 
       
   116 	// Check RCall::GetCaps supports KCapsDial | KCapsData.
       
   117 	RCall::TCaps callCaps;
       
   118 	TUint32 wantedCallCaps = RCall::KCapsDial | RCall::KCapsData;
       
   119 	ASSERT_EQUALS(call1.GetCaps(callCaps),KErrNone, _L("RCall::GetCaps returned an error"));
       
   120 	ASSERT_BITS_SET(callCaps.iFlags, wantedCallCaps, KNoUnwantedBits, _L("RCall::GetCaps returned wrong caps"));
       
   121 
       
   122 	// Check RMobileCall::GetMobileCallCaps returns iCallControlCaps in set of KCapsData | KCapsDial.
       
   123 	TUint32 wantedCallControlCaps = RMobileCall::KCapsData | RMobileCall::KCapsDial;
       
   124 	TUint32 wantedCallEventCaps = 0;
       
   125 	RMobileCall::TMobileCallCapsV1 mobileCallCaps;
       
   126 	RMobileCall::TMobileCallCapsV1Pckg mobileCallCapsPckg(mobileCallCaps);
       
   127 	ASSERT_EQUALS(call1.GetMobileCallCaps(mobileCallCapsPckg), KErrNone, _L("RMobileCall::GetMobileCallCaps returned an error"));
       
   128 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, wantedCallControlCaps, KNoUnwantedBits,   
       
   129                     _L("RMobileCall::GetMobileCallCaps returned wrong caps"));
       
   130 
       
   131 	// Check RMobileCall::GetMobileCallCaps includes iCallEventCaps in set of 0.
       
   132 	ASSERT_BITS_SET(mobileCallCaps.iCallEventCaps, wantedCallEventCaps, KNoUnwantedBits,
       
   133 			      _L("RMobileCall::GetMobileCallCaps returned unexpected iCallEventCaps"));
       
   134 
       
   135 	// ===  Check call status ===
       
   136 
       
   137 	// Check RCall::GetStatus returns EStatusIdle.
       
   138 	RCall::TStatus callStatus;
       
   139 	ASSERT_EQUALS(call1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an Error"));
       
   140 	ASSERT_EQUALS(callStatus, RCall::EStatusIdle, _L("RCall::GetStatus did not return EStatusIdle"));
       
   141 
       
   142 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusIdle.
       
   143 	RMobileCall::TMobileCallStatus mobileCallStatus;
       
   144 	ASSERT_EQUALS(call1.GetMobileCallStatus(mobileCallStatus), KErrNone,    
       
   145 			_L("RMobileCall::GetMobileCallStatus returned an Error"));
       
   146 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusIdle,    
       
   147 			_L("RMobileCall::GetMobileCallStatus did not set the status to EStatusIdle"));
       
   148 
       
   149 	// ===  Check call info ===
       
   150 
       
   151 	// Check RCall::GetInfo returns valid call name.
       
   152 	RCall::TCallInfo callInfo;
       
   153 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
       
   154 	ASSERT_TRUE(callInfo.iCallName.Length() > 0, _L("RCall::GetInfo returned an invalid call name"));
       
   155 	
       
   156 	// Check RCall::GetInfo returns valid data line name.
       
   157 	ASSERT_TRUE(callInfo.iLineName.Length() > 0,_L("RCall::GetInfo returned an invalid  line name"));
       
   158 	
       
   159 	// Check RCall::GetInfo returns hook status of EHookStatusOn.
       
   160 	// $CTSYProblem CMmCallTsy::GetInfo() returns EHookStatusUnknown always,
       
   161 	// it is hard coded (aCallInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
   162 	ASSERT_EQUALS(callInfo.iHookStatus, RCall::EHookStatusUnknown, _L("RCall::GetInfo returned wrong status, should be EHookStatusUnknown"));
       
   163 
       
   164 	// Check RCall::GetInfo returns call status of EStatusIdle.
       
   165 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, _L("RCall::GetInfo returned wrong status, should be EStatusIdle"));
       
   166 
       
   167 	// Check RCall::GetInfo returns call duration of 0.
       
   168 	ASSERT_EQUALS(callInfo.iDuration.Int(), 0, _L("RCall::GetInfo returned duration > 0, should be 0"));
       
   169 
       
   170 	// Check RMobileCall::GetMobileCallInfo returns iValid > 0.
       
   171 	RMobileCall::TMobileCallInfoV1 mobileCallInfo;
       
   172 	RMobileCall::TMobileCallInfoV1Pckg mobileCallInfoPckg(mobileCallInfo);
       
   173 	ASSERT_EQUALS(call1.GetMobileCallInfo(mobileCallInfoPckg), KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error"));
       
   174 	ASSERT_TRUE(mobileCallInfo.iValid > 0, _L("RMobileCall::GetMobileCallInfo returned iValid <= 0 flags, should be > 0"));
       
   175 	
       
   176 	// Check RMobileCall::GetMobileCallInfo returns valid call name.
       
   177 	ASSERT_TRUE(mobileCallInfo.iCallName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned an invalid call name"));
       
   178 
       
   179 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
       
   180 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
       
   181 
       
   182 	// post notifier for RCall::NotifyStatusChange
       
   183 	TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1, &RCall::NotifyStatusChangeCancel);
       
   184 	CleanupStack::PushL(notifyStatusChangeStatus);
       
   185 	RCall::TStatus notifyCallStatus;
       
   186 	call1.NotifyStatusChange(notifyStatusChangeStatus, notifyCallStatus);
       
   187 
       
   188 	// Post notifiers RMobileCall::NotifyMobileCallStatusChange
       
   189     RMobileCall::TMobileCallStatus notifyMobileCallStatus;
       
   190     TExtEtelRequestStatus notifyMobileCallChangeStatus(call1, EMobileCallNotifyMobileCallStatusChange);
       
   191     CleanupStack::PushL(notifyMobileCallChangeStatus);
       
   192     call1.NotifyMobileCallStatusChange(notifyMobileCallChangeStatus, notifyMobileCallStatus);
       
   193 
       
   194 	// Post Notifier for RCall::NotifyCapsChange
       
   195 	TCoreEtelRequestStatus<RCall> notifyCapsChangeStatus (call1,&RCall::NotifyCapsChangeCancel);	
       
   196 	CleanupStack::PushL(notifyCapsChangeStatus);
       
   197 	RCall::TCaps caps;
       
   198 	call1.NotifyCapsChange(notifyCapsChangeStatus,caps);	
       
   199 
       
   200 	// post a notifier for RMobileCall::NotifyMobileCallCapsChange
       
   201 	TExtEtelRequestStatus notifyMobileCallCapsChangeStatus(call1, EMobileCallNotifyMobileCallCapsChange);
       
   202 	CleanupStack::PushL(notifyMobileCallCapsChangeStatus);
       
   203 	call1.NotifyMobileCallCapsChange(notifyMobileCallCapsChangeStatus, mobileCallCapsPckg);
       
   204 
       
   205 
       
   206 	// post notifier for RCall::NotifyHookChange
       
   207 	// @CTSYProblem NotifyHookChange has never been called
       
   208 	TCoreEtelRequestStatus<RCall> notifyHookChangeStatus(call1, &RCall::NotifyHookChangeCancel);
       
   209 	CleanupStack::PushL(notifyHookChangeStatus);
       
   210 	RCall::THookStatus hookStatus;
       
   211 	call1.NotifyHookChange(notifyHookChangeStatus, hookStatus);
       
   212 
       
   213 	// Dial a number that answers. 
       
   214 	TPtrC number;
       
   215 	ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected"));
       
   216 	TCoreEtelRequestStatus<RCall> dialStatus(call1, &RCall::DialCancel);
       
   217 	CleanupStack::PushL(dialStatus);
       
   218 	DisplayUserInteractionPromptL(_L("Board now dials to DataNumber1 (press any key to start dialling) "), ETimeLong);
       
   219 	call1.Dial(dialStatus, number);
       
   220     DEBUG_PRINTF2(_L("Dialling data call: %S"), &number);
       
   221 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeVeryLong), KErrNone, _L("RCall::Dial timed-out"));
       
   222 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   223 
       
   224 	// ===  Check call status ===
       
   225 
       
   226 	// Check RCall::NotifyStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected.
       
   227 	RCall::TStatus expectedCallStatus = RCall::EStatusDialling;
       
   228 	const TInt wantedStatus = KErrNone;
       
   229 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   230 														 notifyStatusChangeStatus,
       
   231 														 notifyCallStatus,
       
   232 														 expectedCallStatus,
       
   233 														 wantedStatus);
       
   234 														 
       
   235 	call1.NotifyStatusChange(notifyStatusChangeStatus, notifyCallStatus);
       
   236 	expectedCallStatus = RCall::EStatusConnecting;
       
   237 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   238 														 notifyStatusChangeStatus,
       
   239 														 notifyCallStatus,
       
   240 														 expectedCallStatus,
       
   241 														 wantedStatus);
       
   242 														 
       
   243 	call1.NotifyStatusChange(notifyStatusChangeStatus, notifyCallStatus);
       
   244 	expectedCallStatus = RCall::EStatusConnected;
       
   245 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   246 														 notifyStatusChangeStatus,
       
   247 														 notifyCallStatus,
       
   248 														 expectedCallStatus,
       
   249 														 wantedStatus);
       
   250 
       
   251 	// Check RCall::GetStatus returns EStatusConnected.
       
   252 	ASSERT_EQUALS(call1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error"));
       
   253 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return EStatusConnected"));
       
   254 
       
   255 	// Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected.
       
   256 	RMobileCall::TMobileCallStatus expectedMobileCallStatus = RMobileCall::EStatusDialling;
       
   257 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
   258 																		 notifyMobileCallChangeStatus,
       
   259 																		 notifyMobileCallStatus,
       
   260 																		 expectedMobileCallStatus,
       
   261 																	  	 wantedStatus);
       
   262 														 
       
   263 	call1.NotifyMobileCallStatusChange(notifyMobileCallChangeStatus, notifyMobileCallStatus);
       
   264 	expectedMobileCallStatus = RMobileCall::EStatusConnecting;
       
   265     iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
   266 																		 notifyMobileCallChangeStatus,
       
   267 																		 notifyMobileCallStatus,
       
   268 																		 expectedMobileCallStatus,
       
   269 																	  	 wantedStatus);
       
   270 														 
       
   271 	call1.NotifyMobileCallStatusChange(notifyMobileCallChangeStatus, notifyMobileCallStatus);
       
   272 	expectedMobileCallStatus = RMobileCall::EStatusConnected;
       
   273 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
   274 																		 notifyMobileCallChangeStatus,
       
   275 																		 notifyMobileCallStatus,
       
   276 																		 expectedMobileCallStatus,
       
   277 																	  	 wantedStatus);
       
   278     call1.NotifyMobileCallStatusChange(notifyMobileCallChangeStatus, notifyMobileCallStatus);
       
   279 
       
   280 
       
   281 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected.
       
   282 	ASSERT_EQUALS(call1.GetMobileCallStatus(mobileCallStatus), KErrNone, 
       
   283 			_L("RMobileCall::GetMobileCallStatus returned an error"));
       
   284 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusConnected, 
       
   285 			_L("RMobileCall::GetMobileCallStatus did not return a status EStatusConnected"));
       
   286 
       
   287 	// ===  Get call parameters ===
       
   288 	RMobileCall::TMobileDataCallParamsV1 checkParams;
       
   289 	RMobileCall::TMobileDataCallParamsV1Pckg checkParamsPkg(checkParams);
       
   290 	call1.GetCallParams(checkParamsPkg);
       
   291 	
       
   292 	// Check RCall::GetCallParams with aParams of type TMobileDataCallParamsV1 returns aParams.iSpeed!=RMobileCall::ESpeedUnspecified
       
   293 	ASSERT_TRUE(checkParams.iSpeed != RMobileCall::ESpeedUnspecified,
       
   294 	            _L("RCall::GetCallParams returned wrongly RMobileCall::ESpeedUnspecified"));
       
   295 	
       
   296 	// Check RCall::GetCallParams with aParams of type TMobileDataCallParamsV1 returns aParams.iService != RMobileCall::EServiceUnspecified
       
   297 	ASSERT_TRUE(checkParams.iService != RMobileCall::EServiceUnspecified,
       
   298 	            _L("RCall::GetCallParams returned wrongly RMobileCall::EServiceUnspecified"));
       
   299 	
       
   300 	// Check RCall::GetCallParams with aParams of type TMobileDataCallParamsV1 returns aParams.iProtocol != RMobileCall::EProtocolUnspecified
       
   301 	// @CTSYProblem RCall::GetCallParams returns EProtocolUnspecified always, it comes from LTSY in CMmCallGsmWcdmaExt::ReceivedCallParams
       
   302 	ASSERT_EQUALS(checkParams.iProtocol,  RMobileCall::EProtocolUnspecified,
       
   303 	            _L("RCall::GetCallParams returned wrongly RMobileCall::EProtocolUnspecified"));
       
   304 	
       
   305 	// ===  Check call caps ===
       
   306 
       
   307 	// Check RCall::NotifyCapsChange completes with caps in set of KCapsData | KCapsHangUp | KCapsLoanDataPort.
       
   308 	// Check RCall::NotifyCapsChange completes with caps NOT in set of KCapsDial | KCapsConnect
       
   309 	RCall::TCaps wantedCaps, unwantedCaps;
       
   310 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsHangUp | RCall::KCapsLoanDataPort;
       
   311 	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsConnect;
       
   312 	iCallControlTestHelper.WaitForCallNotifyCapsChange(call1,
       
   313 													   notifyCapsChangeStatus,
       
   314 													   caps,
       
   315 													   wantedCaps,
       
   316 													   unwantedCaps,
       
   317 													   wantedStatus);
       
   318 
       
   319 	// Check RCall::GetCaps supports caps in set of KCapsHangUp | KCapsData | KCapsLoanDataPort.
       
   320 	// Check RCall::GetCaps supports caps NOT in set of KCapsDial | KCapsConnect
       
   321 	ASSERT_EQUALS(call1.GetCaps(caps), KErrNone, _L("RCall::GetCaps returned an Error"));
       
   322 	wantedCaps.iFlags = RCall::KCapsHangUp | RCall::KCapsData | RCall::KCapsLoanDataPort;
       
   323 	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsConnect;
       
   324 	ASSERT_BITS_SET(caps.iFlags,
       
   325 					wantedCaps.iFlags,
       
   326 					unwantedCaps.iFlags,
       
   327 			        _L("RCall::GetCaps returned wrong caps"));
       
   328 
       
   329 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps in set of KCapsData | KCapsHangUp | KCapsTransfer | KCapsLoanDataPort
       
   330 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps NOT in set of KCapsDial | KCapsConnect
       
   331 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallEventCaps in set of KCapsLocalTransfer | KCapsRemoteTerminate
       
   332 	RMobileCall::TMobileCallCapsV1 wantedMobileCaps;
       
   333 	RMobileCall::TMobileCallCapsV1 unwantedMobileCaps;
       
   334     // @CTSYProblem No KCapsTransfer is sent. 
       
   335 	wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsData | RMobileCall::KCapsHangUp | RMobileCall::KCapsLoanDataPort /* | RMobileCall::KCapsTransfer */;
       
   336 	unwantedMobileCaps.iCallControlCaps = RMobileCall::KCapsDial | RMobileCall::KCapsConnect;
       
   337 	wantedMobileCaps.iCallEventCaps = RMobileCall::KCapsLocalTransfer | RMobileCall::KCapsRemoteTerminate;
       
   338 	TCmpRMobileCallTMobileCallCaps mobileCapsComp(wantedMobileCaps, mobileCallCaps, *this);
       
   339 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallCapsChange(call1,
       
   340 																	   notifyMobileCallCapsChangeStatus,
       
   341 																	   mobileCapsComp,
       
   342 																	   wantedStatus);
       
   343 	call1.NotifyMobileCallCapsChange(notifyMobileCallCapsChangeStatus, mobileCallCapsPckg);
       
   344 
       
   345 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps in set of KCapsData | KCapsHangUp | KCapsTransfer | KCapsLoanDataPort
       
   346 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps NOT in set of KCapsDial | KCapsConnect
       
   347 	ASSERT_EQUALS(call1.GetMobileCallCaps(mobileCallCapsPckg), KErrNone,  
       
   348 			      _L("RMobileCall::GetMobileCallCaps returned an error"));
       
   349     // @CTSYProblem No KCapsTransfer is set. 
       
   350 	wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsData | RMobileCall::KCapsHangUp | RMobileCall::KCapsLoanDataPort /* | RMobileCall::KCapsTransfer */;
       
   351 	unwantedMobileCaps.iCallControlCaps = RMobileCall::KCapsDial | RMobileCall::KCapsConnect;
       
   352 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps,
       
   353                     wantedMobileCaps.iCallControlCaps,
       
   354                     unwantedMobileCaps.iCallControlCaps,
       
   355                     _L("RMobileCall::GetMobileCallCaps returned unexpected iCallControlCaps"));
       
   356 
       
   357 	// Check RMobileCall::GetMobileCallCaps includes iCallEventCaps in set of KCapsLocalTransfer | KCapsRemoteTerminate
       
   358 	wantedMobileCaps.iCallEventCaps = RMobileCall::KCapsLocalTransfer | RMobileCall::KCapsRemoteTerminate;
       
   359     ASSERT_BITS_SET(mobileCallCaps.iCallEventCaps, wantedMobileCaps.iCallEventCaps,
       
   360                     KNoUnwantedBits, 
       
   361                     _L("RMobileCall::GetMobileCallCaps returned unexpected iCallEventCaps"));
       
   362 	
       
   363 	// ===  Check call info ===
       
   364 
       
   365 	// Check RCall::GetInfo returns valid call name.
       
   366 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
       
   367 	ASSERT_TRUE(callInfo.iCallName.Length() > 0, _L("RCall::GetInfo returned an invalid call name"));
       
   368 	
       
   369 	// Check RCall::GetInfo returns valid voice line name.
       
   370 	ASSERT_TRUE(callInfo.iLineName.Length() > 0,_L("RCall::GetInfo returned an invalid  line name"));
       
   371 	
       
   372 	// Check RCall::GetInfo returns hook status of EHookStatusOff.
       
   373 	// $CTSYProblem CMmCallTsy::GetInfo() returns EHookStatusUnknown always,
       
   374 	// it is hard coded (aCallInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
   375 	ASSERT_EQUALS(callInfo.iHookStatus, RCall::EHookStatusUnknown, _L("RCall::GetInfo returned wrong status, should be EHookStatusUnknown"));
       
   376 	
       
   377 	// Check RCall::GetInfo returns call status of EStatusConnected.
       
   378 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusConnected, _L("RCall::GetInfo returned wrong status, should be EStatusConnected"));
       
   379 
       
   380 	// Check RCall::GetInfo returns call duration of > 0.
       
   381 	ASSERT_TRUE(callInfo.iDuration.Int() > 0, _L("RCall::GetInfo returned duration <= 0, should be > 0"));
       
   382 
       
   383 	// Check RMobileCall::GetMobileCallInfo returns iValid > 0.
       
   384 	// Check RMobileCall::GetMobileCallInfo returns data for attributes makred as valid in iValid.
       
   385 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
       
   386 	ASSERT_EQUALS(call1.GetMobileCallInfo(mobileCallInfoPckg), KErrNone,  
       
   387 				  _L("RMobileCall::GetMobileCallInfo returned an error"));
       
   388 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0,  
       
   389 				_L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
       
   390 	ASSERT_TRUE(mobileCallInfo.iValid > 0,  
       
   391 				_L("RMobileCall::GetMobileCallInfo returned unexpected flags in iValid"));
       
   392 	
       
   393 	iCallControlTestHelper.CheckForValidCallInfo(mobileCallInfo);
       
   394 
       
   395 	// ===  Check hook status ===
       
   396 
       
   397 	// Check RCall::NotifyHookChange completes with EHookStatusOff.
       
   398 	// $CTSYProblem adaptation does not support RCall::NotifyHookChange, it gives status -5 (KErrNotSupported).
       
   399 	RCall::THookStatus expectedHookStatus = RCall::EHookStatusOff;
       
   400 	iCallControlTestHelper.WaitForCallNotifyHookChange(call1,
       
   401 													notifyHookChangeStatus,
       
   402 													hookStatus, 
       
   403 													expectedHookStatus,
       
   404 													wantedStatus);
       
   405 
       
   406 	// ===  Loan data port ===
       
   407 
       
   408 	// Declare a RCall::TCommPort 
       
   409 	RCall::TCommPort commPort;
       
   410 
       
   411 	// Loan the data port with RCall::LoanDataPort passing in the TCommPort 
       
   412 	ASSERT_EQUALS(call1.LoanDataPort(commPort), KErrNone,  
       
   413 				  _L("RCall::LoanDataPort returned an error"));
       
   414 
       
   415 	// ===  Check call caps ===
       
   416 
       
   417 	// Check RCall::NotifyCapsChange completes with caps in set of KCapsData | KCapsHangUp | KCapsRecoverDataPort.
       
   418 	// Check RCall::NotifyCapsChange completes with caps NOT in set of KCapsDial | KCapsConnect
       
   419 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsHangUp | RCall::KCapsRecoverDataPort;
       
   420 	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsConnect;
       
   421 	iCallControlTestHelper.WaitForCallNotifyCapsChange(call1,
       
   422 													   notifyCapsChangeStatus,
       
   423 													   caps,
       
   424 													   wantedCaps,
       
   425 													   unwantedCaps,
       
   426 													   wantedStatus);
       
   427 
       
   428 	// Check RCall::GetCaps supports caps in set of KCapsHangUp | KCapsData | KCapsRemoteTerminate.
       
   429 	// Check RCall::GetCaps supports caps NOT in set of KCapsDial | KCapsConnect
       
   430     // @CTSYProblem KCapsRemoteTerminate is not set
       
   431 	ASSERT_EQUALS(call1.GetCaps(caps), KErrNone, _L("RCall::GetCaps returned an Error"));
       
   432 	wantedCaps.iFlags = RCall::KCapsHangUp | RCall::KCapsData /* | RMobileCall::KCapsRemoteTerminate */;
       
   433 	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsConnect;
       
   434 	ASSERT_BITS_SET(caps.iFlags,
       
   435 					wantedCaps.iFlags,
       
   436 					unwantedCaps.iFlags,
       
   437 			        _L("RCall::GetCaps returned wrong caps"));
       
   438 
       
   439 
       
   440 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps in set of KCapsData | KCapsHangUp | KCapsTransfer | KCapsRemoteTerminate
       
   441 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps NOT in set of KCapsDial | KCapsConnect
       
   442 	ASSERT_EQUALS(call1.GetMobileCallCaps(mobileCallCapsPckg), KErrNone,  
       
   443 			      _L("RMobileCall::GetMobileCallCaps returned an error"));
       
   444 	wantedCaps.iFlags = RMobileCall::KCapsData | RMobileCall::KCapsHangUp;
       
   445 	unwantedCaps.iFlags = RMobileCall::KCapsDial | RMobileCall::KCapsConnect;
       
   446 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps,
       
   447 					wantedCaps.iFlags,
       
   448 					unwantedCaps.iFlags,
       
   449 					_L("RMobileCall::GetMobileCallCaps returned unexpected iCallControlCaps"));
       
   450 
       
   451 	// Check RMobileCall::GetMobileCallCaps includes iCallEventCaps in set of KCapsLocalTransfer | KCapsRemoteTerminate
       
   452 	wantedCaps.iFlags = RMobileCall::KCapsLocalTransfer | RMobileCall::KCapsRemoteTerminate;
       
   453 	ASSERT_BITS_SET(mobileCallCaps.iCallEventCaps, wantedCaps.iFlags,
       
   454                     KNoUnwantedBits,
       
   455                     _L("RMobileCall::GetMobileCallCaps returned unexpected iCallEventCaps"));
       
   456 
       
   457 	// ===  Write some data to the port ===
       
   458 
       
   459 	// RCommServ cs; 
       
   460 	RCommServ cs;
       
   461 
       
   462 	// cs.Connect(); 
       
   463 	ASSERT_EQUALS(cs.Connect(), KErrNone,  _L("RRCommServ::Connect returned an error"));
       
   464 
       
   465 	// RComm port; 
       
   466 	RComm port;
       
   467 	
       
   468 	// port.Open(cs,commPort.iPort,ECommShared); 
       
   469 	port.Open(cs, commPort.iPort, ECommShared);
       
   470 	
       
   471 	// port.Write(stat,KWriteTestData);
       
   472 	TRequestStatus writeStatus;
       
   473 	port.Write(writeStatus, KWriteTestData); 
       
   474 
       
   475 	// port.Close();
       
   476 	port.Close();
       
   477 
       
   478 	// cs.Close();
       
   479 	cs.Close();
       
   480 
       
   481 	// ===  Recover the data port ===
       
   482 
       
   483 	// Recover data port with RCall::RecoverDataPort 
       
   484 	ASSERT_EQUALS(call1.RecoverDataPort(), KErrNone, _L("RMobileCall::RecoverDataPort() returned an error"));
       
   485 
       
   486 	// Hang up with RCall::HangUp 
       
   487 	TCoreEtelRequestStatus<RCall> hangUpStatus (call1, &RCall::HangUpCancel);	
       
   488 	CleanupStack::PushL(hangUpStatus);
       
   489 	call1.HangUp(hangUpStatus);
       
   490 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out"));
       
   491 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));	
       
   492 
       
   493 	// ===  Check call caps ===
       
   494 
       
   495 	// Check RCall::NotifyCapsChange completes with caps in set of KCapsData | KCapsDial.
       
   496 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsDial;
       
   497 	unwantedCaps.iFlags = 0;	
       
   498 	iCallControlTestHelper.WaitForCallNotifyCapsChange(call1,
       
   499 													   notifyCapsChangeStatus,
       
   500 													   caps,
       
   501 													   wantedCaps,
       
   502 													   unwantedCaps,
       
   503 													   wantedStatus);
       
   504 
       
   505 	// Check RCall::GetCaps supports KCapsData | KCapsHangUp.
       
   506 	// @CTSYProblem KCapsHangUp is not set
       
   507 	ASSERT_EQUALS(call1.GetCaps(caps), KErrNone, _L("RCall::GetCaps returned an Error"));
       
   508     wantedCaps.iFlags = RCall::KCapsData;
       
   509 	ASSERT_BITS_SET(caps.iFlags, wantedCaps.iFlags, KNoUnwantedBits,
       
   510 			        _L("RCall::GetCaps returned wrong caps"));
       
   511 
       
   512 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps in set of KCapsData | KCapsDial.
       
   513 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallEventCaps in set of 0.
       
   514     // @CTSYProblem NotifyMobileCallCapsChange is not called
       
   515 
       
   516 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps in set of KCapsData | KCapsDial.
       
   517 	ASSERT_EQUALS(call1.GetMobileCallCaps(mobileCallCapsPckg), KErrNone,  
       
   518 			      _L("RMobileCall::GetMobileCallCaps returned an error"));
       
   519     wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsDial | RMobileCall::KCapsData;
       
   520 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, wantedMobileCaps.iCallControlCaps, KNoUnwantedBits,
       
   521 			      _L("RMobileCall::GetMobileCallCaps returned unexpected iCallControlCaps"));
       
   522 
       
   523 	// Check RMobileCall::GetMobileCallCaps includes iCallEventCaps in set of 0.
       
   524 	wantedMobileCaps.iCallEventCaps = 0;
       
   525 	ASSERT_BITS_SET(mobileCallCaps.iCallEventCaps, 0, KNoUnwantedBits,
       
   526 			      _L("RMobileCall::GetMobileCallCaps returned unexpected iCallEventCaps"));
       
   527 
       
   528 	// ===  Check call status ===
       
   529 
       
   530 	// Check RCall::NotifyStatusChange completes with EStatusHangingUp -> EStatusIdle.
       
   531 	expectedCallStatus = RCall::EStatusHangingUp;
       
   532 	call1.NotifyStatusChange(notifyStatusChangeStatus, notifyCallStatus);
       
   533 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   534 														 notifyStatusChangeStatus,
       
   535 														 notifyCallStatus,
       
   536 														 expectedCallStatus,
       
   537 														 wantedStatus);
       
   538 														 
       
   539 	call1.NotifyStatusChange(notifyStatusChangeStatus, notifyCallStatus);
       
   540 	expectedCallStatus = RCall::EStatusIdle;
       
   541 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   542 														 notifyStatusChangeStatus,
       
   543 														 notifyCallStatus,
       
   544 														 expectedCallStatus,
       
   545 														 wantedStatus);
       
   546 														 
       
   547 
       
   548 	// Check RCall::GetStatus returns EStatusIdle.
       
   549 	ASSERT_EQUALS(call1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error"));
       
   550 	ASSERT_EQUALS(callStatus, RCall::EStatusIdle, _L("RCall::GetStatus did not return EStatusIdle"));
       
   551 
       
   552 	// Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDisconnecting -> EStatusIdle.
       
   553 	expectedMobileCallStatus = RMobileCall::EStatusDisconnecting;
       
   554 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
   555 																		 notifyMobileCallChangeStatus,
       
   556 																		 notifyMobileCallStatus,
       
   557 																		 expectedMobileCallStatus,
       
   558 																	  	 wantedStatus);
       
   559 
       
   560 	call1.NotifyMobileCallStatusChange(notifyMobileCallChangeStatus, notifyMobileCallStatus);
       
   561 	expectedMobileCallStatus = RMobileCall::EStatusIdle;
       
   562     iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
   563 																		 notifyMobileCallChangeStatus,
       
   564 																		 notifyMobileCallStatus,
       
   565 																		 expectedMobileCallStatus,
       
   566 																	  	 wantedStatus);
       
   567 
       
   568 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusIdle.
       
   569 	ASSERT_EQUALS(call1.GetMobileCallStatus(mobileCallStatus), KErrNone, 
       
   570 			_L("RMobileCall::GetMobileCallStatus returned an error"));
       
   571 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusIdle, 
       
   572 			_L("RMobileCall::GetMobileCallStatus did not return a status EStatusIdle"));
       
   573 
       
   574 	// ===  Check call info ===
       
   575 
       
   576 	// Check RCall::GetInfo returns valid call name.
       
   577 	ASSERT_EQUALS(call1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
       
   578 	ASSERT_TRUE(callInfo.iCallName.Length() > 0, _L("RCall::GetInfo returned an invalid call name"));
       
   579 
       
   580 	// Check RCall::GetInfo returns valid voice line name.
       
   581 	ASSERT_TRUE(callInfo.iLineName.Length() > 0,_L("RCall::GetInfo returned an invalid  line name"));
       
   582 
       
   583 	// Check RCall::GetInfo returns hook status of EHookStatusOn.
       
   584 	// $CTSYProblem CMmCallTsy::GetInfo() returns EHookStatusUnknown always,
       
   585 	// it is hard coded (aCallInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
   586 	ASSERT_EQUALS(callInfo.iHookStatus, RCall::EHookStatusUnknown, _L("RCall::GetInfo returned wrong status, should be EHookStatusUnknown"));
       
   587 
       
   588 	// Check RCall::GetInfo returns call status of EStatusIdle.
       
   589 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, _L("RCall::GetInfo returned wrong status, should be EStatusIdle"));
       
   590 
       
   591 	// Check RCall::GetInfo returns call duration of > 0.
       
   592 	ASSERT_TRUE(callInfo.iDuration.Int() > 0, _L("RCall::GetInfo returned duration <= 0, should be > 0"));
       
   593 
       
   594 	// Check RMobileCall::GetMobileCallInfo returns iValid > 0.
       
   595 	// Check RMobileCall::GetMobileCallInfo returns data for attributes makred as valid in iValid.
       
   596 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
       
   597 	ASSERT_EQUALS(call1.GetMobileCallInfo(mobileCallInfoPckg), KErrNone,  
       
   598 				  _L("RMobileCall::GetMobileCallInfo returned an error"));
       
   599 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0,  
       
   600 				_L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
       
   601 	ASSERT_TRUE(mobileCallInfo.iValid > 0,  
       
   602 				_L("RMobileCall::GetMobileCallInfo returned unexpected flags in iValid"));
       
   603 
       
   604 	// ===  Check hook status ===
       
   605 
       
   606 	// Check RCall::NotifyHookChange completes with EHookStatusOn.
       
   607 	// $CTSYProblem adaptation does not support RCall::NotifyHookChange, it gives status -5 (KErrNotSupported).
       
   608 	expectedHookStatus = RCall::EHookStatusOn;
       
   609 	iCallControlTestHelper.WaitForCallNotifyHookChange(call1,
       
   610 													notifyHookChangeStatus,
       
   611 													hookStatus, 
       
   612 													expectedHookStatus,
       
   613 													wantedStatus);
       
   614 
       
   615 	
       
   616 	//
       
   617 	// TEST END
       
   618 	//
       
   619 
       
   620     StartCleanup();
       
   621 	
       
   622 	// Pop
       
   623 	// notifyStatusChangeStatus
       
   624 	// notifyMobileCallChangeStatus
       
   625 	// notifyCapsChangeStatus
       
   626 	// notifyMobileCallCapsChangeStatus
       
   627 	// notifyHookChangeStatus
       
   628 	// dialStatus
       
   629 	// hangUpStatus
       
   630 	CleanupStack::PopAndDestroy(7, &notifyStatusChangeStatus);
       
   631 
       
   632 	
       
   633 	return TestStepResult();
       
   634 	}
       
   635 
       
   636 TPtrC CCTSYIntegrationTestDataCallControl0001::GetTestStepName()
       
   637 /**
       
   638  * @return The test step name.
       
   639  */
       
   640 	{
       
   641 	return _L("CCTSYIntegrationTestDataCallControl0001");
       
   642 	}
       
   643 
       
   644 
       
   645 
       
   646 CCTSYIntegrationTestDataCallControl0002::CCTSYIntegrationTestDataCallControl0002(CEtelSessionMgr& aEtelSessionMgr)
       
   647 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
   648 /**
       
   649  * Constructor.
       
   650  */
       
   651 	{
       
   652 	SetTestStepName(CCTSYIntegrationTestDataCallControl0002::GetTestStepName());
       
   653 	}
       
   654 
       
   655 CCTSYIntegrationTestDataCallControl0002::~CCTSYIntegrationTestDataCallControl0002()
       
   656 /**
       
   657  * Destructor.
       
   658  */
       
   659 	{
       
   660 	}
       
   661 
       
   662 TVerdict CCTSYIntegrationTestDataCallControl0002::doTestStepL()
       
   663 /**
       
   664  * @SYMTestCaseID BA-CTSY-INT-DATC-0002
       
   665  * @SYMFssID BA/CTSY/DATC-0002
       
   666  * @SYMTestCaseDesc Make a circuit switched data call.
       
   667  * @SYMTestPriority High
       
   668  * @SYMTestActions RCall::HangUp, RMobileCall::NotifyMobileDataCallCapsChange, RCall::NotifyStatusChange, RMobileCall::GetMobileDataCallCaps, RCall::Dial, RCall::GetBearerServiceInfo
       
   669  * @SYMTestExpectedResults Pass - Data call caps and bearer service info correct.
       
   670  * @SYMTestType CIT
       
   671  * @SYMTestCaseDependencies live/automatic
       
   672  *
       
   673  * Reason for test: Verify data call caps are correct.
       
   674  *
       
   675  * @return - TVerdict code
       
   676  */
       
   677 	{
       
   678 
       
   679 	//
       
   680 	// SET UP
       
   681 	//
       
   682 	
       
   683 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
   684  	
       
   685  	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
       
   686 				   _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
   687 		
       
   688 	// Get data line 1. 
       
   689 	RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
   690 
       
   691 	// Get Call 1.
       
   692 	RMobileCall& call1= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
   693 
       
   694 	//
       
   695 	// SET UP END
       
   696 	//
       
   697 	
       
   698 	StartTest();
       
   699 	
       
   700 	//
       
   701 	// TEST START
       
   702 	//
       
   703 	
       
   704 	// ===  Check default caps set by CTSY ===
       
   705 	RMobileCall::TMobileCallDataCapsV1 dataCallCaps;
       
   706 	RMobileCall::TMobileCallDataCapsV1Pckg CallCapsPckg(dataCallCaps);
       
   707 	ASSERT_EQUALS(call1.GetMobileDataCallCaps(CallCapsPckg), KErrNone, _L("RMobileCall::GetMobileDataCallCaps returned an errror"));
       
   708 
       
   709 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps in set of RMobileCall::KCapsSpeedAutobauding
       
   710 	//         | RMobileCall::KCapsSpeed2400 
       
   711 	//         | RMobileCall::KCapsSpeed4800 
       
   712 	//         | RMobileCall::KCapsSpeed9600 
       
   713 	//         | RMobileCall::KCapsSpeed14400 
       
   714 	//         | RMobileCall::KCapsSpeed19200 
       
   715 	//         | RMobileCall::KCapsSpeed28800 
       
   716 	//         | RMobileCall::KCapsSpeed38400 
       
   717 	//         | RMobileCall::KCapsSpeed43200 
       
   718 	//         | RMobileCall::KCapsSpeed56000 
       
   719 	TUint32 defaultSpeedCaps = RMobileCall::KCapsSpeedAutobauding |
       
   720                                RMobileCall::KCapsSpeed2400 |
       
   721                                RMobileCall::KCapsSpeed4800 |
       
   722                                RMobileCall::KCapsSpeed9600 |
       
   723                                RMobileCall::KCapsSpeed14400 |
       
   724                                RMobileCall::KCapsSpeed19200 |
       
   725                                RMobileCall::KCapsSpeed28800 |
       
   726                                RMobileCall::KCapsSpeed38400 |
       
   727                                RMobileCall::KCapsSpeed43200 |
       
   728                                RMobileCall::KCapsSpeed56000;
       
   729 	ASSERT_BITS_SET(dataCallCaps.iSpeedCaps, defaultSpeedCaps, KNoUnwantedBits,
       
   730 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default speed caps"));
       
   731 
       
   732 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps in set of 
       
   733 	//			 RMobileCall::KCapsDataCircuitAsynchronous
       
   734 	//         | RMobileCall::KCapsDataCircuitAsynchronousRDI 
       
   735 	//         | RMobileCall::KCapsPADAsyncUDI 
       
   736 	//         | RMobileCall::KCapsPADAsyncRDI 
       
   737 	//         | RMobileCall::KCapsPacketAccessSyncUDI 
       
   738 	//         | RMobileCall::KCapsPacketAccessSyncRDI 
       
   739 	TUint32 defaultServiceCaps = RMobileCall::KCapsDataCircuitAsynchronous
       
   740 						         | RMobileCall::KCapsDataCircuitAsynchronousRDI 
       
   741 						         | RMobileCall::KCapsPADAsyncUDI 
       
   742 						         | RMobileCall::KCapsPADAsyncRDI 
       
   743 						         | RMobileCall::KCapsPacketAccessSyncUDI 
       
   744 						         | RMobileCall::KCapsPacketAccessSyncRDI;
       
   745 	ASSERT_BITS_SET(dataCallCaps.iServiceCaps, defaultServiceCaps, KNoUnwantedBits,
       
   746 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default service caps"));
       
   747 
       
   748 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps in set of 
       
   749 	//			RMobileCall::KCapsProtocolV22bis
       
   750 	//         | RMobileCall::KCapsProtocolV32 
       
   751 	//         | RMobileCall::KCapsProtocolV34 
       
   752 	//         | RMobileCall::KCapsProtocolV110 
       
   753 	//         | RMobileCall::KCapsProtocolV120 
       
   754 	//         | RMobileCall::KCapsProtocolX31FlagStuffing 
       
   755 	//         | RMobileCall::KCapsProtocolPIAFS 
       
   756 	TUint32 defaultProtocolCaps = 	RMobileCall::KCapsProtocolV22bis
       
   757 									| RMobileCall::KCapsProtocolV32 
       
   758 									| RMobileCall::KCapsProtocolV34 
       
   759 									| RMobileCall::KCapsProtocolV110 
       
   760 									| RMobileCall::KCapsProtocolV120 
       
   761 									| RMobileCall::KCapsProtocolX31FlagStuffing 
       
   762 									| RMobileCall::KCapsProtocolPIAFS;
       
   763 	ASSERT_BITS_SET(dataCallCaps.iProtocolCaps, defaultProtocolCaps, KNoUnwantedBits,
       
   764 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default protocol caps"));
       
   765 
       
   766 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps in set of 
       
   767 	//			RMobileCall::KCapsTransparent
       
   768 	//         | RMobileCall::KCapsNonTransparent 
       
   769 	//         | RMobileCall::KCapsTransparentPreferred 
       
   770 	//         | RMobileCall::KCapsNonTransparentPreferred 
       
   771 	TUint32 defaultQoSCaps =  RMobileCall::KCapsTransparent
       
   772 							| RMobileCall::KCapsNonTransparent 
       
   773 							| RMobileCall::KCapsTransparentPreferred 
       
   774 							| RMobileCall::KCapsNonTransparentPreferred;
       
   775 	ASSERT_BITS_SET(dataCallCaps.iQoSCaps, defaultQoSCaps, KNoUnwantedBits,
       
   776 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default QoS caps"));
       
   777 
       
   778 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iHscsdSupport=ETrue
       
   779 	ASSERT_TRUE(dataCallCaps.iHscsdSupport != EFalse, _L("RMobileCall::GetMobileDataCallCaps returned hscsd support EFalse"));
       
   780 
       
   781 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iRLPVersionCaps in set of 
       
   782 	//			 RMobileCall::KCapsRLPSingleLinkVersion0
       
   783 	//         | RMobileCall::KCapsRLPSingleLinkVersion1 
       
   784 	//         | RMobileCall::KCapsRLPMultiLinkVersion2 
       
   785 	TUint32 defaultRLPVersionCaps = RMobileCall::KCapsRLPSingleLinkVersion0
       
   786 									| RMobileCall::KCapsRLPSingleLinkVersion1 
       
   787 									| RMobileCall::KCapsRLPMultiLinkVersion2;
       
   788 	ASSERT_BITS_SET(dataCallCaps.iRLPVersionCaps, defaultRLPVersionCaps, KNoUnwantedBits,
       
   789 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default RLPVersion caps"));
       
   790 
       
   791 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iV42bisCaps in set of 
       
   792 	//			RMobileCall::KCapsV42bisTxDirection
       
   793 	//         | RMobileCall::KCapsV42bisRxDirection 
       
   794 	//         | RMobileCall::KCapsV42bisBothDirections 
       
   795 	TUint32 defaultV42bisCaps = RMobileCall::KCapsV42bisTxDirection
       
   796 								| RMobileCall::KCapsV42bisRxDirection 
       
   797 								| RMobileCall::KCapsV42bisBothDirections;
       
   798 	ASSERT_BITS_SET(dataCallCaps.iV42bisCaps, defaultV42bisCaps, KNoUnwantedBits,
       
   799 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default V42bis caps"));
       
   800 
       
   801 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iAsymmetryCaps in set of 
       
   802 	// 			RMobileCall::KCapsAsymmetryNoPreference
       
   803 	//         | RMobileCall::KCapsAsymmetryDownlink 
       
   804 	//         | RMobileCall::KCapsAsymmetryUplink 
       
   805 	TUint32 defaultAsymmetryCaps = RMobileCall::KCapsAsymmetryNoPreference
       
   806 									| RMobileCall::KCapsAsymmetryDownlink 
       
   807 									| RMobileCall::KCapsAsymmetryUplink;
       
   808 	ASSERT_BITS_SET(dataCallCaps.iAsymmetryCaps, defaultAsymmetryCaps, KNoUnwantedBits,
       
   809 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default asymmetry caps"));
       
   810 
       
   811 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iCodingCaps in set of 
       
   812 	//			RMobileCall::KCapsTchCoding48
       
   813 	//         | RMobileCall::KCapsTchCoding96 
       
   814 	//         | RMobileCall::KCapsTchCoding144 
       
   815 	TUint32 defaultCodingCaps = RMobileCall::KCapsTchCoding48
       
   816 								| RMobileCall::KCapsTchCoding96 
       
   817 								| RMobileCall::KCapsTchCoding144;
       
   818 	ASSERT_BITS_SET(dataCallCaps.iCodingCaps, defaultCodingCaps, KNoUnwantedBits,
       
   819 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default coding caps"));
       
   820 
       
   821 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMClass = 0x6
       
   822 	ASSERT_EQUALS(dataCallCaps.iMClass, 0x6, _L("RMobileCall::GetMobileDataCallCaps.iMClass did not return 0x6"));
       
   823 
       
   824 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMaxRxTimeSlots = 0x3
       
   825 	ASSERT_EQUALS(dataCallCaps.iMaxRxTimeSlots, 0x3, _L("RMobileCall::GetMobileDataCallCaps.iMaxRxTimeSlots did not return 0x3"));
       
   826 	
       
   827 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMaxTxTimeSlots = 0x2
       
   828 	ASSERT_EQUALS(dataCallCaps.iMaxTxTimeSlots, 0x2, _L("RMobileCall::GetMobileDataCallCaps.iMaxTxTimeSlots did not return 0x2"));
       
   829 	
       
   830 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iTotalRxTxTimeSlots = 0x4
       
   831 	ASSERT_EQUALS(dataCallCaps.iTotalRxTxTimeSlots, 0x4, _L("RMobileCall::GetMobileDataCallCaps.iTotalRxTxTimeSlots did not return 0x4"));
       
   832 	
       
   833 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iUserInitUpgrade=EFalse
       
   834 	ASSERT_TRUE(dataCallCaps.iUserInitUpgrade == EFalse, _L("RMobileCall::GetMobileDataCallCaps.iUserInitUpgrade did not return EFalse"));
       
   835 
       
   836 	// ===  Check bearer service with no call connected ===
       
   837 	RCall::TBearerService bearerService;
       
   838 
       
   839 	// Check RCall::GetBearerServiceInfo returns KErrNotFound
       
   840 	ASSERT_EQUALS(call1.GetBearerServiceInfo(bearerService), KErrNotFound, 
       
   841 				  _L("RCall::GetBearerServiceInfo didn't return KErrNotFound"));
       
   842 
       
   843 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerCaps = RCall::KBearerCapsCompressionNone | RCall::KBearerCapsProtocolUnknown
       
   844 	TUint bearerCaps = RCall::KBearerCapsCompressionNone | RCall::KBearerCapsProtocolUnknown;
       
   845 	ASSERT_BITS_SET(bearerService.iBearerCaps, bearerCaps, KNoUnwantedBits,
       
   846 					_L("RCall::GetBearerServiceInfo returned wrong bearer caps"));
       
   847 	
       
   848 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerSpeed=RCall::EBearerDataUnknown
       
   849     TUint bearerSpeed = RCall::EBearerDataUnknown;
       
   850 	ASSERT_BITS_SET(bearerService.iBearerSpeed, bearerSpeed, KNoUnwantedBits,
       
   851 					_L("RCall::GetBearerServiceInfo returned wrong bearer speed"));
       
   852 	
       
   853 	// ===  Dial a call with call params ===
       
   854 
       
   855 	// Set up a RMobileCall::TMobileDataCallParamsV1 with 
       
   856 	RMobileCall::TMobileDataCallParamsV1 mobileDataCallParams;
       
   857 	// iService = RMobileCall::EServiceDataCircuitAsync 
       
   858 	mobileDataCallParams.iService = RMobileCall::EServiceDataCircuitAsync;
       
   859 	// iSpeed = RMobileCall::ESpeed9600 
       
   860 	mobileDataCallParams.iSpeed = RMobileCall::ESpeed9600;
       
   861 	// iProtocol = RMobileCall::EProtocolV32 
       
   862 	mobileDataCallParams.iProtocol = RMobileCall::EProtocolV32;
       
   863 	// iQoS = RMobileCall::EQoSNonTransparent 
       
   864 	mobileDataCallParams.iQoS = RMobileCall::EQoSNonTransparent;
       
   865 
       
   866 	RMobileCall::TMobileDataCallParamsV1Pckg mobileDataCallParamsPkg(mobileDataCallParams);
       
   867 
       
   868 	// post notifier for RCall::NotifyStatusChange
       
   869 	TCoreEtelRequestStatus<RCall> notifyCallStatusChangeStatus (call1,&RCall::NotifyStatusChangeCancel);
       
   870 	CleanupStack::PushL(notifyCallStatusChangeStatus);
       
   871 	RCall::TStatus callStatus;
       
   872 	call1.NotifyStatusChange(notifyCallStatusChangeStatus,callStatus);
       
   873 
       
   874 	// Post notify RMobileCall::NotifyMobileDataCallCapsChange
       
   875 	RMobileCall::TMobileCallDataCapsV1 notifydataCallCaps;
       
   876 	RMobileCall::TMobileCallDataCapsV1Pckg notifydataCallCapsPckg(notifydataCallCaps);
       
   877 	TExtEtelRequestStatus notifydataCallCapsStatus(call1, EMobileCallNotifyMobileDataCallCapsChange);
       
   878 	CleanupStack::PushL(notifydataCallCapsStatus);
       
   879 	call1.NotifyMobileDataCallCapsChange(notifydataCallCapsStatus, notifydataCallCapsPckg);
       
   880 
       
   881 	// Dial a number that answers using the data call params 
       
   882 	TCoreEtelRequestStatus<RMobileCall> dialStatus(call1, &RCall::DialCancel);
       
   883 	CleanupStack::PushL(dialStatus);		
       
   884 	TPtrC number;
       
   885 	ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, number) != EFalse,  
       
   886 			_L("GetStringFromConfig did not complete as expected"));
       
   887 	call1.Dial(dialStatus,mobileDataCallParamsPkg, number);
       
   888 	// Wait for completion. 
       
   889 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeVeryLong), KErrNone, 
       
   890 			_L("RCall::Dial timed-out"));
       
   891 	ASSERT_EQUALS(dialStatus.Int(), KErrNone, 
       
   892 			_L("RCall::Dial returned an error"));
       
   893 
       
   894 	// Check RCall::NotifyStatusChange completes with EStatusConnected.
       
   895 	RCall::TStatus expectedCallStatus = RCall::EStatusConnected;
       
   896 	const TInt expectedStatus = KErrNone;
       
   897 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   898 														 notifyCallStatusChangeStatus,
       
   899 														 callStatus,
       
   900 														 expectedCallStatus,
       
   901 														 expectedStatus);
       
   902 
       
   903 	// ===  Check mobile data call caps ===
       
   904 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifydataCallCapsStatus, ETimeMedium), KErrNone, _L("RMobileCall::NotifyMobileDataCallCapsChange timed-out"));
       
   905 
       
   906 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iHscsdSupport=EFalse
       
   907 	ASSERT_TRUE(notifydataCallCaps.iHscsdSupport == EFalse, _L("RMobileCall::NotifyMobileDataCallCapsChange returned hscsd did not support ETrue"));
       
   908 	
       
   909 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iSpeedCaps=RMobileCall::KCapsSpeed9600
       
   910 	ASSERT_BITS_SET(notifydataCallCaps.iSpeedCaps, RMobileCall::KCapsSpeed9600, KNoUnwantedBits,
       
   911 					_L("RMobileCall::NotifyMobileDataCallCapsChange returned wrong speed caps"));
       
   912 	
       
   913 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iProtocolCaps=RMobileCall::KCapsProtocolV32
       
   914 	ASSERT_BITS_SET(notifydataCallCaps.iProtocolCaps, RMobileCall::KCapsProtocolV32, KNoUnwantedBits,
       
   915 					_L("RMobileCall::NotifyMobileDataCallCapsChange returned wrong protocol caps"));
       
   916 
       
   917 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iQoSCaps=RMobileCall::KCapsNonTransparent
       
   918 	ASSERT_BITS_SET(notifydataCallCaps.iQoSCaps, RMobileCall::KCapsNonTransparent, KNoUnwantedBits,
       
   919 					_L("RMobileCall::NotifyMobileDataCallCapsChange returned wrong QoS caps"));
       
   920 
       
   921 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iServiceCaps=RMobileCall::KCapsDataCircuitAsynchronous
       
   922 	ASSERT_BITS_SET(notifydataCallCaps.iServiceCaps, RMobileCall::KCapsDataCircuitAsynchronous, KNoUnwantedBits,
       
   923 					_L("RMobileCall::NotifyMobileDataCallCapsChange returned wrong service caps"));
       
   924 
       
   925 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iHscsdSupport=ETrue
       
   926 	ASSERT_TRUE(dataCallCaps.iHscsdSupport, _L("RMobileCall::GetMobileDataCallCaps returned hscsd support ETrue"));
       
   927 
       
   928 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps=RMobileCall::KCapsSpeed9600
       
   929 	ASSERT_EQUALS(call1.GetMobileDataCallCaps(CallCapsPckg), KErrNone, _L("RMobileCall::GetMobileDataCallCaps returned an errror "));
       
   930 	ASSERT_BITS_SET(dataCallCaps.iSpeedCaps, RMobileCall::KCapsSpeed9600, KNoUnwantedBits,
       
   931 					_L("RMobileCall::GetMobileDataCallCaps returned wrong speed caps"));
       
   932 
       
   933 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps=RMobileCall::KCapsProtocolV32
       
   934 	ASSERT_BITS_SET(dataCallCaps.iProtocolCaps, RMobileCall::KCapsProtocolV32, KNoUnwantedBits,
       
   935 					_L("RMobileCall::GetMobileDataCallCaps returned wrong protocol caps"));
       
   936 
       
   937 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps=RMobileCall::KCapsNonTransparent
       
   938 	ASSERT_BITS_SET(dataCallCaps.iQoSCaps, RMobileCall::KCapsNonTransparent, KNoUnwantedBits,
       
   939 					_L("RMobileCall::GetMobileDataCallCaps returned wrong QoS caps"));
       
   940 
       
   941 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps=RMobileCall::KCapsDataCircuitAsynchronous
       
   942 	ASSERT_BITS_SET(dataCallCaps.iServiceCaps, RMobileCall::KCapsDataCircuitAsynchronous, KNoUnwantedBits,
       
   943 					_L("RMobileCall::GetMobileDataCallCaps returned wrong service caps"));
       
   944 
       
   945 	// ===  Get bearer service info with call connected ===
       
   946 
       
   947 	// Check RCall::GetBearerServiceInfo returns KErrNone
       
   948 	ASSERT_EQUALS(call1.GetBearerServiceInfo(bearerService), KErrNone, 
       
   949 				  _L("RCall::GetBearerServiceInfo didn't return KErrNone"));
       
   950 
       
   951 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerCaps !=RCall::KBearerCapsCompressionUnknown
       
   952 	ASSERT_TRUE(bearerService.iBearerCaps != RCall::KBearerCapsCompressionUnknown, _L("RCall::GetBearerServiceInfo returned wrong bearer caps compression"));
       
   953 
       
   954 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerCaps != RCall::KBearerCapsProtocolUnknown
       
   955 	ASSERT_TRUE(bearerService.iBearerCaps != RCall::KBearerCapsProtocolUnknown, _L("RCall::GetBearerServiceInfo returned wrong bearer caps protocol"));
       
   956 
       
   957 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerSpeed !=RCall::EBearerDataUnknown
       
   958 	ASSERT_TRUE(bearerService.iBearerSpeed != RCall::EBearerDataUnknown, _L("RCall::GetBearerServiceInfo returned wrong bearer speed"));
       
   959 
       
   960 	// ===  Hang up call ===
       
   961 	call1.NotifyStatusChange(notifyCallStatusChangeStatus,callStatus);
       
   962 
       
   963 	// Hang up call with RCall::HangUp 
       
   964 	TCoreEtelRequestStatus<RCall> hangUpStatus (call1,&RCall::HangUpCancel);	
       
   965 	CleanupStack::PushL(hangUpStatus);
       
   966 	call1.HangUp(hangUpStatus);
       
   967 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   968 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::CallHangUp returned an error"));
       
   969 
       
   970 	// Check RCall::NotifyStatusChange completes with EStatusIdle.
       
   971 	expectedCallStatus = RCall::EStatusIdle;
       
   972 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
   973 														 notifyCallStatusChangeStatus,
       
   974 														 callStatus,
       
   975 														 expectedCallStatus,
       
   976 														 expectedStatus);
       
   977 
       
   978 	// ===  Check caps reset ===
       
   979 	ASSERT_EQUALS(call1.GetMobileDataCallCaps(CallCapsPckg), KErrNone, _L("RMobileCall::GetMobileDataCallCaps returned an errror"));
       
   980 
       
   981 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps in set of 
       
   982 	//			 RMobileCall::KCapsSpeedAutobauding
       
   983 	//         | RMobileCall::KCapsSpeed2400 
       
   984 	//         | RMobileCall::KCapsSpeed4800 
       
   985 	//         | RMobileCall::KCapsSpeed9600 
       
   986 	//         | RMobileCall::KCapsSpeed14400 
       
   987 	//         | RMobileCall::KCapsSpeed19200 
       
   988 	//         | RMobileCall::KCapsSpeed28800 
       
   989 	//         | RMobileCall::KCapsSpeed38400 
       
   990 	//         | RMobileCall::KCapsSpeed43200 
       
   991 	//         | RMobileCall::KCapsSpeed56000 
       
   992 	defaultSpeedCaps = RMobileCall::KCapsSpeedAutobauding |
       
   993 						 RMobileCall::KCapsSpeed2400 |
       
   994 						 RMobileCall::KCapsSpeed4800 |
       
   995 						 RMobileCall::KCapsSpeed9600 |
       
   996 						 RMobileCall::KCapsSpeed14400 |
       
   997 						 RMobileCall::KCapsSpeed19200 |
       
   998 						 RMobileCall::KCapsSpeed28800 |
       
   999 						 RMobileCall::KCapsSpeed38400 |
       
  1000 						 RMobileCall::KCapsSpeed43200 |
       
  1001 						 RMobileCall::KCapsSpeed56000;
       
  1002 	ASSERT_BITS_SET(dataCallCaps.iSpeedCaps, defaultSpeedCaps, KNoUnwantedBits,
       
  1003 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default speed caps"));
       
  1004 
       
  1005 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps in set of 
       
  1006 	//RMobileCall::KCapsDataCircuitAsynchronous
       
  1007 	//         | RMobileCall::KCapsDataCircuitAsynchronousRDI 
       
  1008 	//         | RMobileCall::KCapsPADAsyncUDI 
       
  1009 	//         | RMobileCall::KCapsPADAsyncRDI 
       
  1010 	//         | RMobileCall::KCapsPacketAccessSyncUDI 
       
  1011 	//         | RMobileCall::KCapsPacketAccessSyncRDI 
       
  1012 	defaultServiceCaps = RMobileCall::KCapsDataCircuitAsynchronous
       
  1013 				         | RMobileCall::KCapsDataCircuitAsynchronousRDI 
       
  1014 				         | RMobileCall::KCapsPADAsyncUDI 
       
  1015 				         | RMobileCall::KCapsPADAsyncRDI 
       
  1016 				         | RMobileCall::KCapsPacketAccessSyncUDI 
       
  1017 				         | RMobileCall::KCapsPacketAccessSyncRDI;
       
  1018 	ASSERT_BITS_SET(dataCallCaps.iServiceCaps, defaultServiceCaps, KNoUnwantedBits,
       
  1019 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default service caps"));
       
  1020 
       
  1021 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps in set of 
       
  1022 	//			RMobileCall::KCapsProtocolV22bis
       
  1023 	//         | RMobileCall::KCapsProtocolV32 
       
  1024 	//         | RMobileCall::KCapsProtocolV34 
       
  1025 	//         | RMobileCall::KCapsProtocolV110 
       
  1026 	//         | RMobileCall::KCapsProtocolV120 
       
  1027 	//         | RMobileCall::KCapsProtocolX31FlagStuffing 
       
  1028 	//         | RMobileCall::KCapsProtocolPIAFS 
       
  1029 	defaultProtocolCaps = 	RMobileCall::KCapsProtocolV22bis
       
  1030 							| RMobileCall::KCapsProtocolV32 
       
  1031 							| RMobileCall::KCapsProtocolV34 
       
  1032 							| RMobileCall::KCapsProtocolV110 
       
  1033 							| RMobileCall::KCapsProtocolV120 
       
  1034 							| RMobileCall::KCapsProtocolX31FlagStuffing 
       
  1035 							| RMobileCall::KCapsProtocolPIAFS;
       
  1036 	ASSERT_BITS_SET(dataCallCaps.iProtocolCaps, defaultProtocolCaps, KNoUnwantedBits,
       
  1037 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default protocol caps"));
       
  1038 
       
  1039 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps in set of 
       
  1040 	// 			RMobileCall::KCapsTransparent
       
  1041 	//         | RMobileCall::KCapsNonTransparent 
       
  1042 	//         | RMobileCall::KCapsTransparentPreferred 
       
  1043 	//         | RMobileCall::KCapsNonTransparentPreferred 
       
  1044 	defaultQoSCaps =  RMobileCall::KCapsTransparent
       
  1045 					| RMobileCall::KCapsNonTransparent 
       
  1046 					| RMobileCall::KCapsTransparentPreferred 
       
  1047 					| RMobileCall::KCapsNonTransparentPreferred;
       
  1048 	ASSERT_BITS_SET(dataCallCaps.iQoSCaps, defaultQoSCaps, KNoUnwantedBits,
       
  1049 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default QoS caps"));
       
  1050 
       
  1051 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iHscsdSupport=ETrue
       
  1052 	ASSERT_TRUE(dataCallCaps.iHscsdSupport != EFalse, _L("RMobileCall::GetMobileDataCallCaps returned hscsd support EFalse"));
       
  1053 
       
  1054 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iRLPVersionCaps in set of 
       
  1055 	//			 RMobileCall::KCapsRLPSingleLinkVersion0
       
  1056 	//         | RMobileCall::KCapsRLPSingleLinkVersion1 
       
  1057 	//         | RMobileCall::KCapsRLPMultiLinkVersion2 
       
  1058 	defaultRLPVersionCaps = RMobileCall::KCapsRLPSingleLinkVersion0
       
  1059 							| RMobileCall::KCapsRLPSingleLinkVersion1 
       
  1060 							| RMobileCall::KCapsRLPMultiLinkVersion2;
       
  1061 	ASSERT_BITS_SET(dataCallCaps.iRLPVersionCaps, defaultRLPVersionCaps, KNoUnwantedBits,
       
  1062 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default RLPVersion caps"));
       
  1063 
       
  1064 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iV42bisCaps in set of 
       
  1065 	//			RMobileCall::KCapsV42bisTxDirection
       
  1066 	//         | RMobileCall::KCapsV42bisRxDirection 
       
  1067 	//         | RMobileCall::KCapsV42bisBothDirections 
       
  1068 	defaultV42bisCaps = RMobileCall::KCapsV42bisTxDirection
       
  1069 						| RMobileCall::KCapsV42bisRxDirection 
       
  1070 						| RMobileCall::KCapsV42bisBothDirections;
       
  1071 	ASSERT_BITS_SET(dataCallCaps.iV42bisCaps, defaultV42bisCaps, KNoUnwantedBits,
       
  1072 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default V42bis caps"));
       
  1073 
       
  1074 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iAsymmetryCaps in set of 
       
  1075 	// 			RMobileCall::KCapsAsymmetryNoPreference
       
  1076 	//         | RMobileCall::KCapsAsymmetryDownlink 
       
  1077 	//         | RMobileCall::KCapsAsymmetryUplink 
       
  1078 	defaultAsymmetryCaps = RMobileCall::KCapsAsymmetryNoPreference
       
  1079 							| RMobileCall::KCapsAsymmetryDownlink 
       
  1080 							| RMobileCall::KCapsAsymmetryUplink;
       
  1081 	ASSERT_BITS_SET(dataCallCaps.iAsymmetryCaps, defaultAsymmetryCaps, KNoUnwantedBits,
       
  1082 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default asymmetry caps"));
       
  1083 
       
  1084 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iCodingCaps in set of 
       
  1085 	//			RMobileCall::KCapsTchCoding48
       
  1086 	//         | RMobileCall::KCapsTchCoding96 
       
  1087 	//         | RMobileCall::KCapsTchCoding144 
       
  1088 	defaultCodingCaps = RMobileCall::KCapsTchCoding48
       
  1089 						| RMobileCall::KCapsTchCoding96 
       
  1090 						| RMobileCall::KCapsTchCoding144;
       
  1091 	ASSERT_BITS_SET(dataCallCaps.iCodingCaps, defaultCodingCaps, KNoUnwantedBits,
       
  1092 					_L("RMobileCall::GetMobileDataCallCaps returned wrong default coding caps"));
       
  1093 
       
  1094 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMClass = 0x6
       
  1095 	ASSERT_EQUALS(dataCallCaps.iMClass, 0x6, _L("RMobileCall::GetMobileDataCallCaps.iMClass did not return 0x6"));
       
  1096 
       
  1097 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMaxRxTimeSlots = 0x3
       
  1098 	ASSERT_EQUALS(dataCallCaps.iMaxRxTimeSlots, 0x3, _L("RMobileCall::GetMobileDataCallCaps.iMaxRxTimeSlots did not return 0x3"));
       
  1099 	
       
  1100 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMaxTxTimeSlots = 0x2
       
  1101 	ASSERT_EQUALS(dataCallCaps.iMaxTxTimeSlots, 0x2, _L("RMobileCall::GetMobileDataCallCaps.iMaxTxTimeSlots did not return 0x2"));
       
  1102 	
       
  1103 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iTotalRxTxTimeSlots = 0x4
       
  1104 	ASSERT_EQUALS(dataCallCaps.iTotalRxTxTimeSlots, 0x4, _L("RMobileCall::GetMobileDataCallCaps.iTotalRxTxTimeSlots did not return 0x4"));
       
  1105 	
       
  1106 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iUserInitUpgrade=EFalse
       
  1107 	ASSERT_TRUE(dataCallCaps.iUserInitUpgrade == EFalse, _L("RMobileCall::GetMobileDataCallCaps.iUserInitUpgrade did not return EFalse"));
       
  1108 
       
  1109 	// ===  Check bearer service with no call connected ===
       
  1110 
       
  1111 	// Check RCall::GetBearerServiceInfo returns KErrNotFound
       
  1112 	ASSERT_EQUALS(call1.GetBearerServiceInfo(bearerService), KErrNotFound, 
       
  1113 				  _L("RCall::GetBearerServiceInfo didn't return KErrNotFound"));
       
  1114 
       
  1115 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerCaps=RCall::KBearerCapsCompressionNone | RCall::KBearerCapsProtocolUnknown
       
  1116 	bearerCaps = RCall::KBearerCapsCompressionNone | RCall::KBearerCapsProtocolUnknown;
       
  1117 	ASSERT_BITS_SET(bearerService.iBearerCaps, bearerCaps, KNoUnwantedBits,
       
  1118 					_L("RCall::GetBearerServiceInfo returned wrong bearer caps"));
       
  1119 	// Check RCall::GetBearerServiceInfo returns aBearerService.iBearerSpeed=RCall::EBearerDataUnknown
       
  1120 	ASSERT_BITS_SET(bearerService.iBearerSpeed, RCall::EBearerDataUnknown, KNoUnwantedBits,
       
  1121 					_L("RCall::GetBearerServiceInfo returned wrong bearer speed"));
       
  1122 
       
  1123 
       
  1124 	//
       
  1125 	// TEST END
       
  1126 	//
       
  1127 
       
  1128     StartCleanup();
       
  1129 	
       
  1130 	// Pop
       
  1131 	// notifyCallStatusChangeStatus
       
  1132 	// notifydataCallCapsStatus
       
  1133 	// dialStatus
       
  1134 	// hangUpStatus
       
  1135 	CleanupStack::PopAndDestroy(4, &notifyCallStatusChangeStatus);
       
  1136 	
       
  1137 	return TestStepResult();
       
  1138 	}
       
  1139 
       
  1140 TPtrC CCTSYIntegrationTestDataCallControl0002::GetTestStepName()
       
  1141 /**
       
  1142  * @return The test step name.
       
  1143  */
       
  1144 	{
       
  1145 	return _L("CCTSYIntegrationTestDataCallControl0002");
       
  1146 	}
       
  1147 
       
  1148 
       
  1149 
       
  1150 CCTSYIntegrationTestDataCallControl0003::CCTSYIntegrationTestDataCallControl0003(CEtelSessionMgr& aEtelSessionMgr)
       
  1151 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  1152 /**
       
  1153  * Constructor.
       
  1154  */
       
  1155 	{
       
  1156 	SetTestStepName(CCTSYIntegrationTestDataCallControl0003::GetTestStepName());
       
  1157 	}
       
  1158 
       
  1159 CCTSYIntegrationTestDataCallControl0003::~CCTSYIntegrationTestDataCallControl0003()
       
  1160 /**
       
  1161  * Destructor.
       
  1162  */
       
  1163 	{
       
  1164 	}
       
  1165 
       
  1166 TVerdict CCTSYIntegrationTestDataCallControl0003::doTestStepL()
       
  1167 /**
       
  1168  * @SYMTestCaseID BA-CTSY-INT-DATC-0003
       
  1169  * @SYMFssID BA/CTSY/DATC-0003
       
  1170  * @SYMTestCaseDesc Make a circuit switched data call.
       
  1171  * @SYMTestPriority High
       
  1172  * @SYMTestActions RCall::HangUp, RMobileLine::NotifyMobileLineStatusChange, RLine::GetCallInfo, RCall::Dial, RLine::GetCaps, RLine::GetStatus, RMobileLine::GetMobileLineStatus, RLine::NotifyHookChange, RLine::GetHookStatus, RLine::GetInfo
       
  1173  * @SYMTestExpectedResults Pass - Line caps, status and call info correct.
       
  1174  * @SYMTestType CIT
       
  1175  * @SYMTestCaseDependencies live/automatic
       
  1176  *
       
  1177  * Reason for test: Verify line status, call info and caps.
       
  1178  *
       
  1179  * @return - TVerdict code
       
  1180  */
       
  1181 	{
       
  1182 
       
  1183 	//
       
  1184 	// SET UP
       
  1185 	//
       
  1186 	
       
  1187 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  1188  	
       
  1189  	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
       
  1190 				   _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  1191 		
       
  1192 	// Get data line 1. 
       
  1193 	RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  1194 
       
  1195 	// Get Call 1.
       
  1196 	RMobileCall& call1= iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  1197 
       
  1198 
       
  1199 	//
       
  1200 	// SET UP END
       
  1201 	//
       
  1202 	
       
  1203 	StartTest();
       
  1204 	
       
  1205 	//
       
  1206 	// TEST START
       
  1207 	//
       
  1208 	
       
  1209 	
       
  1210 	// ===  Check line caps ===
       
  1211 
       
  1212 	// Check RLine::GetCaps supports caps in set of KCapsData.
       
  1213 	RLine::TCaps lineCaps;
       
  1214 	ASSERT_EQUALS(mobileLine.GetCaps(lineCaps), KErrNone,  
       
  1215 			_L("RMobileLine::GetCaps returned an error"));
       
  1216 	ASSERT_BITS_SET(lineCaps.iFlags, RLine::KCapsData, KNoUnwantedBits, 
       
  1217 			_L("RLine::GetCaps returned wrong caps"));
       
  1218 
       
  1219 	// ===  Check line status ===
       
  1220 
       
  1221 	// Check RLine::GetStatus returns EStatusIdle.
       
  1222 	RCall::TStatus lineStatus;
       
  1223 	ASSERT_EQUALS(mobileLine.GetStatus(lineStatus), KErrNone,  
       
  1224 			_L("RLine::GetStatus returned an error"));
       
  1225 	ASSERT_EQUALS(lineStatus, RCall::EStatusIdle, 
       
  1226 			_L("RLine::GetStatus returned wrong status, should be EStatusIdle"));
       
  1227 
       
  1228 	// Check RMobileLine::GetMobileLineStatus returns EStatusIdle.
       
  1229 	RMobileCall::TMobileCallStatus mobileLineStatus;
       
  1230 	ASSERT_EQUALS(mobileLine.GetMobileLineStatus(mobileLineStatus), KErrNone, 
       
  1231 			_L("RMobileLine::GetMobileLineStatus returned an error"));
       
  1232 	ASSERT_EQUALS(mobileLineStatus, RMobileCall::EStatusIdle,
       
  1233 			_L("RMobileLine::GetMobileLineStatus did not return EStatusIdle as expected"));
       
  1234 
       
  1235 	// ===  Check line info ===
       
  1236 	RLine::TCallInfo callInfo;
       
  1237 	TInt dataLineIndex = 0;
       
  1238 	ASSERT_EQUALS(mobileLine.GetCallInfo(dataLineIndex, callInfo), KErrNone, 
       
  1239 			_L("RLine::GetCallInfo returned an error"));
       
  1240 
       
  1241 	// Check RLine::GetCallInfo returns valid name.
       
  1242 	ASSERT_TRUE(callInfo.iCallName.Length() >0, 
       
  1243 			_L("RLine::GetCallInfo returned an invalid  name"));
       
  1244 
       
  1245 	// Check RLine::GetCallInfo returns caps in set of KCapsData | KCapsDial | KCapsAnswer.
       
  1246     // @CTSYProblem KCapsAnswer is not set
       
  1247 	TUint32 wantedCallCaps = RCall::KCapsData | RCall::KCapsDial;
       
  1248 	ASSERT_BITS_SET(callInfo.iCallCapsFlags, wantedCallCaps, KNoUnwantedBits , 
       
  1249 			_L("RLine::GetCallInfo returned wrong caps"));	
       
  1250 
       
  1251 	// Check RLine::GetCallInfo returns status of EStatusIdle.
       
  1252 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, 
       
  1253 			_L("RLine::GetCallInfo wrong iStatus, should be EStatusIdle"));
       
  1254 	
       
  1255 	// Check RLine::GetInfo returns hook status of EHookStatusOn.
       
  1256 	// $CTSYProblem CMmLineTsy::GetInfo() returns EHookStatusUnknown always,
       
  1257 	// it is hard coded (aLineInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
  1258 	RLine::TLineInfo lineInfo;
       
  1259 	ASSERT_EQUALS(mobileLine.GetInfo(lineInfo),KErrNone, _L("RLine::GetInfo returned an error")); 
       
  1260 	ASSERT_EQUALS(lineInfo.iHookStatus, RCall::EHookStatusUnknown, _L("RLine::GetInfo did not return iHookStatus EHookStatusUnknown"));
       
  1261 	
       
  1262 	// Check RLine::GetInfo returns status of EStatusIdle.
       
  1263 	ASSERT_EQUALS(lineInfo.iStatus, RCall::EStatusIdle, _L("RLine::GetInfo did not return iStatus EStatusIdle"));
       
  1264 
       
  1265 	// @CTSYProblem NotifyHookChange has never been called
       
  1266 	// post notifier for RLine::NotifyHookChange
       
  1267 	TCoreEtelRequestStatus<RLine> notifyHookChangeStatus(mobileLine, &RLine::NotifyHookChangeCancel);
       
  1268 	CleanupStack::PushL(notifyHookChangeStatus);
       
  1269 	RCall::THookStatus hookStatus;
       
  1270 	mobileLine.NotifyHookChange(notifyHookChangeStatus, hookStatus);
       
  1271 
       
  1272 	// post notifier for RLine::NotifyStatusChange
       
  1273 	TCoreEtelRequestStatus<RLine> notifyStatusChangeStatus (mobileLine, &RLine::NotifyStatusChangeCancel);
       
  1274 	CleanupStack::PushL(notifyStatusChangeStatus);
       
  1275 	mobileLine.NotifyStatusChange(notifyStatusChangeStatus, lineStatus);
       
  1276 
       
  1277 	// Post notifiers RMobileLine::NotifyMobileLineStatusChange
       
  1278     TExtEtelRequestStatus notifyMobileLineChangeStatus(mobileLine, EMobileLineNotifyMobileLineStatusChange);
       
  1279     CleanupStack::PushL(notifyMobileLineChangeStatus);
       
  1280     mobileLine.NotifyMobileLineStatusChange(notifyMobileLineChangeStatus, mobileLineStatus);
       
  1281 
       
  1282 	// Dial a number that answers with RCall::Dial 
       
  1283 	TPtrC number;
       
  1284 	ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected"));
       
  1285 	TCoreEtelRequestStatus<RCall> dialStatus(call1, &RCall::DialCancel);
       
  1286 	CleanupStack::PushL(dialStatus);
       
  1287 	DisplayUserInteractionPromptL(_L("Board now dials to DataNumber1 (press any key to start dialling) "), ETimeLong);
       
  1288 	call1.Dial(dialStatus, number);
       
  1289     DEBUG_PRINTF2(_L("Dialling data call: %S"), &number);
       
  1290 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeLong), KErrNone, _L("RCall::Dial timed-out"));
       
  1291 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
  1292 
       
  1293 	// ===  Check hook status ===
       
  1294 
       
  1295 	// Check RLine::NotifyHookChange completes with EHookStatusOff.
       
  1296     // @CTSYProblem NotifyHookChange is not supported
       
  1297 
       
  1298 	// Check RLine::GetHookStatus returns EHookStatusOff.
       
  1299     // @CTSYProblem GetHookStatus is not supported
       
  1300 
       
  1301 	// ===  Check line status ===
       
  1302 
       
  1303 	// Check RLine::NotifyStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected.
       
  1304 	TInt  wantedStatus=KErrNone;
       
  1305 	RCall::TStatus expectedLineStatus = RCall::EStatusDialling;
       
  1306 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
  1307 														 notifyStatusChangeStatus,
       
  1308 														 lineStatus,
       
  1309 														 expectedLineStatus,
       
  1310 														 wantedStatus);
       
  1311 														 
       
  1312 	mobileLine.NotifyStatusChange(notifyStatusChangeStatus, lineStatus);
       
  1313 	expectedLineStatus = RCall::EStatusConnecting;
       
  1314 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
  1315 														 notifyStatusChangeStatus,
       
  1316 														 lineStatus,
       
  1317 														 expectedLineStatus,
       
  1318 														 wantedStatus);
       
  1319 
       
  1320 	mobileLine.NotifyStatusChange(notifyStatusChangeStatus, lineStatus);
       
  1321 	expectedLineStatus = RCall::EStatusConnected;
       
  1322 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
  1323 														 notifyStatusChangeStatus,
       
  1324 														 lineStatus,
       
  1325 														 expectedLineStatus,
       
  1326 														 wantedStatus);
       
  1327 	mobileLine.NotifyStatusChange(notifyStatusChangeStatus, lineStatus);
       
  1328 
       
  1329 	// Check RLine::GetStatus returns EStatusConnected
       
  1330 	ASSERT_EQUALS(mobileLine.GetStatus(lineStatus), KErrNone, _L("RLine::GetHookStatus returned an error"));
       
  1331 	ASSERT_EQUALS(lineStatus, RCall::EStatusConnected, _L("RLine::GetStatus did not return EStatusConnected"));
       
  1332 
       
  1333 	// Check RMobileLine::NotifyMobileLineStatusChange completes with with EStatusDialling -> EStatusConnecting -> EStatusConnected.
       
  1334 	RMobileCall::TMobileCallStatus expectedMobileLineStatus = RMobileCall::EStatusDialling;
       
  1335 	iCallControlTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(mobileLine,
       
  1336 																		 notifyMobileLineChangeStatus,
       
  1337 																		 mobileLineStatus,
       
  1338 																		 expectedMobileLineStatus,
       
  1339 																	  	 wantedStatus);
       
  1340 														 
       
  1341     mobileLine.NotifyMobileLineStatusChange(notifyMobileLineChangeStatus, mobileLineStatus);
       
  1342 	expectedMobileLineStatus = RMobileCall::EStatusConnecting;
       
  1343     iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
  1344 																		 notifyMobileLineChangeStatus,
       
  1345 																		 mobileLineStatus,
       
  1346 																		 expectedMobileLineStatus,
       
  1347 																	  	 wantedStatus);
       
  1348 														 
       
  1349     mobileLine.NotifyMobileLineStatusChange(notifyMobileLineChangeStatus, mobileLineStatus);
       
  1350 	expectedMobileLineStatus = RMobileCall::EStatusConnected;
       
  1351 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1,
       
  1352 																		 notifyMobileLineChangeStatus,
       
  1353 																		 mobileLineStatus,
       
  1354 																		 expectedMobileLineStatus,
       
  1355 																	  	 wantedStatus);
       
  1356 
       
  1357 
       
  1358 	// Check RMobileLine::GetMobileLineStatus returns EStatusConnected
       
  1359 	ASSERT_EQUALS(mobileLine.GetMobileLineStatus(mobileLineStatus), KErrNone, 
       
  1360 			_L("RMobileLine::GetMobileLineStatus returned an error"));
       
  1361 	ASSERT_EQUALS(mobileLineStatus, RMobileCall::EStatusConnected,
       
  1362 			_L("RMobileLine::GetMobileLineStatus did not return EStatusConnected as expected"));
       
  1363 
       
  1364 	// ===  Check line info ===
       
  1365 
       
  1366 	ASSERT_EQUALS(mobileLine.GetCallInfo(dataLineIndex, callInfo), KErrNone, 
       
  1367 			_L("RLine::GetCallInfo returned an error"));
       
  1368 
       
  1369 	// Check RLine::GetCallInfo returns valid name.
       
  1370 	ASSERT_TRUE(callInfo.iCallName.Length() >0, 
       
  1371 			_L("RLine::GetCallInfo returned an invalid  name"));
       
  1372 
       
  1373 	// Check RLine::GetCallInfo returns caps in set of KCapsHangUp.
       
  1374 	ASSERT_BITS_SET(callInfo.iCallCapsFlags, RCall::KCapsHangUp, KNoUnwantedBits , 
       
  1375 			_L("RLine::GetCallInfo returned wrong caps"));	
       
  1376 
       
  1377 	// Check RLine::GetCallInfo returns status of EStatusConnected.
       
  1378 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusConnected, 
       
  1379 			_L("RLine::GetCallInfo wrong iStatus, should be EStatusConnected"));
       
  1380 
       
  1381 	// Check RLine::GetInfo returns hook status of EHookStatusOff.
       
  1382 	// $CTSYProblem CMmLineTsy::GetInfo() returns EHookStatusUnknown always,
       
  1383 	// it is hard coded (aLineInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
  1384 	ASSERT_EQUALS(mobileLine.GetInfo(lineInfo),KErrNone, _L("RLine::GetInfo returned an error")); 
       
  1385 	ASSERT_EQUALS(lineInfo.iHookStatus, RCall::EHookStatusUnknown, _L("RLine::GetInfo did not return iHookStatus EHookStatusUnknown"));
       
  1386 	
       
  1387 	// Check RLine::GetInfo returns status of EStatusConnected.
       
  1388 	ASSERT_EQUALS(lineInfo.iStatus, RCall::EStatusConnected, _L("RLine::GetInfo did not return iStatus EStatusConnected"));
       
  1389 
       
  1390 	// Hangup call with RCall::HangUp 
       
  1391 	TCoreEtelRequestStatus<RCall> hangUpStatus (call1,&RCall::HangUpCancel);	
       
  1392 	CleanupStack::PushL(hangUpStatus);
       
  1393 	call1.HangUp(hangUpStatus);
       
  1394 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
  1395 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::CallHangUp returned an error"));
       
  1396 
       
  1397 	// ===  Check hook status ===
       
  1398 
       
  1399 	// Check RLine::NotifyHookChange completes with EHookStatusOn.
       
  1400     // @CTSYProblem NotifyHookChange is not supported
       
  1401 
       
  1402 
       
  1403 	// Check RLine::GetHookStatus returns EHookStatusOn.
       
  1404     // @CTSYProblem GetHookStatus is not supported
       
  1405 
       
  1406 	// ===  Check line status ===
       
  1407 
       
  1408 	// Check RLine::NotifyStatusChange completes with EStatusHangingUp -> EStatusIdle
       
  1409 	expectedLineStatus = RCall::EStatusHangingUp;
       
  1410 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
  1411 														 notifyStatusChangeStatus,
       
  1412 														 lineStatus,
       
  1413 														 expectedLineStatus,
       
  1414 														 wantedStatus);
       
  1415 														 
       
  1416 	mobileLine.NotifyStatusChange(notifyStatusChangeStatus, lineStatus);
       
  1417 
       
  1418 	expectedLineStatus = RCall::EStatusIdle;
       
  1419 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
  1420 														 notifyStatusChangeStatus,
       
  1421 														 lineStatus,
       
  1422 														 expectedLineStatus,
       
  1423 														 wantedStatus);
       
  1424 
       
  1425 	// Check RLine::GetStatus returns EStatusIdle
       
  1426 	ASSERT_EQUALS(mobileLine.GetStatus(lineStatus), KErrNone, _L("RLine::GetHookStatus returned an error"));
       
  1427 	ASSERT_EQUALS(lineStatus, RCall::EStatusIdle, _L("RLine::GetStatus did not return EStatusIdle"));
       
  1428 
       
  1429 
       
  1430 	// Check RMobileLine::NotifyMobileLineStatusChange completes with EStatusDisconnecting -> EStatusIdle
       
  1431 	expectedMobileLineStatus = RMobileCall::EStatusDisconnecting;
       
  1432     mobileLine.NotifyMobileLineStatusChange(notifyMobileLineChangeStatus, mobileLineStatus);
       
  1433 	iCallControlTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(mobileLine,
       
  1434 																		 notifyMobileLineChangeStatus,
       
  1435 																		 mobileLineStatus,
       
  1436 																		 expectedMobileLineStatus,
       
  1437 																	  	 wantedStatus);
       
  1438 														 
       
  1439     mobileLine.NotifyMobileLineStatusChange(notifyMobileLineChangeStatus, mobileLineStatus);
       
  1440 	expectedMobileLineStatus = RMobileCall::EStatusIdle;
       
  1441 	iCallControlTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(mobileLine,
       
  1442 																		 notifyMobileLineChangeStatus,
       
  1443 																		 mobileLineStatus,
       
  1444 																		 expectedMobileLineStatus,
       
  1445 																	  	 wantedStatus);
       
  1446 														 
       
  1447 	// Check RMobileLine::GetMobileLineStatus returns EStatusIdle
       
  1448 	ASSERT_EQUALS(mobileLine.GetMobileLineStatus(mobileLineStatus), KErrNone, 
       
  1449 			_L("RMobileLine::GetMobileLineStatus returned an error"));
       
  1450 	ASSERT_EQUALS(mobileLineStatus, RMobileCall::EStatusIdle,
       
  1451 			_L("RMobileLine::GetMobileLineStatus did not return EStatusIdle as expected"));
       
  1452 
       
  1453 	// ===  Check line info ===
       
  1454 	ASSERT_EQUALS(mobileLine.GetCallInfo(dataLineIndex, callInfo), KErrNone, 
       
  1455 			_L("RLine::GetCallInfo returned an error"));
       
  1456 
       
  1457 	// Check RLine::GetCallInfo returns valid name.
       
  1458 	ASSERT_TRUE(callInfo.iCallName.Length() >0, 
       
  1459 			_L("RLine::GetCallInfo returned an invalid  name"));
       
  1460 
       
  1461 	// Check RLine::GetCallInfo returns caps in set of KCapsData | KCapsDial | KCapsAnswer.
       
  1462     // @CTSYProblem KCapsAnswer is not set
       
  1463 	wantedCallCaps = RCall::KCapsData | RCall::KCapsDial;
       
  1464 	ASSERT_BITS_SET(callInfo.iCallCapsFlags, wantedCallCaps, KNoUnwantedBits , 
       
  1465 			_L("RLine::GetCallInfo returned wrong caps"));	
       
  1466 
       
  1467 	// Check RLine::GetCallInfo returns status of EStatusIdle.
       
  1468 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusIdle, 
       
  1469 			_L("RLine::GetCallInfo wrong iStatus, should be EStatusIdle"));
       
  1470 
       
  1471 	// Check RLine::GetInfo returns hook status of EHookStatusOn.
       
  1472 	// $CTSYProblem CMmLineTsy::GetInfo() returns EHookStatusUnknown always,
       
  1473 	// it is hard coded (aLineInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
  1474 	ASSERT_EQUALS(mobileLine.GetInfo(lineInfo),KErrNone, _L("RLine::GetInfo returned an error")); 
       
  1475 	ASSERT_EQUALS(lineInfo.iHookStatus, RCall::EHookStatusUnknown, _L("RLine::GetInfo did not return iHookStatus EHookStatusUnknown"));
       
  1476 	
       
  1477 	// Check RLine::GetInfo returns status of EStatusIdle.
       
  1478 	ASSERT_EQUALS(lineInfo.iStatus, RCall::EStatusIdle, _L("RLine::GetInfo did not return iStatus EStatusIdle"));
       
  1479 
       
  1480 	
       
  1481 	//
       
  1482 	// TEST END
       
  1483 	//
       
  1484 
       
  1485     StartCleanup();
       
  1486 	
       
  1487 	// Pop
       
  1488 	// notifyHookChangeStatus
       
  1489 	// notifyStatusChangeStatus
       
  1490 	// notifyMobileLineChangeStatus
       
  1491 	// dialStatus
       
  1492 	// hangUpStatus
       
  1493 	CleanupStack::PopAndDestroy(5, &notifyHookChangeStatus);
       
  1494 	
       
  1495 	return TestStepResult();
       
  1496 	}
       
  1497 
       
  1498 TPtrC CCTSYIntegrationTestDataCallControl0003::GetTestStepName()
       
  1499 /**
       
  1500  * @return The test step name.
       
  1501  */
       
  1502 	{
       
  1503 	return _L("CCTSYIntegrationTestDataCallControl0003");
       
  1504 	}
       
  1505 
       
  1506 
       
  1507 
       
  1508 CCTSYIntegrationTestDataCallControl0004::CCTSYIntegrationTestDataCallControl0004(CEtelSessionMgr& aEtelSessionMgr)
       
  1509 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  1510 /**
       
  1511  * Constructor.
       
  1512  */
       
  1513 	{
       
  1514 	SetTestStepName(CCTSYIntegrationTestDataCallControl0004::GetTestStepName());
       
  1515 	}
       
  1516 
       
  1517 CCTSYIntegrationTestDataCallControl0004::~CCTSYIntegrationTestDataCallControl0004()
       
  1518 /**
       
  1519  * Destructor.
       
  1520  */
       
  1521 	{
       
  1522 	}
       
  1523 
       
  1524 TVerdict CCTSYIntegrationTestDataCallControl0004::doTestStepL()
       
  1525 /**
       
  1526  * @SYMTestCaseID BA-CTSY-INT-DATC-0004
       
  1527  * @SYMFssID BA/CTSY/DATC-0004
       
  1528  * @SYMTestCaseDesc Answer an incoming circuit switched data call.
       
  1529  * @SYMTestPriority High
       
  1530  * @SYMTestActions RMobileLine::NotifyMobileLineStatusChange, RMobileCall::NotifyMobileCallCapsChange, RMobileCall::GetMobileCallStatus, RLine::NotifyIncomingCall, RCall::GetInfo, RCall::NotifyStatusChange, RCall::NotifyCapsChange, RLine::GetInfo, RMobileCall::GetMobileCallCaps, RLine::NotifyStatusChange, RCall::RecoverDataPort, RLine::GetCallInfo, RMobileCall::GetMobileCallInfo, RMobileCall::NotifyMobileCallStatusChange, RCall::AnswerIncomingCall
       
  1531  * @SYMTestExpectedResults Pass - Data call can be answered. Data can be received.
       
  1532  * @SYMTestType CIT
       
  1533  * @SYMTestCaseDependencies live/automatic
       
  1534  *
       
  1535  * Reason for test: Verify call status, call caps and call info are correct.
       
  1536  *
       
  1537  * @return - TVerdict code
       
  1538  */
       
  1539 	{
       
  1540 
       
  1541 	//
       
  1542 	// SET UP
       
  1543 	//
       
  1544 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  1545 	// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL		
       
  1546 	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  1547 		
       
  1548 	// Get data line 1. 
       
  1549     RMobileLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  1550 
       
  1551 	// Get call 1. 
       
  1552 	RMobileCall& dataCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  1553 	
       
  1554 	//
       
  1555 	// SET UP END
       
  1556 	//
       
  1557 	
       
  1558 	StartTest();
       
  1559 	
       
  1560 	//
       
  1561 	// TEST START
       
  1562 	//
       
  1563 	
       
  1564 	// Post notification for incoming call from RPS
       
  1565 	TName name;
       
  1566 	TPtrC number;
       
  1567 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (dataLine,&RLine::NotifyIncomingCallCancel);
       
  1568 	CleanupStack::PushL(notifyIncomingCallStatus);
       
  1569 	dataLine.NotifyIncomingCall(notifyIncomingCallStatus,name);
       
  1570 	
       
  1571 	// Request incoming data call from RPS 
       
  1572 	ASSERT_EQUALS (RPSRequestIncomingCallL( EDataLine ), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
  1573 
       
  1574 	// Check RLine::NotifyIncomingCall completes with a call name with length > 0
       
  1575 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeLong),KErrNone,_L("RLine::NotifyIncomingCall timed out"));
       
  1576 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"));
       
  1577 	ASSERT_TRUE(name.Length()>0, _L("RLine::NotifyIncomingCall did not return a call name"));
       
  1578 	
       
  1579     //Get the incoming call
       
  1580 	TCallId incomingCallId;
       
  1581 	dataCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
  1582 	
       
  1583 	// post notifier for RCall::NotifyCapsChange
       
  1584 	RCall::TCaps callCaps;
       
  1585 	TCoreEtelRequestStatus<RCall> notifyCapsChangeStatus (dataCall1,&RCall::NotifyCapsChangeCancel);	
       
  1586 	CleanupStack::PushL(notifyCapsChangeStatus);
       
  1587 	dataCall1.NotifyCapsChange(notifyCapsChangeStatus,callCaps);
       
  1588 	
       
  1589 	// Post notifier for RMobileCall::NotifyMobileCallCapsChange
       
  1590 	RMobileCall::TMobileCallCapsV1 mobileCallCaps;
       
  1591 	RMobileCall::TMobileCallCapsV1Pckg capsPckg(mobileCallCaps);
       
  1592 	TExtEtelRequestStatus notifyMobileCallCapsChangeStatus(dataCall1, EMobileCallNotifyMobileCallCapsChange);
       
  1593 	CleanupStack::PushL(notifyMobileCallCapsChangeStatus);
       
  1594 	dataCall1.NotifyMobileCallCapsChange(notifyMobileCallCapsChangeStatus,capsPckg);
       
  1595 	
       
  1596 	// post notifier for RCall::NotifyStatusChange
       
  1597 	RCall::TStatus callStatus;
       
  1598 	TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (dataCall1,&RCall::NotifyStatusChangeCancel);
       
  1599 	CleanupStack::PushL(notifyStatusChangeStatus);
       
  1600 	dataCall1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
       
  1601 	
       
  1602 	// post notifier for RMobileCall::NotifyMobileCallStatusChange
       
  1603 	RMobileCall::TMobileCallStatus mobileCallStatus;
       
  1604 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus(dataCall1, EMobileCallNotifyMobileCallStatusChange);
       
  1605 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus);
       
  1606 	dataCall1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
       
  1607 	
       
  1608 	// post notifier for RLine::NotifyStatusChange
       
  1609 	TCoreEtelRequestStatus<RLine> notifyRLineChangeStatus (dataLine,&RLine::NotifyStatusChangeCancel);
       
  1610 	CleanupStack::PushL(notifyRLineChangeStatus);
       
  1611 	dataLine.NotifyStatusChange(notifyRLineChangeStatus,callStatus);
       
  1612 	
       
  1613 	// post a notifier for RMobileLine::NotifyMobileLineStatusChange
       
  1614 	TExtEtelRequestStatus notifyMobileLineChangeStatus(dataLine, EMobileLineNotifyMobileLineStatusChange);
       
  1615 	CleanupStack::PushL(notifyMobileLineChangeStatus);
       
  1616 	dataLine.NotifyMobileLineStatusChange(notifyMobileLineChangeStatus, mobileCallStatus);
       
  1617 	
       
  1618 	// ===  Check call caps ===
       
  1619 
       
  1620 	// Check RCall::NotifyCapsChange completes with caps in set of KCapsData | KCapsHangUp | KCapsAnswer
       
  1621 	// Check RCall::NotifyCapsChange completes with caps NOT in set of KCapsDial
       
  1622 	RCall::TCaps wantedCaps, unwantedCaps;
       
  1623 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsHangUp | RCall::KCapsAnswer;
       
  1624 	unwantedCaps.iFlags = RCall::KCapsDial;
       
  1625 	const TInt wantedStatus = KErrNone;
       
  1626 	
       
  1627 	iCallControlTestHelper.WaitForCallNotifyCapsChange(dataCall1,
       
  1628 													   notifyCapsChangeStatus,
       
  1629 													   callCaps,
       
  1630 													   wantedCaps,
       
  1631 													   unwantedCaps,
       
  1632 													   wantedStatus);
       
  1633 			
       
  1634 	// Check RCall::GetCaps supports caps in set of KCapsData | KCapsHangUp | KCapsAnswer
       
  1635 	// Check RCall::GetCaps supports NOT in set of KCapsDial
       
  1636 	ASSERT_EQUALS(dataCall1.GetCaps(callCaps), KErrNone, _L("RCall::GetCaps returned an Error"));
       
  1637 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsHangUp;
       
  1638 	unwantedCaps.iFlags = RCall::KCapsAnswer;
       
  1639 	ASSERT_BITS_SET(callCaps.iFlags, wantedCaps.iFlags, unwantedCaps.iFlags, _L("RCall::GetCaps returned wrong caps"));
       
  1640 			
       
  1641 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps in set of KCapsData | KCapsHangUp | KCapsAnswer
       
  1642 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps NOT in set of KCapsDial
       
  1643 	RMobileCall::TMobileCallCapsV1 wantedMobileCaps;
       
  1644 	wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsData | RMobileCall::KCapsHangUp | RMobileCall::KCapsAnswer;																	  
       
  1645 	TCmpRMobileCallTMobileCallCaps mobileCapsComp(wantedMobileCaps,mobileCallCaps, *this);
       
  1646 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallCapsChange(dataCall1, 
       
  1647 																	   notifyMobileCallCapsChangeStatus,
       
  1648 																	   mobileCapsComp,
       
  1649 																	   wantedStatus);
       
  1650 																	   
       
  1651 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps in set of KCapsVoice | KCapsHangUp | KCapsAnswer
       
  1652 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps NOT in set of KCapsDial
       
  1653 	ASSERT_EQUALS(dataCall1.GetMobileCallCaps(capsPckg), KErrNone, _L("RMobileCall::GetMobileCallCaps returned an error"));
       
  1654 	wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsVoice | RMobileCall::KCapsHangUp | RMobileCall::KCapsAnswer;									   
       
  1655 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, wantedMobileCaps.iCallControlCaps, KNoUnwantedBits, _L("RMobileCall::GetMobileCallCaps returned unexpected iCallControlCaps"));
       
  1656 			
       
  1657 	// ===  Check call status ===
       
  1658 
       
  1659 	// Check RCall::NotifyStatusChange completes with EStatusRinging
       
  1660 	RCall::TStatus expectedCallStatus = RCall::EStatusRinging;
       
  1661 	iCallControlTestHelper.WaitForCallNotifyStatusChange(dataCall1,
       
  1662 														 notifyStatusChangeStatus,
       
  1663 														 callStatus,
       
  1664 														 expectedCallStatus,
       
  1665 														 wantedStatus);
       
  1666 	// Check RCall::GetStatus returns EStatusRinging
       
  1667 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus),KErrNone, _L("RCall::GetStatus returned an error"));
       
  1668 	ASSERT_EQUALS(callStatus, RCall::EStatusRinging, _L("RCall::GetStatus did not return a status EStatusRinging"));
       
  1669 	
       
  1670 	// Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusRinging
       
  1671 	RMobileCall::TMobileCallStatus expectedMobileCallStatus = RMobileCall::EStatusRinging;
       
  1672 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(dataCall1,
       
  1673 															notifyMobileCallStatusChangeStatus,
       
  1674 															mobileCallStatus,
       
  1675 															expectedMobileCallStatus,
       
  1676 															wantedStatus);	
       
  1677 																											
       
  1678 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusRinging
       
  1679 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileStatus returned an error"));
       
  1680 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusRinging, _L("RMobileCall::GetMobileStatus did not return a status EStatusConnected"));
       
  1681 	
       
  1682 	// ===  Check call info ===
       
  1683 
       
  1684 	// Check RCall::GetInfo returns valid call name.
       
  1685 	// Check RCall::GetInfo returns valid voice line name.
       
  1686 	// Check RCall::GetInfo returns hook status of EHookStatusOn
       
  1687 	// Check RCall::GetInfo returns call status of EStatusRinging.
       
  1688 	// Check RCall::GetInfo returns call duration of 0.
       
  1689 	RCall::TCallInfo callInfo;
       
  1690 	ASSERT_EQUALS(dataCall1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
       
  1691 	ASSERT_TRUE(callInfo.iCallName.Length() >0, _L("RCall::GetInfo returned an invalid  name"));
       
  1692 	ASSERT_TRUE(callInfo.iLineName.Length() >0, _L("RCall::GetInfo returned an invalid  Line name"));
       
  1693 	ASSERT_EQUALS(callInfo.iHookStatus, RCall::EHookStatusOn, _L("RCall::GetInfo wrong iHookStatus, should be EHookStatusOn"));
       
  1694 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusRinging, _L("RCall::GetInfo wrong iStatus, should be EStatusConnected"));
       
  1695 	ASSERT_TRUE(callInfo.iDuration.Int() == 0, _L("RCall::GetInfo wrong iDuration, should be >0"));
       
  1696 	
       
  1697 	// Check RMobileCall::GetMobileCallInfo returns iValid > 0.
       
  1698 	// Check RMobileCall::GetMobileCallInfo returns data for attributes makred as valid in iValid.
       
  1699 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
       
  1700 	RMobileCall::TMobileCallInfoV1 mobileCallInfo;
       
  1701 	RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(mobileCallInfo);
       
  1702 	ASSERT_EQUALS(dataCall1.GetMobileCallInfo(callInfoPckg), KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error"));
       
  1703 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() >0, _L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
       
  1704 	ASSERT_TRUE(mobileCallInfo.iValid > 0, _L("RMobileCall::GetMobileCallInfo returned unexpected flags in iValid"));
       
  1705 	iCallControlTestHelper.CheckForValidCallInfo(mobileCallInfo, number);
       
  1706 	
       
  1707 	// ===  Check line status ===
       
  1708 
       
  1709 	// Check RLine::NotifyStatusChange completes with EStatusRinging 
       
  1710 	expectedCallStatus = RCall::EStatusRinging;	
       
  1711 	iCallControlTestHelper.WaitForLineNotifyStatusChange(dataLine,
       
  1712 														 notifyStatusChangeStatus,
       
  1713 														 callStatus,
       
  1714 														 expectedCallStatus,
       
  1715 														 wantedStatus);
       
  1716 	// Check RLine::GetStatus returns EStatusRinging
       
  1717 	ASSERT_EQUALS(dataLine.GetStatus(callStatus),KErrNone, _L("RLine::GetStatus returned an error"));
       
  1718 	ASSERT_EQUALS(callStatus, RCall::EStatusRinging, _L("RLine::GetStatus returned wrong status, should be EStatusRinging"));
       
  1719 	
       
  1720 	// Check RMobileLine::NotifyMobileLineStatusChange completes with with EStatusRinging
       
  1721 	expectedMobileCallStatus = RMobileCall::EStatusRinging;
       
  1722 	iCallControlTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(dataLine,
       
  1723 																		notifyMobileLineChangeStatus,
       
  1724 																		mobileCallStatus,
       
  1725 																		expectedMobileCallStatus,
       
  1726 																		wantedStatus);
       
  1727 	// Check RMobileLine::GetMobileLineStatus returns EStatusRinging
       
  1728 	ASSERT_EQUALS(dataLine.GetMobileLineStatus(mobileCallStatus), KErrNone, _L("RMobileLine::GetMobileLineStatus returned an error"));
       
  1729 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusRinging, _L("RMobileLine::GetMobileLineStatus did not return EStatusIdle as expected"));
       
  1730 
       
  1731 	// ===  Check line info ===
       
  1732 
       
  1733 	// Check RLine::GetCallInfo returns valid name
       
  1734 	// Check RLine::GetCallInfo returns caps in set of KCapsHangUp | KCapsAnswer
       
  1735 	// Check RLine::GetCallInfo returns caps NOT in set of KCapsDial
       
  1736 	// Check RLine::GetCallInfo returns status of EStatusRinging.
       
  1737  	RLine::TCallInfo RLinecallInfo;
       
  1738 	ASSERT_EQUALS(dataLine.GetCallInfo(0, RLinecallInfo), KErrNone, _L("RLine::GetCallInfo returned an error"));
       
  1739  	ASSERT_TRUE(RLinecallInfo.iCallName.Length() >0, _L("RLine::GetCallInfo returned an invalid  name"));
       
  1740  	wantedCaps.iFlags = (RCall::KCapsHangUp | RCall::KCapsAnswer);
       
  1741  	unwantedCaps.iFlags = RCall::KCapsDial;
       
  1742  	ASSERT_BITS_SET(RLinecallInfo.iCallCapsFlags, wantedCaps.iFlags, unwantedCaps.iFlags, _L("RLine::GetCallInfo returned wrong caps"));
       
  1743  	ASSERT_EQUALS(RLinecallInfo.iStatus, RCall::EStatusRinging, _L("RLine::GetCallInfo wrong iStatus, should be EStatusRinging"));
       
  1744  	
       
  1745 	// Check RLine::GetInfo returns hook status of EHookStatusOn
       
  1746 	// Check RLine::GetInfo returns status of EStatusRinging
       
  1747 	RLine::TLineInfo RLineInfo;
       
  1748 	// $CTSYProblem CMmCallTsy::GetInfo() returns EHookStatusUnknown always,
       
  1749 	// it is hard coded (aCallInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
  1750 	ASSERT_EQUALS(RLineInfo.iHookStatus, RCall::EHookStatusOn, _L("RCall::GetInfo wrong iHookStatus, should be EHookStatusUnknown"));
       
  1751 	ASSERT_EQUALS(RLineInfo.iStatus, RCall::EStatusRinging, _L("RLine::GetCallInfo wrong iStatus, should be EStatusRinging"));
       
  1752 	
       
  1753 	// ===  Answer call === 
       
  1754 
       
  1755 	// Answer the incoming call with RCall::AnswerIncomingCall 
       
  1756 	TCoreEtelRequestStatus<RCall> answerIncomingStatus(dataCall1, &RCall::AnswerIncomingCallCancel);
       
  1757 	CleanupStack::PushL(answerIncomingStatus);	
       
  1758 	dataCall1.AnswerIncomingCall(answerIncomingStatus);
       
  1759 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
  1760 	ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
  1761     
       
  1762 	// ===  Check call status ===
       
  1763 
       
  1764 	// Check RCall::NotifyStatusChange completes with EStatusAnswering->EStatusConnected
       
  1765 	expectedCallStatus = RCall::EStatusAnswering;
       
  1766 	iCallControlTestHelper.WaitForCallNotifyStatusChange(dataCall1,
       
  1767 														 notifyStatusChangeStatus,
       
  1768 														 callStatus,
       
  1769 														 expectedCallStatus,
       
  1770 														 wantedStatus);
       
  1771     dataCall1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
       
  1772 														 
       
  1773 	expectedCallStatus = RCall::EStatusConnected;
       
  1774 	iCallControlTestHelper.WaitForCallNotifyStatusChange(dataCall1,
       
  1775 														 notifyStatusChangeStatus,
       
  1776 														 callStatus,
       
  1777 														 expectedCallStatus,
       
  1778 														 wantedStatus);	
       
  1779 														 											
       
  1780 	// Check RCall::GetStatus returns EStatusConnected
       
  1781 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus),KErrNone,  _L("RCall::GetStatus returned an error"));
       
  1782 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  1783 	
       
  1784 	// Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusAnswering->EStatusConnected
       
  1785 	expectedMobileCallStatus = RMobileCall::EStatusAnswering;
       
  1786 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(dataCall1,
       
  1787 															notifyMobileCallStatusChangeStatus,
       
  1788 															mobileCallStatus,
       
  1789 															expectedMobileCallStatus,
       
  1790 															wantedStatus);
       
  1791 															
       
  1792 	expectedMobileCallStatus = RMobileCall::EStatusConnected;
       
  1793 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(dataCall1,
       
  1794 															notifyMobileCallStatusChangeStatus,
       
  1795 															mobileCallStatus,
       
  1796 															expectedMobileCallStatus,
       
  1797 															wantedStatus);
       
  1798 														
       
  1799 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected
       
  1800 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileStatus returned an error"));
       
  1801 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileStatus did not return a status EStatusConnected"));
       
  1802 			
       
  1803 	// ===  Check call caps ===
       
  1804 
       
  1805 	// Check RCall::NotifyCapsChange completes with caps in set of KCapsData | KCapsHangUp
       
  1806 	// Check RCall::NotifyCapsChange completes with caps NOT in set of KCapsDial | KCapsAnswer
       
  1807 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsHangUp;
       
  1808 	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsAnswer;
       
  1809 	iCallControlTestHelper.WaitForCallNotifyCapsChange(dataCall1,
       
  1810 													   notifyCapsChangeStatus,
       
  1811 													   callCaps,
       
  1812 													   wantedCaps,
       
  1813 													   unwantedCaps,
       
  1814 													   wantedStatus);
       
  1815 													   
       
  1816 	// Check RCall::GetCaps supports caps in set of KCapsData | KCapsHangUp
       
  1817 	// Check RCall::GetCaps supports NOT in set of KCapsDial | KCapsAnswer
       
  1818 	ASSERT_EQUALS(dataCall1.GetCaps(callCaps), KErrNone, _L("RCall::GetCaps returned an Error"));
       
  1819 	wantedCaps.iFlags = RCall::KCapsData | RCall::KCapsHangUp;
       
  1820 	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsAnswer;
       
  1821 	ASSERT_BITS_SET(callCaps.iFlags, wantedCaps.iFlags, unwantedCaps.iFlags, _L("RCall::GetCaps returned wrong caps"));
       
  1822 			
       
  1823 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps in set of KCapsData | KCapsHangUp
       
  1824 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps NOT in set of KCapsDial | KCapsAnswer
       
  1825 	wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsData | RMobileCall::KCapsHangUp;																	  
       
  1826 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallCapsChange(dataCall1, 
       
  1827 																	   notifyMobileCallCapsChangeStatus,
       
  1828 																	   mobileCapsComp,
       
  1829 																	   wantedStatus);
       
  1830 																	   
       
  1831 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps in set of KCapsVoice | KCapsHangUp
       
  1832 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps NOT in set of KCapsDial | KCapsAnswer
       
  1833 	ASSERT_EQUALS(dataCall1.GetMobileCallCaps(capsPckg), KErrNone, _L("RMobileCall::GetMobileCallCaps returned an error"));
       
  1834 	wantedMobileCaps.iCallControlCaps = RMobileCall::KCapsVoice | RMobileCall::KCapsHangUp;									   
       
  1835 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, wantedMobileCaps.iCallControlCaps, KNoUnwantedBits, _L("RMobileCall::GetMobileCallCaps returned unexpected iCallControlCaps"));
       
  1836 			
       
  1837 	// ===  Check call info ===
       
  1838 
       
  1839 	// Check RCall::GetInfo returns valid call name.
       
  1840 	// Check RCall::GetInfo returns valid voice line name.
       
  1841 	// Check RCall::GetInfo returns hook status of EHookStatusOff
       
  1842 	// Check RCall::GetInfo returns call status of EStatusConnected.
       
  1843 	// Check RCall::GetInfo returns call duration of 0.
       
  1844 	ASSERT_EQUALS(dataCall1.GetInfo(callInfo), KErrNone, _L("RCall::GetInfo returned an error"));
       
  1845 	ASSERT_TRUE(callInfo.iCallName.Length() >0, _L("RCall::GetInfo returned an invalid  name"));
       
  1846 	ASSERT_TRUE(callInfo.iLineName.Length() >0, _L("RCall::GetInfo returned an invalid  Line name"));
       
  1847 	ASSERT_EQUALS(callInfo.iHookStatus, RCall::EHookStatusOff, _L("RCall::GetInfo wrong iHookStatus, should be EHookStatusOn"));
       
  1848 	ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusConnected, _L("RCall::GetInfo wrong iStatus, should be EStatusConnected"));
       
  1849 	ASSERT_TRUE(callInfo.iDuration.Int() == 0, _L("RCall::GetInfo wrong iDuration, should be >0"));
       
  1850 	
       
  1851 	// Check RMobileCall::GetMobileCallInfo returns iValid > 0.
       
  1852 	// Check RMobileCall::GetMobileCallInfo returns data for attributes makred as valid in iValid.
       
  1853 	// Check RMobileCall::GetMobileCallInfo returns valid line name.
       
  1854 	ASSERT_EQUALS(dataCall1.GetMobileCallInfo(callInfoPckg), KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error"));
       
  1855 	ASSERT_TRUE(mobileCallInfo.iLineName.Length() >0, _L("RMobileCall::GetMobileCallInfo returned an invalid line name"));
       
  1856 	ASSERT_TRUE(mobileCallInfo.iValid > 0, _L("RMobileCall::GetMobileCallInfo returned unexpected flags in iValid"));
       
  1857 	iCallControlTestHelper.CheckForValidCallInfo(mobileCallInfo, number);
       
  1858 	
       
  1859 	// ===  Check line status ===
       
  1860 
       
  1861 	// Check RLine::NotifyStatusChange completes with EStatusConnected
       
  1862 	expectedCallStatus = RCall::EStatusConnected;
       
  1863 	iCallControlTestHelper.WaitForLineNotifyStatusChange(dataLine,
       
  1864 														 notifyStatusChangeStatus,
       
  1865 														 callStatus,
       
  1866 														 expectedCallStatus,
       
  1867 														 wantedStatus);
       
  1868 														 
       
  1869 	// Check RLine::GetStatus returns EStatusConnected
       
  1870 	ASSERT_EQUALS(dataLine.GetStatus(callStatus),KErrNone, _L("RLine::GetStatus returned an error"));
       
  1871 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RLine::GetStatus returned wrong status, should be EStatusRinging"));
       
  1872 	
       
  1873 	// Check RMobileLine::NotifyMobileLineStatusChange completes with with EStatusConnected
       
  1874 	expectedMobileCallStatus = RMobileCall::EStatusConnected;
       
  1875 	iCallControlTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(dataLine,
       
  1876 																		notifyMobileLineChangeStatus,
       
  1877 																		mobileCallStatus,
       
  1878 																		expectedMobileCallStatus,
       
  1879 																		wantedStatus);
       
  1880 																		
       
  1881 	// Check RMobileLine::GetMobileLineStatus returns EStatusConnected
       
  1882 	ASSERT_EQUALS(dataLine.GetMobileLineStatus(mobileCallStatus), KErrNone, _L("RMobileLine::GetMobileLineStatus returned an error"));
       
  1883 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileLine::GetMobileLineStatus did not return EStatusIdle as expected"));
       
  1884 
       
  1885 	// ===  Check line info ===
       
  1886 
       
  1887 	// Check RLine::GetCallInfo returns valid name
       
  1888 	// Check RLine::GetCallInfo returns caps in set of KCapsHangUp
       
  1889 	// Check RLine::GetCallInfo returns caps NOT in set of KCapsDial | KCapsAnswer
       
  1890 	// Check RLine::GetCallInfo returns status of EStatusConnected
       
  1891 	ASSERT_EQUALS(dataLine.GetCallInfo(0, RLinecallInfo), KErrNone, _L("RLine::GetCallInfo returned an error"));
       
  1892  	ASSERT_TRUE(RLinecallInfo.iCallName.Length() >0, _L("RLine::GetCallInfo returned an invalid  name"));
       
  1893  	wantedCaps.iFlags = RCall::KCapsHangUp;
       
  1894  	unwantedCaps.iFlags = RCall::KCapsDial | RCall::KCapsAnswer;
       
  1895  	ASSERT_BITS_SET(RLinecallInfo.iCallCapsFlags, wantedCaps.iFlags, unwantedCaps.iFlags, _L("RLine::GetCallInfo returned wrong caps"));
       
  1896  	ASSERT_EQUALS(RLinecallInfo.iStatus, RCall::EStatusConnected, _L("RLine::GetCallInfo wrong iStatus, should be EStatusRinging"));
       
  1897  	
       
  1898 	// Check RLine::GetInfo returns hook status of EHookStatusOff
       
  1899 	// Check RLine::GetInfo returns status of EStatusConnected
       
  1900 	// $CTSYProblem CMmCallTsy::GetInfo() returns EHookStatusUnknown always,
       
  1901 	// it is hard coded (aCallInfo->iHookStatus = RCall::EHookStatusUnknown;)
       
  1902 	ASSERT_EQUALS(RLineInfo.iHookStatus, RCall::EHookStatusOff, _L("RCall::GetInfo wrong iHookStatus, should be EHookStatusUnknown"));
       
  1903 	ASSERT_EQUALS(RLineInfo.iStatus, RCall::EStatusConnected, _L("RLine::GetCallInfo wrong iStatus, should be EStatusRinging"));
       
  1904 	
       
  1905 	// ===  Write some data to the port ===
       
  1906 
       
  1907 	// RCommServ cs; 
       
  1908 	RCommServ cs;
       
  1909 	
       
  1910 	// cs.Connect(); 
       
  1911 	ASSERT_EQUALS(cs.Connect(), KErrNone,  _L("RRCommServ::Connect returned an error"));
       
  1912 	
       
  1913 	// RComm port; 
       
  1914 	RComm port;
       
  1915 	
       
  1916 	// port.Open(cs,commPort.iPort,ECommShared); 
       
  1917 	RCall::TCommPort commPort;
       
  1918 	port.Open(cs, commPort.iPort,ECommShared);
       
  1919 	
       
  1920 	// port.Write(stat,KWriteTestData);
       
  1921 	TRequestStatus stat;		
       
  1922 	port.Write(stat, KWriteTestData);
       
  1923 	
       
  1924 	// ===  Check call is still connected ===
       
  1925 
       
  1926 	// Check RCall::GetStatus returns EStatusConnected
       
  1927 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus),KErrNone,  _L("RCall::GetStatus returned an error"));
       
  1928 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  1929 	
       
  1930 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected
       
  1931 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileStatus returned an error"));
       
  1932 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileStatus did not return a status EStatusConnected"));
       
  1933 			
       
  1934 	// port.Close(); 
       
  1935 	port.Close();
       
  1936 	
       
  1937 	// cs.Close(); 
       
  1938 	cs.Close();
       
  1939 	
       
  1940 	// ===  Recover the data port ===
       
  1941 
       
  1942 	// Recover data port with RCall::RecoverDataPort 
       
  1943 	ASSERT_EQUALS(dataCall1.RecoverDataPort(), KErrNone, _L("RCall::RecoverDataPort returned an error"));	
       
  1944 
       
  1945 	// ===  Check call is still connected ===
       
  1946 
       
  1947 	// Check RCall::GetStatus returns EStatusConnected
       
  1948 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus),KErrNone,  _L("RCall::GetStatus returned an error"));
       
  1949 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  1950 	
       
  1951 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected
       
  1952 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileStatus returned an error"));
       
  1953 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileStatus did not return a status EStatusConnected"));
       
  1954 			
       
  1955 	
       
  1956 	//
       
  1957 	// TEST END
       
  1958 	//
       
  1959 
       
  1960     StartCleanup();
       
  1961 	
       
  1962 	// Pop
       
  1963 	// notifyIncomingCallStatus
       
  1964 	// notifyCapsChangeStatus
       
  1965 	// notifyMobileCallCapsChangeStatus
       
  1966 	// notifyStatusChangeStatus
       
  1967 	// notifyMobileCallStatusChangeStatus
       
  1968 	// notifyRLineChangeStatus
       
  1969 	// notifyMobileLineChangeStatus
       
  1970 	// answerIncomingStatus
       
  1971 	CleanupStack::PopAndDestroy(8,&notifyIncomingCallStatus);
       
  1972 		
       
  1973 	return TestStepResult();
       
  1974 	}
       
  1975 
       
  1976 TPtrC CCTSYIntegrationTestDataCallControl0004::GetTestStepName()
       
  1977 /**
       
  1978  * @return The test step name.
       
  1979  */
       
  1980 	{
       
  1981 	return _L("CCTSYIntegrationTestDataCallControl0004");
       
  1982 	}
       
  1983 
       
  1984 
       
  1985 
       
  1986 CCTSYIntegrationTestDataCallControl0005::CCTSYIntegrationTestDataCallControl0005(CEtelSessionMgr& aEtelSessionMgr)
       
  1987 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  1988 /**
       
  1989  * Constructor.
       
  1990  */
       
  1991 	{
       
  1992 	SetTestStepName(CCTSYIntegrationTestDataCallControl0005::GetTestStepName());
       
  1993 	}
       
  1994 
       
  1995 CCTSYIntegrationTestDataCallControl0005::~CCTSYIntegrationTestDataCallControl0005()
       
  1996 /**
       
  1997  * Destructor.
       
  1998  */
       
  1999 	{
       
  2000 	}
       
  2001 
       
  2002 TVerdict CCTSYIntegrationTestDataCallControl0005::doTestStepL()
       
  2003 /**
       
  2004  * @SYMTestCaseID BA-CTSY-INT-DATC-0005
       
  2005  * @SYMFssID BA/CTSY/DATC-0005
       
  2006  * @SYMTestCaseDesc Answer an incoming circuit switched data call.
       
  2007  * @SYMTestPriority High
       
  2008  * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RCall::AnswerIncomingCall, RMobileCall::NotifyMobileDataCallCapsChange, RMobileCall::GetMobileCallStatus, RCall::GetCallParams, RCall::GetStatus, RLine::NotifyIncomingCall, RMobileCall::GetMobileDataCallCaps
       
  2009  * @SYMTestExpectedResults Pass - Incoming call answered with correct caps.
       
  2010  * @SYMTestType CIT
       
  2011  * @SYMTestCaseDependencies live/automatic
       
  2012  *
       
  2013  * Reason for test: Verify data call caps and call info are correct.
       
  2014  *
       
  2015  * @return - TVerdict code
       
  2016  */
       
  2017 	{
       
  2018 
       
  2019 	//
       
  2020 	// SET UP
       
  2021 	//
       
  2022 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  2023 	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  2024 				   
       
  2025 	// Get data line 1. 
       
  2026     RLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  2027 	// Get call 1. 
       
  2028 	RMobileCall& dataCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  2029 
       
  2030 	//
       
  2031 	// SET UP END
       
  2032 	//
       
  2033 	
       
  2034 	StartTest();
       
  2035 	
       
  2036 	//
       
  2037 	// TEST START
       
  2038 	//
       
  2039 	
       
  2040 	// Post notification for incoming call from RPS
       
  2041 	TName name;
       
  2042 	TPtrC number;
       
  2043 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (dataLine,&RLine::NotifyIncomingCallCancel);
       
  2044 	CleanupStack::PushL(notifyIncomingCallStatus);
       
  2045 	dataLine.NotifyIncomingCall(notifyIncomingCallStatus,name);
       
  2046 		
       
  2047 	// Request incoming data call from RPS 
       
  2048 	ASSERT_EQUALS (RPSRequestIncomingCallL( EDataLine ), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
  2049 	
       
  2050 	// Check RLine::NotifyIncomingCall completes with a call name with length > 0
       
  2051 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeMedium),KErrNone,_L("RLine::NotifyIncomingCall timed out"));
       
  2052 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"));
       
  2053 	ASSERT_TRUE(name.Length()>0, _L("RLine::NotifyIncomingCall did not return a call name"));
       
  2054 	
       
  2055     //Get the incoming call
       
  2056 	TCallId incomingCallId;
       
  2057 	dataCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
  2058 	
       
  2059 	// post notifier for RMobileCall::NotifyMobileCallStatusChange
       
  2060 	RMobileCall::TMobileCallStatus mobileCallStatus;
       
  2061 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus(dataCall1, EMobileCallNotifyMobileCallStatusChange);
       
  2062 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus);
       
  2063 	dataCall1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
       
  2064 	
       
  2065 	// post notifier for NotifyMobileDataCallCapsChange
       
  2066 	RMobileCall::TMobileCallDataCapsV1 dataCaps;
       
  2067 	RMobileCall::TMobileCallDataCapsV1Pckg datacapsPckg(dataCaps);
       
  2068 	TExtEtelRequestStatus NotifyMobileDataCallCapsChangeStatus(dataCall1, EMobileCallNotifyMobileDataCallCapsChange);
       
  2069 	CleanupStack::PushL(NotifyMobileDataCallCapsChangeStatus);
       
  2070 	dataCall1.NotifyMobileDataCallCapsChange(NotifyMobileDataCallCapsChangeStatus, datacapsPckg);
       
  2071 	
       
  2072 	// post notifier for RCall::NotifyStatusChange
       
  2073 	RCall::TStatus callStatus;
       
  2074 	TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (dataCall1,&RCall::NotifyStatusChangeCancel);
       
  2075 	CleanupStack::PushL(notifyStatusChangeStatus);
       
  2076 	dataCall1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
       
  2077 	// ===  Check call status ===
       
  2078 
       
  2079 	// Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusRinging
       
  2080 	const TInt wantedStatus = KErrNone;
       
  2081 	RMobileCall::TMobileCallStatus expectedMobileCallStatus = RMobileCall::EStatusRinging;
       
  2082 	// $CTSYProblem: NotifyMobileCallStatusChange coming too fast. CMmDataCallTsy::CompleteNotifyStatusChange coming earlier than notify request. 
       
  2083 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(dataCall1,
       
  2084 															notifyMobileCallStatusChangeStatus,
       
  2085 															mobileCallStatus,
       
  2086 															expectedMobileCallStatus,
       
  2087 															wantedStatus);	
       
  2088 															
       
  2089 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusRinging
       
  2090 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileStatus returned an error"));
       
  2091 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusRinging, _L("RMobileCall::GetMobileStatus did not return a status EStatusRinging"));
       
  2092 	
       
  2093 	// ===  Check mobile data call caps when line is ringing ===
       
  2094 
       
  2095 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iSpeedCaps = RMobileCall::KCapsSpeedAutobauding;
       
  2096 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iProtocolCaps = 0x00;
       
  2097 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iServiceCaps = 0x00;
       
  2098 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iQoSCaps = 0x00;
       
  2099 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iHscsdSupport = EFalse;
       
  2100 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iMaxRxTimeSlots = 0x00;
       
  2101 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iMaxTxTimeSlots = 0x00;
       
  2102 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iCodingCaps = 0x00;
       
  2103 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iAsymmetryCaps = 0x00;
       
  2104 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iUserInitUpgrade = EFalse;
       
  2105 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iRLPVersionCaps = 0x00;
       
  2106 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iV42bisCaps = 0x00;
       
  2107  	RMobileCall::TMobileCallDataCapsV1 	wantedcaps;
       
  2108  	wantedcaps.iSpeedCaps = RMobileCall::KCapsSpeedAutobauding;
       
  2109     wantedcaps.iProtocolCaps = 0x00;
       
  2110     wantedcaps.iServiceCaps = 0x00;
       
  2111     wantedcaps.iQoSCaps = 0x00;
       
  2112     wantedcaps.iHscsdSupport = EFalse;
       
  2113     wantedcaps.iMaxRxTimeSlots = 0x00;
       
  2114     wantedcaps.iMaxTxTimeSlots = 0x00;
       
  2115     wantedcaps.iCodingCaps = 0x00;
       
  2116     wantedcaps.iAsymmetryCaps = 0x00;
       
  2117     wantedcaps.iUserInitUpgrade = EFalse;
       
  2118     wantedcaps.iRLPVersionCaps = 0x00;
       
  2119     wantedcaps.iV42bisCaps = 0x00;
       
  2120 	TCmpBase<RMobileCall::TMobileCallDataCapsV1> compare(dataCaps, wantedcaps, *this);														
       
  2121 	iCallControlTestHelper.WaitForMobileCallNotifyMobileDataCallCapsChange(dataCall1,
       
  2122 															NotifyMobileDataCallCapsChangeStatus,
       
  2123 															compare,
       
  2124 															wantedStatus);	
       
  2125 	
       
  2126 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps = RMobileCall::KCapsSpeedAutobauding;
       
  2127 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps = 0x00;
       
  2128 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps = 0x00;
       
  2129 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps = 0x00;
       
  2130 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iHscsdSupport = EFalse;
       
  2131 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMaxRxTimeSlots = 0x00;
       
  2132 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iMaxTxTimeSlots = 0x00;
       
  2133 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iCodingCaps = 0x00;
       
  2134 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iAsymmetryCaps = 0x00;
       
  2135 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iUserInitUpgrade = EFalse;
       
  2136 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iRLPVersionCaps = 0x00;
       
  2137 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iV42bisCaps = 0x00;
       
  2138 
       
  2139 	ASSERT_EQUALS(dataCall1.GetMobileCallCaps(datacapsPckg), KErrNone,   _L("RMobileCall::GetMobileCallCaps returned an error"));
       
  2140 	ASSERT_TRUE(wantedcaps.iSpeedCaps = RMobileCall::KCapsSpeedAutobauding, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2141 	ASSERT_TRUE(wantedcaps.iProtocolCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2142 	ASSERT_TRUE(wantedcaps.iServiceCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2143 	ASSERT_TRUE(wantedcaps.iQoSCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returns returned wrong caps"));
       
  2144 	ASSERT_TRUE(wantedcaps.iHscsdSupport = EFalse, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2145 	ASSERT_TRUE(wantedcaps.iMaxRxTimeSlots = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2146 	ASSERT_TRUE(wantedcaps.iMaxTxTimeSlots = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2147 	ASSERT_TRUE(wantedcaps.iCodingCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2148 	ASSERT_TRUE(wantedcaps.iAsymmetryCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2149 	ASSERT_TRUE(wantedcaps.iUserInitUpgrade = EFalse, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2150 	ASSERT_TRUE(wantedcaps.iRLPVersionCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2151 	ASSERT_TRUE(wantedcaps.iV42bisCaps = 0x00, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2152 		
       
  2153 	// ===  Answer call ===
       
  2154 
       
  2155 	// Answer the incoming call with RCall::AnswerIncomingCall 
       
  2156 	TCoreEtelRequestStatus<RCall> answerIncomingStatus(dataCall1, &RCall::AnswerIncomingCallCancel);
       
  2157 	CleanupStack::PushL(answerIncomingStatus);	
       
  2158 	dataCall1.AnswerIncomingCall(answerIncomingStatus);
       
  2159 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
  2160 	ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
  2161     	
       
  2162 	// ===  Check call status ===
       
  2163 
       
  2164 	// Check RCall::NotifyStatusChange completes with EStatusAnswering->EStatusConnected
       
  2165 	RCall::TStatus expectedCallStatus = RCall::EStatusAnswering;
       
  2166 	iCallControlTestHelper.WaitForCallNotifyStatusChange(dataCall1,
       
  2167 														 notifyStatusChangeStatus,
       
  2168 														 callStatus,
       
  2169 														 expectedCallStatus,
       
  2170 														 wantedStatus);
       
  2171     dataCall1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
       
  2172 														 
       
  2173 	expectedCallStatus = RCall::EStatusConnected;
       
  2174 	iCallControlTestHelper.WaitForCallNotifyStatusChange(dataCall1,
       
  2175 														 notifyStatusChangeStatus,
       
  2176 														 callStatus,
       
  2177 														 expectedCallStatus,
       
  2178 														 wantedStatus);	
       
  2179 														 
       
  2180 	// Check RCall::GetStatus returns EStatusConnected
       
  2181 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus),KErrNone,  _L("RCall::GetStatus returned an error"));
       
  2182 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  2183 	
       
  2184 	// ===  Check mobile data call caps ===
       
  2185 
       
  2186 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iHscsdSupport=EFalse
       
  2187 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iSpeedCaps!=0
       
  2188 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iProtocolCaps!=0
       
  2189 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iQoSCaps!=0
       
  2190 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iServiceCaps!=0
       
  2191 	ASSERT_EQUALS(WaitForRequestWithTimeOut(NotifyMobileDataCallCapsChangeStatus, ETimeMedium), KErrNone, _L("RMobileCall::NotifyMobileDataCallCapsChange timed-out"));
       
  2192 	ASSERT_TRUE(wantedcaps.iHscsdSupport != EFalse, _L("RMobileCall::NotifyMobileDataCallCapsChange returned hscsd support EFalse"));
       
  2193 	ASSERT_TRUE(wantedcaps.iSpeedCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned speed caps 0, should have been other than 0"));
       
  2194 	ASSERT_TRUE(wantedcaps.iProtocolCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned protocol caps 0, should be other than 0"));	
       
  2195 	ASSERT_TRUE(wantedcaps.iQoSCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned QoS caps 0, should be other than 0"));	
       
  2196 	ASSERT_TRUE(wantedcaps.iServiceCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned service caps 0, should be other than 0"));	
       
  2197 																
       
  2198 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps!=0
       
  2199 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps!=0
       
  2200 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps!=0
       
  2201 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps!=0
       
  2202 	ASSERT_TRUE(wantedcaps.iHscsdSupport = EFalse, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2203 	ASSERT_TRUE(wantedcaps.iProtocolCaps!=0, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2204 	ASSERT_TRUE(wantedcaps.iQoSCaps!=0, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2205 	ASSERT_TRUE(wantedcaps.iServiceCaps!=0, _L("RMobileCall::GetMobileDataCallCaps returned wrong caps"));
       
  2206 	
       
  2207 	// ===  Get call parameters ===
       
  2208 
       
  2209 	// Check RCall::GetCallParams with aParams of type TMobileDataCallParamsV1 returns aParams.iSpeed!=RMobileCall::ESpeedUnspecified
       
  2210 	// Check RCall::GetCallParams with aParams of type TMobileDataCallParamsV1 returns aParams.iService != RMobileCall::EServiceUnspecified
       
  2211 	// Check RCall::GetCallParams with aParams of type TMobileDataCallParamsV1 returns aParams.iProtocol != RMobileCall::EProtocolUnspecified
       
  2212 	RMobileCall::TMobileDataCallParamsV1 checkParams;
       
  2213 	RMobileCall::TMobileDataCallParamsV1Pckg checkParamsPkg(checkParams);
       
  2214 	dataCall1.GetCallParams(checkParamsPkg);
       
  2215 	ASSERT_TRUE(checkParams.iSpeed!=RMobileCall::ESpeedUnspecified, _L("RCall::GetCallParams returned wrong caps"));
       
  2216 	ASSERT_TRUE(checkParams.iService != RMobileCall::EServiceUnspecified, _L("RCall::GetCallParams returned wrong caps"));
       
  2217 	ASSERT_TRUE(checkParams.iProtocol != RMobileCall::EProtocolUnspecified, _L("RCall::GetCallParams returned wrong caps"));
       
  2218 	
       
  2219 	//
       
  2220 	// TEST END
       
  2221 	//
       
  2222 
       
  2223     StartCleanup();
       
  2224 	
       
  2225 	// Pop
       
  2226 	// notifyIncomingCallStatus
       
  2227 	// notifyMobileCallStatusChangeStatus
       
  2228 	// NotifyMobileDataCallCapsChangeStatus
       
  2229 	// notifyStatusChangeStatus
       
  2230 	// answerIncomingStatus
       
  2231 	CleanupStack::PopAndDestroy(5,&notifyIncomingCallStatus);
       
  2232 	
       
  2233 	return TestStepResult();
       
  2234 	}
       
  2235 
       
  2236 TPtrC CCTSYIntegrationTestDataCallControl0005::GetTestStepName()
       
  2237 /**
       
  2238  * @return The test step name.
       
  2239  */
       
  2240 	{
       
  2241 	return _L("CCTSYIntegrationTestDataCallControl0005");
       
  2242 	}
       
  2243 
       
  2244 
       
  2245 
       
  2246 CCTSYIntegrationTestDataCallControl0006::CCTSYIntegrationTestDataCallControl0006(CEtelSessionMgr& aEtelSessionMgr)
       
  2247 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  2248 /**
       
  2249  * Constructor.
       
  2250  */
       
  2251 	{
       
  2252 	SetTestStepName(CCTSYIntegrationTestDataCallControl0006::GetTestStepName());
       
  2253 	}
       
  2254 
       
  2255 CCTSYIntegrationTestDataCallControl0006::~CCTSYIntegrationTestDataCallControl0006()
       
  2256 /**
       
  2257  * Destructor.
       
  2258  */
       
  2259 	{
       
  2260 	}
       
  2261 
       
  2262 TVerdict CCTSYIntegrationTestDataCallControl0006::doTestStepL()
       
  2263 /**
       
  2264  * @SYMTestCaseID BA-CTSY-INT-DATC-0006
       
  2265  * @SYMFssID BA/CTSY/DATC-0006
       
  2266  * @SYMTestCaseDesc Dial an HSCSD data call
       
  2267  * @SYMTestPriority High
       
  2268  * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RCall::AnswerIncomingCall, RMobileCall::NotifyMobileDataCallCapsChange, RMobileCall::GetMobileCallStatus, RCall::GetCallParams, RCall::GetStatus, RLine::NotifyIncomingCall, RMobileCall::GetMobileDataCallCaps, RCall::HangUp
       
  2269  * @SYMTestExpectedResults Pass - HSCSD call made.
       
  2270  * @SYMTestType CIT
       
  2271  * @SYMTestCaseDependencies live/automatic
       
  2272  *
       
  2273  * Reason for test: Verify HSCSD info, call params and data call caps.
       
  2274  *
       
  2275  * @return - TVerdict code
       
  2276  */
       
  2277 	{
       
  2278 
       
  2279 	//
       
  2280 	// SET UP
       
  2281 	//
       
  2282 
       
  2283 	// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL
       
  2284 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  2285  	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
       
  2286 				   _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  2287 
       
  2288 	// Get data line 1. 
       
  2289 	RMobileLine& dataline = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  2290 	
       
  2291 	// Get call 1. 
       
  2292 	RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);	
       
  2293 	
       
  2294 	//
       
  2295 	// SET UP END
       
  2296 	//
       
  2297 	
       
  2298 	StartTest();
       
  2299 	
       
  2300 	//
       
  2301 	// TEST START
       
  2302 	//
       
  2303 	
       
  2304 	DoTest0006L(call1, RMobileCall::ESpeed28800);
       
  2305 	
       
  2306 	// Repeat test with call at different speeds, 9.6kbits/s. 14.4kbits/s, 56kbits/s 
       
  2307 	DoTest0006L(call1, RMobileCall::ESpeed9600 );
       
  2308 	DoTest0006L(call1, RMobileCall::ESpeed14400 );
       
  2309 	DoTest0006L(call1, RMobileCall::ESpeed56000 );
       
  2310 	
       
  2311 	
       
  2312 
       
  2313 	
       
  2314 	//
       
  2315 	// TEST END
       
  2316 	//
       
  2317 
       
  2318     StartCleanup();
       
  2319 	
       
  2320 
       
  2321 	return TestStepResult();
       
  2322 	}
       
  2323 
       
  2324 TPtrC CCTSYIntegrationTestDataCallControl0006::GetTestStepName()
       
  2325 /**
       
  2326  * @return The test step name.
       
  2327  */
       
  2328 	{
       
  2329 	return _L("CCTSYIntegrationTestDataCallControl0006");
       
  2330 	}
       
  2331 
       
  2332 void CCTSYIntegrationTestDataCallControl0006::DoTest0006L(RMobileCall& aCall1, RMobileCall::TMobileCallDataSpeed aSpeed)
       
  2333 	{
       
  2334 	// ===  Dial an HSCSD call with call params ===
       
  2335 
       
  2336 	// Set up a RMobileCall::TMobileHscsdCallParamsV1 with 
       
  2337 	RMobileCall::TMobileHscsdCallParamsV1 dataparams;
       
  2338 	RMobileCall::TMobileHscsdCallParamsV1Pckg dataparamsPckg(dataparams);
       
  2339 
       
  2340 	// valid parameters 
       
  2341 	dataparams.iIdRestrict = RMobileCall::ESendMyId;
       
  2342 	dataparams.iAckTimer = 20;
       
  2343 	dataparams.iMSToModemWindowSize = 2;
       
  2344 	dataparams.iModemToMSWindowSize = 2;	
       
  2345 	dataparams.iProtocol = RMobileCall::EProtocolV34;
       
  2346 	dataparams.iQoS = RMobileCall::EQoSNonTransparent;
       
  2347 	dataparams.iRLPVersion = RMobileCall::ERLPSingleLinkVersion0;
       
  2348 	dataparams.iResequencingPeriod = 1;
       
  2349 	dataparams.iRetransmissionAttempts = 2;
       
  2350 	dataparams.iService = RMobileCall::EServiceDataCircuitAsync;
       
  2351 	dataparams.iSpeed = aSpeed;
       
  2352 	dataparams.iUseEdge = EFalse;
       
  2353 	dataparams.iV42bisCodewordsNum = 0;
       
  2354     dataparams.iV42bisMaxStringLength = 0;
       
  2355     dataparams.iV42bisReq = RMobileCall::EV42bisNeitherDirection;
       
  2356 	dataparams.iAsymmetry = RMobileCall::EAsymmetryDownlink;
       
  2357 	dataparams.iCodings = RMobileCall::KCapsAiurCoding144;
       
  2358 	dataparams.iUserInitUpgrade = EFalse;
       
  2359 
       
  2360 	// post notifier for RCall::NotifyStatusChange
       
  2361 	RCall::TStatus callStatus;
       
  2362 	TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (aCall1,&RCall::NotifyStatusChangeCancel);
       
  2363 	CleanupStack::PushL(notifyStatusChangeStatus);
       
  2364 	aCall1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
       
  2365 
       
  2366 	// Post notify RMobileCall::NotifyHscsdInfoChange
       
  2367 	RMobileCall::TMobileCallHscsdInfoV1 notifyHscsdParams;
       
  2368 	RMobileCall::TMobileCallHscsdInfoV1Pckg notifyHscsdParamsPckg(notifyHscsdParams);
       
  2369 	TExtEtelRequestStatus notifyHscsdInfoStatus(aCall1, EMobileCallNotifyHscsdInfoChange);
       
  2370 	CleanupStack::PushL(notifyHscsdInfoStatus);
       
  2371 	aCall1.NotifyHscsdInfoChange(notifyHscsdInfoStatus, notifyHscsdParamsPckg);
       
  2372 
       
  2373 	// Post notify RMobileCall::NotifyMobileDataCallCapsChange
       
  2374 	RMobileCall::TMobileCallDataCapsV1 notifydataCallCaps;
       
  2375 	RMobileCall::TMobileCallDataCapsV1Pckg notifydataCallCapsPckg(notifydataCallCaps);
       
  2376 	TExtEtelRequestStatus notifydataCallCapsStatus(aCall1, EMobileCallNotifyMobileDataCallCapsChange);
       
  2377 	CleanupStack::PushL(notifydataCallCapsStatus);
       
  2378 	aCall1.NotifyMobileDataCallCapsChange(notifydataCallCapsStatus, notifydataCallCapsPckg);
       
  2379 
       
  2380     
       
  2381  	// Set the dynamic HSCSD params with RMobileCall::SetDynamicHscsdParams with aAiur=EAiurBps28800 and aRxTimeslots=15 
       
  2382     TExtEtelRequestStatus setDynamicHscsdParamsStatus(aCall1, EMobileCallSetDynamicHscsdParams);
       
  2383 	CleanupStack::PushL(setDynamicHscsdParamsStatus);
       
  2384 	RMobileCall::TMobileCallAiur aiur = RMobileCall::EAiurBps28800;
       
  2385 	TInt rxTimeslots = 15;
       
  2386 	aCall1.SetDynamicHscsdParams(setDynamicHscsdParamsStatus, (RMobileCall::TMobileCallAiur)aiur, rxTimeslots);
       
  2387 	ASSERT_EQUALS(WaitForRequestWithTimeOut(setDynamicHscsdParamsStatus, ETimeVeryLong), KErrNone, _L("RMobileCall::setDynamicHscsdParamsStatus timed-out"));
       
  2388 	// @CTSYProblem RMobileCall::SetDynamicHscsdParams alwaysy return -33, it seems like this is LTSY answer
       
  2389 	ASSERT_EQUALS(setDynamicHscsdParamsStatus.Int(), KErrTimedOut, _L("RMobileCall::setDynamicHscsdParamsStatus returned with an error"));
       
  2390 
       
  2391 	// Dial a number that answers using the HSCSD call params 
       
  2392 	TPtrC number; 
       
  2393 	ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, number) != EFalse,			  
       
  2394 			_L("CTestStep::GetStringFromConfig did not complete as expected"));
       
  2395 	TCoreEtelRequestStatus<RCall> dialStatus(aCall1, &RCall::DialCancel);
       
  2396 	CleanupStack::PushL(dialStatus);
       
  2397 	aCall1.Dial(dialStatus, dataparamsPckg, number);
       
  2398 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeVeryLong), KErrNone, _L("RCall::Dial timed-out"));
       
  2399 	ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial returned with an error"));
       
  2400 	TEST_CHECK_POINT_L(_L("Couldn't dial a call, no point continuing."));
       
  2401 
       
  2402 	// Check RCall::NotifyStatusChange completes with EStatusConnected.
       
  2403 	RCall::TStatus expectedCallStatus = RCall::EStatusConnected;
       
  2404 	iCallControlTestHelper.WaitForCallNotifyStatusChange(aCall1,
       
  2405 														 notifyStatusChangeStatus,
       
  2406 														 callStatus,
       
  2407 														 expectedCallStatus,
       
  2408 														 KErrNone);
       
  2409 	// ===  Check HSCSD Info ===
       
  2410 
       
  2411 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iAiur!=EAiurBpsUnspecified
       
  2412 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iCodings!=ETchCodingUnspecified
       
  2413 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iRxTimeSlots>0
       
  2414 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iTxTimeSlots>0
       
  2415 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyHscsdInfoStatus, ETimeMedium), KErrNone, _L("RMobileCall::NotifyHscsdInfoChange timed-out"));
       
  2416 	ASSERT_TRUE(notifyHscsdParams.iAiur != RMobileCall::EAiurBpsUnspecified, _L("RMobileCall::NotifyHscsdInfoChange returned aiur EAiurBpsUnspecified"));
       
  2417 	ASSERT_TRUE(notifyHscsdParams.iCodings != RMobileCall::ETchCodingUnspecified, _L("RMobileCall::NotifyHscsdInfoChange returned codings ETchCodingUnspecified"));
       
  2418 	ASSERT_TRUE(notifyHscsdParams.iRxTimeSlots > 0, _L("RMobileCall::NotifyHscsdInfoChange returned rxTimeSlots 0, should be > 0"));	
       
  2419 	ASSERT_TRUE(notifyHscsdParams.iTxTimeSlots > 0, _L("RMobileCall::NotifyHscsdInfoChange returned txTimeSlots 0, should be > 0"));	
       
  2420 
       
  2421 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iAiur!=EAiurBpsUnspecified
       
  2422 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iCodings!=ETchCodingUnspecified
       
  2423 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iRxTimeSlots>0
       
  2424 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iTxTimeSlots>0
       
  2425 	RMobileCall::TMobileCallHscsdInfoV1 hscsdparams;
       
  2426 	RMobileCall::TMobileCallHscsdInfoV1Pckg hscsdparamsPckg(hscsdparams); 
       
  2427 	ASSERT_EQUALS(aCall1.GetCurrentHscsdInfo(hscsdparamsPckg), KErrNone, _L("RMobileCall::GetCurrentHscsdInfo returned an error"));
       
  2428 	ASSERT_TRUE(hscsdparams.iAiur != RMobileCall::EAiurBpsUnspecified, _L("RMobileCall::GetCurrentHscsdInfo returned aiur EAiurBpsUnspecified"));
       
  2429 	ASSERT_TRUE(hscsdparams.iCodings != RMobileCall::ETchCodingUnspecified, _L("RMobileCall::GetCurrentHscsdInfo returned codings ETchCodingUnspecified"));
       
  2430 	ASSERT_TRUE(hscsdparams.iRxTimeSlots > 0, _L("RMobileCall::GetCurrentHscsdInfo returned rxTimeSlots 0, should be > 0"));	
       
  2431 	ASSERT_TRUE(hscsdparams.iTxTimeSlots > 0, _L("RMobileCall::GetCurrentHscsdInfo returned txTimeSlots 0, should be > 0"));	
       
  2432 
       
  2433 	// ===  Check mobile data call caps ===
       
  2434 
       
  2435 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iHscsdSupport=ETrue
       
  2436 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iSpeedCaps!=0
       
  2437 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iProtocolCaps!=0
       
  2438 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iQoSCaps!=0
       
  2439 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iServiceCaps!=0
       
  2440 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifydataCallCapsStatus, ETimeMedium), KErrNone, _L("RMobileCall::NotifyMobileDataCallCapsChange timed-out"));
       
  2441 	ASSERT_TRUE(notifydataCallCaps.iHscsdSupport != EFalse, _L("RMobileCall::NotifyMobileDataCallCapsChange returned hscsd support EFalse"));
       
  2442 	ASSERT_TRUE(notifydataCallCaps.iSpeedCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned speed caps 0, should have been other than 0"));
       
  2443 	ASSERT_TRUE(notifydataCallCaps.iProtocolCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned protocol caps 0, should be other than 0"));	
       
  2444 	ASSERT_TRUE(notifydataCallCaps.iQoSCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned QoS caps 0, should be other than 0"));	
       
  2445 	ASSERT_TRUE(notifydataCallCaps.iServiceCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned service caps 0, should be other than 0"));	
       
  2446 
       
  2447 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iHscsdSupport=ETrue
       
  2448 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps!=0
       
  2449 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps!=0
       
  2450 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps!=0
       
  2451 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps!=0
       
  2452 	RMobileCall::TMobileCallDataCapsV1 dataCallCaps;
       
  2453 	RMobileCall::TMobileCallDataCapsV1Pckg CallCapsPckg(dataCallCaps);
       
  2454 	ASSERT_EQUALS(aCall1.GetMobileDataCallCaps(CallCapsPckg), KErrNone, _L("RMobileCall::GetMobileDataCallCaps returned an errro "));
       
  2455 	ASSERT_TRUE(dataCallCaps.iHscsdSupport != EFalse, _L("RMobileCall::GetMobileDataCallCaps returned hscsd support EFalse"));
       
  2456 	ASSERT_TRUE(dataCallCaps.iSpeedCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned speed caps 0, should have been other than 0"));
       
  2457 	ASSERT_TRUE(dataCallCaps.iProtocolCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned protocol caps 0, should be other than 0"));	
       
  2458 	ASSERT_TRUE(dataCallCaps.iQoSCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned QoS caps 0, should be other than 0"));	
       
  2459 	ASSERT_TRUE(dataCallCaps.iServiceCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned service caps 0, should be other than 0"));	
       
  2460 
       
  2461 	
       
  2462 	// ===  Get call params ===
       
  2463 
       
  2464 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iAsymmetry=same as that used in dial
       
  2465 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iCodings=same as that used in dial
       
  2466 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iMaxTimeSlots > 0
       
  2467 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iUserInitUpgrade=same as that used in dial
       
  2468 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iWantedAiur=EAiurBps28800
       
  2469 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iWantedRxTimeSlots=15
       
  2470 	ASSERT_EQUALS(aCall1.GetCallParams(dataparamsPckg), KErrNone, _L("RCall::GetCallParams returned an error"));
       
  2471 	ASSERT_EQUALS((TInt)dataparams.iCodings, (TInt)RMobileCall::KCapsAiurCoding144, _L("RCall::GetCallParams codings was not the same that used in dial"));
       
  2472 	ASSERT_TRUE(dataparams.iMaxTimeSlots > 0, _L("RCall::GetCallParams max time slot was 0, should have been bigger than 0"));
       
  2473  	ASSERT_EQUALS((TInt)dataparams.iUserInitUpgrade, (TInt)EFalse, _L("RCall::GetCallParams user init upgrade was not the same that used in dial"));
       
  2474  	ASSERT_EQUALS(dataparams.iWantedAiur, RMobileCall::EAiurBps28800, _L("RCall::GetCallParams wanted Aiur was not the same that used in dial"));
       
  2475  	ASSERT_EQUALS(dataparams.iWantedRxTimeSlots, 15, _L("RCall::GetCallParams wanted Rx timeslot was not the same that used in dial"));
       
  2476  
       
  2477 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iProtocol=same as that used in dial
       
  2478 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iQoS=same as that used in dial
       
  2479 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iService=same as that used in dial
       
  2480 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iSpeed=same as that used in dial
       
  2481  	ASSERT_EQUALS(dataparams.iProtocol, RMobileCall::EProtocolV34, _L("RCall::GetCallParams protocol was not the same that used in dial"));
       
  2482  	ASSERT_EQUALS(dataparams.iQoS,  RMobileCall::EQoSNonTransparent, _L("RCall::GetCallParams QoS was not the same that used in dial"));
       
  2483  	ASSERT_EQUALS(dataparams.iService,  RMobileCall::EServiceDataCircuitAsync, _L("RCall::GetCallParams service was not the same that used in dial"));
       
  2484  	ASSERT_EQUALS(dataparams.iSpeed,  aSpeed, _L("RCall::GetCallParams speed was not the same that used in dial"));
       
  2485 
       
  2486 	// ===  Write some data to the port ===
       
  2487 
       
  2488 	// RCommServ cs; 
       
  2489 	RCommServ cs;
       
  2490 
       
  2491 	// cs.Connect();
       
  2492 	ASSERT_EQUALS(cs.Connect(), KErrNone,  _L("RRCommServ::Connect returned an error"));
       
  2493 
       
  2494 	// RComm port; 
       
  2495 	RComm port;
       
  2496 
       
  2497 	// port.Open(cs,commPort.iPort,ECommShared); 
       
  2498 	RCall::TCommPort commPort;
       
  2499 	port.Open(cs, commPort.iPort,ECommShared); 
       
  2500 
       
  2501 	// ===  Check call is still connected ===
       
  2502 
       
  2503 	// Check RCall::GetStatus returns EStatusConnected
       
  2504 	ASSERT_EQUALS(aCall1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error"));
       
  2505 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected,  _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  2506 
       
  2507 	// port.Write(stat,KWriteTestData); 
       
  2508 	TRequestStatus stat;
       
  2509 	port.Write(stat, KWriteTestData);
       
  2510 	
       
  2511 	// port.Close(); 
       
  2512 	port.Close();
       
  2513 	
       
  2514 	// cs.Close(); 
       
  2515 	cs.Close(); 
       
  2516 
       
  2517 	// ===  Recover the data port ===
       
  2518 
       
  2519 	// Recover data port with RCall::RecoverDataPort 
       
  2520 	ASSERT_EQUALS(aCall1.RecoverDataPort(), KErrNone, _L("RCall::RecoverDataPort returned an error"));
       
  2521 
       
  2522 	// Check RCall::GetStatus returns EStatusConnected
       
  2523 	ASSERT_EQUALS(aCall1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error"));
       
  2524 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected,  _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  2525 		
       
  2526 	// Check RMobileCall::GetMobileDataCallRLPRange with aRLPVersion=0 completes with KErrNotSupported
       
  2527 	TInt rplVersion = 0;
       
  2528 	RMobileCall::TMobileDataRLPRangesV1 range;
       
  2529 	RMobileCall::TMobileDataRLPRangesV1Pckg rangePckg(range);
       
  2530 	TExtEtelRequestStatus getMobileDataCallRLPRangeStatus(aCall1, EMobileCallGetMobileDataCallRLPRange);
       
  2531 	CleanupStack::PushL(getMobileDataCallRLPRangeStatus);
       
  2532 	aCall1.GetMobileDataCallRLPRange(getMobileDataCallRLPRangeStatus, rplVersion, rangePckg);
       
  2533 	ASSERT_EQUALS(WaitForRequestWithTimeOut(getMobileDataCallRLPRangeStatus, ETimeMedium), KErrNotSupported,
       
  2534 		_L("RMobileCall::GetMobileDataCallRLPRange returned other than KErrNotSupported"));
       
  2535 	
       
  2536 	// Hang up call 
       
  2537 	TCoreEtelRequestStatus<RCall> hangUpStatus (aCall1,&RCall::HangUpCancel);	
       
  2538 	CleanupStack::PushL(hangUpStatus);
       
  2539 	aCall1.HangUp(hangUpStatus);
       
  2540 	
       
  2541 	// Pop
       
  2542 	// setDynamicHscsdParamsStatus
       
  2543 	// notifyStatusChangeStatus
       
  2544 	// notifyHscsdInfoStatus
       
  2545 	// notifydataCallCapsStatus
       
  2546 	// dialStatus
       
  2547 	// getMobileDataCallRLPRangeStatus
       
  2548 	// hangUpStatus
       
  2549 	CleanupStack::PopAndDestroy(7, &setDynamicHscsdParamsStatus);
       
  2550 	
       
  2551 	}
       
  2552 
       
  2553 
       
  2554 CCTSYIntegrationTestDataCallControl0007::CCTSYIntegrationTestDataCallControl0007(CEtelSessionMgr& aEtelSessionMgr)
       
  2555 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  2556 /**
       
  2557  * Constructor.
       
  2558  */
       
  2559 	{
       
  2560 	SetTestStepName(CCTSYIntegrationTestDataCallControl0007::GetTestStepName());
       
  2561 	}
       
  2562 
       
  2563 CCTSYIntegrationTestDataCallControl0007::~CCTSYIntegrationTestDataCallControl0007()
       
  2564 /**
       
  2565  * Destructor.
       
  2566  */
       
  2567 	{
       
  2568 	}
       
  2569 
       
  2570 TVerdict CCTSYIntegrationTestDataCallControl0007::doTestStepL()
       
  2571 /**
       
  2572  * @SYMTestCaseID BA-CTSY-INT-DATC-0007
       
  2573  * @SYMFssID BA/CTSY/DATC-0007
       
  2574  * @SYMTestCaseDesc Answer an HSCSD data call
       
  2575  * @SYMTestPriority High
       
  2576  * @SYMTestActions RCall::RecoverDataPort, RMobileCall::SetDynamicHscsdParams, RCall::GetCallParams, RLine::NotifyIncomingCall, RMobileCall::GetMobileDataCallRLPRange, RCall::NotifyStatusChange, RCall::AnswerIncomingCall, RCall::GetStatus, RMobileCall::GetMobileDataCallCaps, RMobileCall::NotifyHscsdInfoChange
       
  2577  * @SYMTestExpectedResults Pass - HSCSD call answered.
       
  2578  * @SYMTestType CIT
       
  2579  * @SYMTestCaseDependencies live/automatic
       
  2580  *
       
  2581  * Reason for test: Verify HSCSD info, call params and data call caps.
       
  2582  *
       
  2583  * @return - TVerdict code
       
  2584  */
       
  2585 	{
       
  2586 
       
  2587 	//
       
  2588 	// SET UP
       
  2589 	//
       
  2590 
       
  2591 	// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL
       
  2592 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  2593  	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
       
  2594 				   _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  2595 
       
  2596 	// Get data line 1. 
       
  2597 	RMobileLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  2598 	
       
  2599 	//
       
  2600 	// SET UP END
       
  2601 	//
       
  2602 	
       
  2603 	StartTest();
       
  2604 	
       
  2605 	//
       
  2606 	// TEST START
       
  2607 	//
       
  2608 
       
  2609 	
       
  2610 	DoTest0007L(dataLine);
       
  2611 	
       
  2612 	// Repeat with call at different speeds, 9.6kbits/s. 14.4kbits/s, 56kbits/s 
       
  2613 	DisplayUserInteractionPromptL(_L("Tester needs about to Dial in with CS call speed of 9.6kbits/s after pressing Any key"), ETimeMedium);
       
  2614 	DoTest0007L(dataLine);
       
  2615 	DisplayUserInteractionPromptL(_L("Tester needs about to Dial in with CS call speed of 14.4kbits/s after pressing Any key"), ETimeMedium);
       
  2616 	DoTest0007L(dataLine);
       
  2617 	DisplayUserInteractionPromptL(_L("Tester needs about to Dial in with CS call speed of 56kbits/s after pressing Any key"), ETimeMedium);
       
  2618 	DoTest0007L(dataLine);
       
  2619 	
       
  2620 	//
       
  2621 	// TEST END
       
  2622 	//
       
  2623 
       
  2624     StartCleanup();
       
  2625 	
       
  2626 	// Put any required test clean up here, then remove this comment
       
  2627 	
       
  2628 	return TestStepResult();
       
  2629 	}
       
  2630 
       
  2631 TPtrC CCTSYIntegrationTestDataCallControl0007::GetTestStepName()
       
  2632 /**
       
  2633  * @return The test step name.
       
  2634  */
       
  2635 	{
       
  2636 	return _L("CCTSYIntegrationTestDataCallControl0007");
       
  2637 	}
       
  2638 
       
  2639 void CCTSYIntegrationTestDataCallControl0007::DoTest0007L(RMobileLine& aDataLine)
       
  2640 	{
       
  2641 
       
  2642 	// Get call 1. 
       
  2643 	RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  2644 
       
  2645 	// ===  Answer an incoming HSCSD call ===
       
  2646 
       
  2647 	// Post notification for incoming call from RPS
       
  2648 	TName name;
       
  2649 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (aDataLine,&RLine::NotifyIncomingCallCancel);
       
  2650 	CleanupStack::PushL(notifyIncomingCallStatus);
       
  2651 	aDataLine.NotifyIncomingCall(notifyIncomingCallStatus, name);
       
  2652 
       
  2653 	// Request an incoming HSCSD call with RPS. 
       
  2654 	ASSERT_EQUALS (RPSRequestIncomingCallL( EDataLine ), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
  2655 
       
  2656 	// Check RLine::NotifyIncomingCall completes with valid call name.
       
  2657 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeMedium),KErrNone,_L("RLine::NotifyIncomingCall timed out"));
       
  2658 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"));
       
  2659 	ASSERT_TRUE(name.Length()>0, _L("RLine::NotifyIncomingCall did not return a call name"));
       
  2660 	
       
  2661 	// Get the incoming call
       
  2662 	TCallId incomingCallId;
       
  2663 	call1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
  2664 	
       
  2665 	// Post noitfy RMobileCall::NotifyMobileDataCallCapsChange
       
  2666 	RMobileCall::TMobileCallDataCapsV1 notifydataCallCaps;
       
  2667 	RMobileCall::TMobileCallDataCapsV1Pckg notifydataCallCapsPckg(notifydataCallCaps);
       
  2668 	TExtEtelRequestStatus notifydataCallCapsStatus(call1, EMobileCallNotifyMobileDataCallCapsChange);
       
  2669 	CleanupStack::PushL(notifydataCallCapsStatus);
       
  2670 	call1.NotifyMobileDataCallCapsChange(notifydataCallCapsStatus, notifydataCallCapsPckg);
       
  2671 
       
  2672 	// Post notify RMobileCall::NotifyHscsdInfoChange
       
  2673 	RMobileCall::TMobileCallHscsdInfoV1 notifyHscsdParams;
       
  2674 	RMobileCall::TMobileCallHscsdInfoV1Pckg notifyHscsdParamsPckg(notifyHscsdParams);
       
  2675 	TExtEtelRequestStatus notifyHscsdInfoStatus(call1, EMobileCallNotifyHscsdInfoChange);
       
  2676 	CleanupStack::PushL(notifyHscsdInfoStatus);
       
  2677 	call1.NotifyHscsdInfoChange(notifyHscsdInfoStatus, notifyHscsdParamsPckg);
       
  2678 
       
  2679 	// post notifier for RCall::NotifyStatusChange
       
  2680 	RCall::TStatus callStatus;
       
  2681 	TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1, &RCall::NotifyStatusChangeCancel);
       
  2682 	CleanupStack::PushL(notifyStatusChangeStatus);
       
  2683 	call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus);
       
  2684 	
       
  2685 	// Answer the call with RCall::AnswerIncomingCall 
       
  2686 	TCoreEtelRequestStatus<RCall> answerIncomingStatus(call1, &RCall::AnswerIncomingCallCancel);
       
  2687 	CleanupStack::PushL(answerIncomingStatus);	
       
  2688 	call1.AnswerIncomingCall(answerIncomingStatus);
       
  2689 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
  2690 	ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
  2691 
       
  2692 	// Check RCall::NotifyStatusChange completes with EStatusConnected.
       
  2693 	RCall::TStatus expectedCallStatus = RCall::EStatusConnected;
       
  2694 	iCallControlTestHelper.WaitForCallNotifyStatusChange(call1,
       
  2695 														 notifyStatusChangeStatus,
       
  2696 														 callStatus,
       
  2697 														 expectedCallStatus,
       
  2698 														 KErrNone);
       
  2699 
       
  2700 	// ===  Check mobile data call caps ===
       
  2701 
       
  2702 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iHscsdSupport=ETrue
       
  2703 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iSpeedCaps!=0
       
  2704 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iProtocolCaps!=0
       
  2705 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iQoSCaps!=0
       
  2706 	// Check RMobileCall::NotifyMobileDataCallCapsChange completes with aCaps.iServiceCaps!=0
       
  2707 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifydataCallCapsStatus, ETimeMedium), KErrNone, _L("RMobileCall::NotifyMobileDataCallCapsChange timed-out"));
       
  2708 	ASSERT_TRUE(notifydataCallCaps.iHscsdSupport != EFalse, _L("RMobileCall::NotifyMobileDataCallCapsChange returned hscsd support EFalse"));
       
  2709 	ASSERT_TRUE(notifydataCallCaps.iSpeedCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned speed caps 0, should have been other than 0"));
       
  2710 	ASSERT_TRUE(notifydataCallCaps.iProtocolCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned protocol caps 0, should be other than 0"));	
       
  2711 	ASSERT_TRUE(notifydataCallCaps.iQoSCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned QoS caps 0, should be other than 0"));	
       
  2712 	ASSERT_TRUE(notifydataCallCaps.iServiceCaps != 0, _L("RMobileCall::NotifyMobileDataCallCapsChange returned service caps 0, should be other than 0"));	
       
  2713 
       
  2714 	// Check RMobileCall::GetMobileDataCallCaps completes with aCaps.iHscsdSupport=ETrue
       
  2715 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iSpeedCaps!=0
       
  2716 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iProtocolCaps!=0
       
  2717 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iQoSCaps!=0
       
  2718 	// Check RMobileCall::GetMobileDataCallCaps returns aCaps.iServiceCaps!=0
       
  2719 	RMobileCall::TMobileCallDataCapsV1 dataCallCaps;
       
  2720 	RMobileCall::TMobileCallDataCapsV1Pckg CallCapsPckg(dataCallCaps);
       
  2721 	ASSERT_EQUALS(call1.GetMobileDataCallCaps(CallCapsPckg), KErrNone, _L("RMobileCall::GetMobileDataCallCaps returned an errro "));
       
  2722 	ASSERT_TRUE(dataCallCaps.iHscsdSupport != EFalse, _L("RMobileCall::GetMobileDataCallCaps returned hscsd support EFalse"));
       
  2723 	ASSERT_TRUE(dataCallCaps.iSpeedCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned speed caps 0, should have been other than 0"));
       
  2724 	ASSERT_TRUE(dataCallCaps.iProtocolCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned protocol caps 0, should be other than 0"));	
       
  2725 	ASSERT_TRUE(dataCallCaps.iQoSCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned QoS caps 0, should be other than 0"));	
       
  2726 	ASSERT_TRUE(dataCallCaps.iServiceCaps != 0, _L("RMobileCall::GetMobileDataCallCaps returned service caps 0, should be other than 0"));	
       
  2727 
       
  2728 	// ===  Check HSCSD Info ===
       
  2729 
       
  2730 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iAiur!=EAiurBpsUnspecified
       
  2731 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iCodings!=ETchCodingUnspecified
       
  2732 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iRxTimeSlots>0
       
  2733 	// Check RMobileCall::NotifyHscsdInfoChange with parameter of type TMobileCallHscsdInfoV1 returns iTxTimeSlots>0
       
  2734 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyHscsdInfoStatus, ETimeMedium), KErrNone, _L("RMobileCall::NotifyHscsdInfoChange timed-out"));
       
  2735 	ASSERT_TRUE(notifyHscsdParams.iAiur != RMobileCall::EAiurBpsUnspecified, _L("RMobileCall::NotifyHscsdInfoChange returned aiur EAiurBpsUnspecified"));
       
  2736 	ASSERT_TRUE(notifyHscsdParams.iCodings != RMobileCall::ETchCodingUnspecified, _L("RMobileCall::NotifyHscsdInfoChange returned codings ETchCodingUnspecified"));
       
  2737 	ASSERT_TRUE(notifyHscsdParams.iRxTimeSlots > 0, _L("RMobileCall::NotifyHscsdInfoChange returned rxTimeSlots 0, should be > 0"));	
       
  2738 	ASSERT_TRUE(notifyHscsdParams.iTxTimeSlots > 0, _L("RMobileCall::NotifyHscsdInfoChange returned txTimeSlots 0, should be > 0"));	
       
  2739 
       
  2740 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iAiur!=EAiurBpsUnspecified
       
  2741 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iCodings!=ETchCodingUnspecified
       
  2742 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iRxTimeSlots>0
       
  2743 	// Check RMobileCall::GetCurrentHscsdInfo with parameter of type TMobileCallHscsdInfoV1 returns iTxTimeSlots>0
       
  2744 	RMobileCall::TMobileCallHscsdInfoV1 hscsdparams;
       
  2745 	RMobileCall::TMobileCallHscsdInfoV1Pckg hscsdparamsPckg(hscsdparams); 
       
  2746 	ASSERT_EQUALS(call1.GetCurrentHscsdInfo(hscsdparamsPckg), KErrNone, _L("RMobileCall::GetCurrentHscsdInfo returned an error"));
       
  2747 	ASSERT_TRUE(hscsdparams.iAiur != RMobileCall::EAiurBpsUnspecified, _L("RMobileCall::GetCurrentHscsdInfo returned aiur EAiurBpsUnspecified"));
       
  2748 	ASSERT_TRUE(hscsdparams.iCodings != RMobileCall::ETchCodingUnspecified, _L("RMobileCall::GetCurrentHscsdInfo returned codings ETchCodingUnspecified"));
       
  2749 	ASSERT_TRUE(hscsdparams.iRxTimeSlots > 0, _L("RMobileCall::GetCurrentHscsdInfo returned rxTimeSlots 0, should be > 0"));	
       
  2750 	ASSERT_TRUE(hscsdparams.iTxTimeSlots > 0, _L("RMobileCall::GetCurrentHscsdInfo returned txTimeSlots 0, should be > 0"));	
       
  2751 
       
  2752 	// ===  Get call params ===
       
  2753 
       
  2754 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iAsymmetry=same as that used in dial
       
  2755 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iCodings=same as that used in dial
       
  2756 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iMaxTimeSlots > 0
       
  2757 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iUserInitUpgrade=same as that used in dial
       
  2758 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iProtocol!=EProtocolUnspecified
       
  2759 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iQoS!=EQoSUnspecified
       
  2760 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iService!=EServiceUnspecified
       
  2761 	// Check RCall::GetCallParams with aParams of type TMobileHscsdCallParamsV1 returns iSpeed!=ESpeedUnspecified
       
  2762 	// NOTE: some of parameters are checked due test does not make a Dial and we cannot compare "same as that used in dial"
       
  2763 	RMobileCall::TMobileHscsdCallParamsV1 dataparams;
       
  2764 	RMobileCall::TMobileHscsdCallParamsV1Pckg dataparamsPckg(dataparams);
       
  2765 	ASSERT_EQUALS(call1.GetCallParams(dataparamsPckg), KErrNone, _L("RCall::GetCallParams returned an error"));
       
  2766 	ASSERT_TRUE(dataparams.iMaxTimeSlots > 0, _L("RCall::GetCallParams max time slot was 0, should have been bigger than 0"));
       
  2767 	ASSERT_TRUE(dataparams.iProtocol != RMobileCall::EProtocolUnspecified, _L("RCall::GetCallParams returned protocol RMobileCall::EProtocolUnspecified, should have been other"));
       
  2768 	ASSERT_TRUE(dataparams.iQoS != RMobileCall::EQoSUnspecified, _L("RCall::GetCallParams returned QoS RMobileCall::EProtocoEQoSUnspecifiedl, should have been other")); 	
       
  2769 	ASSERT_TRUE(dataparams.iSpeed != RMobileCall::ESpeedUnspecified, _L("RCall::GetCallParams returned iSpeed RMobileCall::ESpeedUnspecified, should have been other")); 	
       
  2770 
       
  2771 	// Hang up call. 
       
  2772 	TCoreEtelRequestStatus<RCall> hangUpStatus (call1, &RCall::HangUpCancel);	
       
  2773 	CleanupStack::PushL(hangUpStatus);
       
  2774 	call1.HangUp(hangUpStatus);
       
  2775 	
       
  2776 	// Pop
       
  2777 	// notifyIncomingCallStatus
       
  2778 	// notifyStatusChangeStatus
       
  2779 	// notifydataCallCapsStatus
       
  2780 	// notifyHscsdInfoStatus
       
  2781 	// answerIncomingStatus
       
  2782 	// hangUpStatus
       
  2783 	CleanupStack::PopAndDestroy(6, &notifyIncomingCallStatus);
       
  2784 
       
  2785 	}
       
  2786 
       
  2787 
       
  2788 CCTSYIntegrationTestDataCallControl0008::CCTSYIntegrationTestDataCallControl0008(CEtelSessionMgr& aEtelSessionMgr)
       
  2789 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  2790 /**
       
  2791  * Constructor.
       
  2792  */
       
  2793 	{
       
  2794 	SetTestStepName(CCTSYIntegrationTestDataCallControl0008::GetTestStepName());
       
  2795 	}
       
  2796 
       
  2797 CCTSYIntegrationTestDataCallControl0008::~CCTSYIntegrationTestDataCallControl0008()
       
  2798 /**
       
  2799  * Destructor.
       
  2800  */
       
  2801 	{
       
  2802 	}
       
  2803 
       
  2804 TVerdict CCTSYIntegrationTestDataCallControl0008::doTestStepL()
       
  2805 /**
       
  2806  * @SYMTestCaseID BA-CTSY-INT-DATC-0008
       
  2807  * @SYMFssID BA/CTSY/DATC-0008
       
  2808  * @SYMTestCaseDesc Check that a data call cannot be put on hold (GSM limitation)
       
  2809  * @SYMTestPriority High
       
  2810  * @SYMTestActions 
       
  2811  * @SYMTestExpectedResults Pass - KErrNotSupported returned
       
  2812  * @SYMTestType CIT
       
  2813  * @SYMTestCaseDependencies live/automatic
       
  2814  *
       
  2815  * Reason for test: Verify KErrNotSupported returned.
       
  2816  *
       
  2817  * @return - TVerdict code
       
  2818  */
       
  2819 	{
       
  2820 
       
  2821 	//
       
  2822 	// SET UP
       
  2823 	//
       
  2824 	// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL
       
  2825 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  2826  	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone,
       
  2827 				   _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  2828 	
       
  2829 	// Get data line 1. 
       
  2830 	 RLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  2831     
       
  2832 	// Get call 1. 
       
  2833 	RMobileCall& dataCall1= iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KDataLine, KCall1);
       
  2834 
       
  2835 	// Ensure there is a data call connected.
       
  2836 	TPtrC dataNumber; 
       
  2837     CHECK_TRUE_L(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, dataNumber), _L("Failed to obtain KIniDataNumber1") ); 
       
  2838 	TCoreEtelRequestStatus<RMobileCall> dialStatus(dataCall1, &RMobileCall::DialCancel);
       
  2839 	CleanupStack::PushL(dialStatus);
       
  2840 	dataCall1.Dial(dialStatus, dataNumber);
       
  2841 	CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeVeryLong), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  2842 	CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RMobileCall::Dial did not return KErrNone"));
       
  2843 	
       
  2844 	// Check RCall::GetStatus returns EStatusConnected
       
  2845 	RCall::TStatus callStatus;
       
  2846 	CHECK_EQUALS_L(dataCall1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error"));
       
  2847 	CHECK_EQUALS_L(callStatus, RCall::EStatusConnected,  _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  2848 
       
  2849 
       
  2850 	//
       
  2851 	// SET UP END
       
  2852 	//
       
  2853 	
       
  2854 	StartTest();
       
  2855 	
       
  2856 	//
       
  2857 	// TEST START
       
  2858 	//
       
  2859 	
       
  2860 	
       
  2861 	// ===  Check data call does not have hold caps ===
       
  2862 
       
  2863 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps NOT in set of KCapsHold
       
  2864 	RMobileCall::TMobileCallCapsV1 unwantedMobileCaps;
       
  2865 	unwantedMobileCaps.iCallControlCaps = RMobileCall::KCapsHold;
       
  2866 	RMobileCall::TMobileCallCapsV1 mobileCallCaps;
       
  2867 	RMobileCall::TMobileCallCapsV1Pckg capsPckg(mobileCallCaps);
       
  2868 	ASSERT_EQUALS(dataCall1.GetMobileCallCaps(capsPckg), KErrNone, _L("RMobileCall::GetMobileCallCaps returned an error"));								
       
  2869 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, mobileCallCaps.iCallControlCaps, unwantedMobileCaps.iCallControlCaps, _L("RMobileCall::GetMobileCallCaps containsed unwanted caps KCapsHold"));
       
  2870 	
       
  2871 	// Attempt to hold the call with RMobileCall::Hold  
       
  2872 	TExtEtelRequestStatus holdStatus(dataCall1, EMobileCallHold);
       
  2873 	CleanupStack::PushL(holdStatus);
       
  2874 	dataCall1.Hold(holdStatus);
       
  2875 	
       
  2876 	// Check this completes with KErrNotSupported
       
  2877 	ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out."));
       
  2878 	ASSERT_EQUALS(holdStatus.Int(), KErrNotSupported, _L("RMobileCall::Hold did not return KErrNotSupported."));
       
  2879 
       
  2880 	// ===  Check call is still connected ===
       
  2881 
       
  2882 	// Check RCall::GetStatus returns EStatusConnected
       
  2883 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error"));
       
  2884 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected,  _L("RCall::GetStatus did not return a status EStatusConnected"));
       
  2885 
       
  2886 	
       
  2887 	//
       
  2888 	// TEST END
       
  2889 	//
       
  2890 
       
  2891 
       
  2892     StartCleanup();
       
  2893 	
       
  2894 	// Pop
       
  2895 	// dialStatus
       
  2896 	// holdStatus
       
  2897 	CleanupStack::PopAndDestroy(2, &dialStatus);
       
  2898 	
       
  2899 	return TestStepResult();
       
  2900 	}
       
  2901 
       
  2902 TPtrC CCTSYIntegrationTestDataCallControl0008::GetTestStepName()
       
  2903 /**
       
  2904  * @return The test step name.
       
  2905  */
       
  2906 	{
       
  2907 	return _L("CCTSYIntegrationTestDataCallControl0008");
       
  2908 	}
       
  2909 
       
  2910 
       
  2911 
       
  2912 CCTSYIntegrationTestDataCallControl0009::CCTSYIntegrationTestDataCallControl0009(CEtelSessionMgr& aEtelSessionMgr)
       
  2913 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  2914 /**
       
  2915  * Constructor.
       
  2916  */
       
  2917 	{
       
  2918 	SetTestStepName(CCTSYIntegrationTestDataCallControl0009::GetTestStepName());
       
  2919 	}
       
  2920 
       
  2921 CCTSYIntegrationTestDataCallControl0009::~CCTSYIntegrationTestDataCallControl0009()
       
  2922 /**
       
  2923  * Destructor.
       
  2924  */
       
  2925 	{
       
  2926 	}
       
  2927 
       
  2928 TVerdict CCTSYIntegrationTestDataCallControl0009::doTestStepL()
       
  2929 /**
       
  2930  * @SYMTestCaseID BA-CTSY-INT-DATC-0009
       
  2931  * @SYMFssID BA/CTSY/DATC-0009
       
  2932  * @SYMTestCaseDesc Deflect data call (currently unsupported)
       
  2933  * @SYMTestPriority High
       
  2934  * @SYMTestActions RMobileCall::GetMobileCallStatus, RMobileCall::NotifyMobileCallCapsChange, RMobileCall::GetMobileCallCaps, RMobileCall::Deflect
       
  2935  * @SYMTestExpectedResults Pass - KErrNotSupported returned
       
  2936  * @SYMTestType CIT
       
  2937  * @SYMTestCaseDependencies live/automatic
       
  2938  *
       
  2939  * Reason for test: Verify KErrNotSupported returned.
       
  2940  *
       
  2941  * @return - TVerdict code
       
  2942  */
       
  2943 	{
       
  2944 
       
  2945 	//
       
  2946 	// SET UP
       
  2947 	//
       
  2948 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
  2949 	// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL		
       
  2950 	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  2951 	
       
  2952 	// Get data line 1. 
       
  2953     RLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  2954     
       
  2955 	// Get call 1. 
       
  2956 	RMobileCall& dataCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  2957 
       
  2958 	//
       
  2959 	// SET UP END
       
  2960 	//
       
  2961 	
       
  2962 	StartTest();
       
  2963 	
       
  2964 	//
       
  2965 	// TEST START
       
  2966 	//
       
  2967 	
       
  2968 	
       
  2969 	// ===  Request for an incoming call ===
       
  2970 
       
  2971 	// Post notification for incoming call from RPS
       
  2972 	TName name;
       
  2973 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (dataLine,&RLine::NotifyIncomingCallCancel);
       
  2974 	CleanupStack::PushL(notifyIncomingCallStatus);
       
  2975 	dataLine.NotifyIncomingCall(notifyIncomingCallStatus,name);
       
  2976 	
       
  2977 	// Request incoming data call from RPS. 
       
  2978 	ASSERT_EQUALS (RPSRequestIncomingCallL( EDataLine ), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
  2979 	
       
  2980 	// Check RLine::NotifyIncomingCall completes with a valid call name.
       
  2981 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeMedium),KErrNone,_L("RLine::NotifyIncomingCall timed out"));
       
  2982 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"));
       
  2983 	ASSERT_TRUE(name.Length()>0, _L("RLine::NotifyIncomingCall did not return a call name"));
       
  2984 	
       
  2985 	//Get the incoming call
       
  2986 	TCallId incomingCallId;
       
  2987 	dataCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
  2988 	
       
  2989 	// post notifier for RMobileCall::NotifyMobileCallStatusChange
       
  2990 	RMobileCall::TMobileCallStatus mobileCallStatus;
       
  2991 	TExtEtelRequestStatus notifyMobileCallStatusChangeStatus(dataCall1, EMobileCallNotifyMobileCallStatusChange);
       
  2992 	CleanupStack::PushL(notifyMobileCallStatusChangeStatus);
       
  2993 	dataCall1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus);
       
  2994 	
       
  2995 	// Post notifier for RMobileCall::NotifyMobileCallCapsChange
       
  2996 	RMobileCall::TMobileCallCapsV1 mobileCallCaps;
       
  2997 	RMobileCall::TMobileCallCapsV1Pckg capsPckg(mobileCallCaps);
       
  2998 	TExtEtelRequestStatus notifyMobileCallCapsChangeStatus(dataCall1, EMobileCallNotifyMobileCallCapsChange);
       
  2999 	CleanupStack::PushL(notifyMobileCallCapsChangeStatus);
       
  3000 	dataCall1.NotifyMobileCallCapsChange(notifyMobileCallCapsChangeStatus,capsPckg);
       
  3001 	
       
  3002 	// ===  Check call is in correct state to be deflected ===
       
  3003 
       
  3004 	// Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusRinging
       
  3005 	const TInt wantedStatus = KErrNone;
       
  3006 	RMobileCall::TMobileCallStatus expectedMobileCallStatus = RMobileCall::EStatusRinging;
       
  3007 	// $CTSYProblem: NotifyMobileCallStatusChange coming too fast. CMmDataCallTsy::CompleteNotifyStatusChange coming earlier than notify request. 
       
  3008 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(dataCall1,
       
  3009 															notifyMobileCallStatusChangeStatus,
       
  3010 															mobileCallStatus,
       
  3011 															expectedMobileCallStatus,
       
  3012 															wantedStatus);	
       
  3013 																												
       
  3014 	// Check RMobileCall::GetMobileCallStatus returns status of EStatusRinging
       
  3015 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(mobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned error."));
       
  3016 	ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusRinging, _L("RMobileCall::GetMobileCallStatus returned error."));
       
  3017 	
       
  3018 	// ===  Check data call does not have deflect caps ===
       
  3019 
       
  3020 	// Check RMobileCall::NotifyMobileCallCapsChange completes with iCallControlCaps NOT in set of KCapsDeflect
       
  3021 	RMobileCall::TMobileCallCapsV1 wantedMobileCaps, unwantedMobileCaps;
       
  3022 	wantedMobileCaps.iCallEventCaps = KNoWantedBits;
       
  3023 	unwantedMobileCaps.iCallControlCaps = RMobileCall::KCapsDeflect;
       
  3024 	TCmpRMobileCallTMobileCallCaps mobileCapsComp(wantedMobileCaps,mobileCallCaps, *this);
       
  3025 	iCallControlTestHelper.WaitForMobileCallNotifyMobileCallCapsChange(dataCall1, 
       
  3026 																	   notifyMobileCallCapsChangeStatus,
       
  3027 																	   mobileCapsComp,
       
  3028 																	   wantedStatus);
       
  3029 						
       
  3030 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, wantedMobileCaps.iCallControlCaps, unwantedMobileCaps.iCallControlCaps,  
       
  3031 			_L("RMobileCall::NotifyMobileCallCapsChange did not set expected iCallControlCaps"));
       
  3032 														   
       
  3033 	// Check RMobileCall::GetMobileCallCaps includes iCallControlCaps NOT in set of KCapsDeflect
       
  3034 	unwantedMobileCaps.iCallControlCaps = RMobileCall::KCapsDeflect;
       
  3035 	ASSERT_EQUALS(dataCall1.GetMobileCallCaps(capsPckg), KErrNone, _L("RMobileCall::GetMobileCallCaps returned an error"));								
       
  3036 	ASSERT_BITS_SET(mobileCallCaps.iCallControlCaps, KNoWantedBits, unwantedMobileCaps.iCallControlCaps, _L("RMobileCall::GetMobileCallCaps contains unwanted caps KCapsTransfer"));
       
  3037 	
       
  3038 	// Attempt to deflect the call to any number with RMobileCall::Deflect 
       
  3039 	DEBUG_PRINTF1(_L("Deflecting call... "));
       
  3040     TExtEtelRequestStatus setDeflectStatus(dataLine, EMobileCallDeflect);
       
  3041     CleanupStack::PushL(setDeflectStatus);
       
  3042     
       
  3043     RMobilePhone::TMobileAddress destination;
       
  3044     dataCall1.Deflect(setDeflectStatus, RMobileCall::EDeflectVoicemail, destination);
       
  3045     ASSERT_EQUALS(setDeflectStatus.Int(), KErrNone, _L("RMobileCall::Deflect returned with an error"));
       
  3046     
       
  3047 	// Check this completes with KErrNotSupported
       
  3048 	ASSERT_EQUALS(WaitForRequestWithTimeOut(setDeflectStatus, ETimeLong), KErrNone, _L("RCall::Deflect timed-out"));
       
  3049 	ASSERT_TRUE((setDeflectStatus.Int() == KErrNotSupported), _L("RMobileCall::Deflect did not return KErrNotSupported"));
       
  3050 
       
  3051 	
       
  3052 	//
       
  3053 	// TEST END
       
  3054 	//
       
  3055 
       
  3056     StartCleanup();
       
  3057 	
       
  3058 	// Pop
       
  3059 	// notifyIncomingCallStatus
       
  3060 	// notifyMobileCallStatusChangeStatus
       
  3061 	// notifyMobileCallCapsChangeStatus
       
  3062 	// setDeflectStatus
       
  3063 	CleanupStack::PopAndDestroy(4,&notifyIncomingCallStatus);
       
  3064 	
       
  3065 	return TestStepResult();
       
  3066 	}
       
  3067 
       
  3068 TPtrC CCTSYIntegrationTestDataCallControl0009::GetTestStepName()
       
  3069 /**
       
  3070  * @return The test step name.
       
  3071  */
       
  3072 	{
       
  3073 	return _L("CCTSYIntegrationTestDataCallControl0009");
       
  3074 	}
       
  3075 
       
  3076 
       
  3077 
       
  3078 CCTSYIntegrationTestDataCallControl0010::CCTSYIntegrationTestDataCallControl0010(CEtelSessionMgr& aEtelSessionMgr)
       
  3079 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  3080 /**
       
  3081  * Constructor.
       
  3082  */
       
  3083 	{
       
  3084 	SetTestStepName(CCTSYIntegrationTestDataCallControl0010::GetTestStepName());
       
  3085 	}
       
  3086 
       
  3087 CCTSYIntegrationTestDataCallControl0010::~CCTSYIntegrationTestDataCallControl0010()
       
  3088 /**
       
  3089  * Destructor.
       
  3090  */
       
  3091 	{
       
  3092 	}
       
  3093 
       
  3094 TVerdict CCTSYIntegrationTestDataCallControl0010::doTestStepL()
       
  3095 /**
       
  3096  * @SYMTestCaseID BA-CTSY-INT-DATC-0010
       
  3097  * @SYMFssID BA/CTSY/DATC-0010
       
  3098  * @SYMTestCaseDesc CSD call cannot be made when a voice call is active or held
       
  3099  * @SYMTestPriority High
       
  3100  * @SYMTestActions 
       
  3101  * @SYMTestExpectedResults Pass - KErrEtelCallAlreadyActive returned on attempt to dial a data call.
       
  3102  * @SYMTestType CIT
       
  3103  * @SYMTestCaseDependencies live/automatic
       
  3104  *
       
  3105  * Reason for test: Verify KErrEtelCallAlreadyActive returned
       
  3106  *
       
  3107  * @return - TVerdict code
       
  3108  */
       
  3109 	{
       
  3110 
       
  3111 	//
       
  3112 	// SET UP
       
  3113 	//
       
  3114     
       
  3115     RMobilePhone &phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
  3116     CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  3117     
       
  3118     // Fetch used phone numbers
       
  3119     TPtrC voiceNumber; 
       
  3120     CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, voiceNumber), _L("Failed to obtain KIniVoiceNumber1") );
       
  3121     TPtrC dataNumber; 
       
  3122     CHECK_TRUE_L(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, dataNumber), _L("Failed to obtain KIniDataNumber1") );
       
  3123 	
       
  3124 	// Get data line 1. 
       
  3125 	RMobileLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  3126 
       
  3127 	// Get call 1 with data line 1. 
       
  3128 	RMobileCall& dataCall = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  3129 
       
  3130 	// Get voice line 2 
       
  3131 	RMobileLine& voiceLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine);
       
  3132 
       
  3133 	// Get call 2 with voice line 2 
       
  3134 	RMobileCall& voiceCall = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2);
       
  3135 
       
  3136 	// Ensure there is a connected voice call on the voice line. 
       
  3137 	TCoreEtelRequestStatus<RMobileCall> dialStatus(voiceCall, &RMobileCall::DialCancel);
       
  3138 	CleanupStack::PushL(dialStatus);
       
  3139 	voiceCall.Dial(dialStatus, voiceNumber);
       
  3140     DEBUG_PRINTF2(_L("Dialling call 2(voice):%S"), &voiceNumber);
       
  3141 	CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3142 	CHECK_EQUALS_L(dialStatus.Int(), KErrNone, _L("RMobileCall::Dial returned an error"));
       
  3143 
       
  3144 	//
       
  3145 	// SET UP END
       
  3146 	//
       
  3147 	
       
  3148 	StartTest();
       
  3149 	
       
  3150 	//
       
  3151 	// TEST START
       
  3152 	//
       
  3153 	
       
  3154 	// Dial a number on call 1. 
       
  3155 	TCoreEtelRequestStatus<RMobileCall> dialStatus2(dataCall, &RMobileCall::DialCancel);
       
  3156 	CleanupStack::PushL(dialStatus2);
       
  3157 	dataCall.Dial(dialStatus2, dataNumber);
       
  3158     DEBUG_PRINTF2(_L("Dialling call 1(data):%S"), &dataNumber);
       
  3159 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus2, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3160 
       
  3161 	// Check dial completes with KErrEtelCallAlreadyActive
       
  3162 	ASSERT_EQUALS(dialStatus2.Int(), KErrEtelCallAlreadyActive, _L("RMobileCall::Dial did not return KErrEtelCallAlreadyActive as expected"));
       
  3163 
       
  3164 	// Hold the voice call. 
       
  3165 	TExtEtelRequestStatus holdStatus(voiceCall, EMobileCallHold);
       
  3166 	CleanupStack::PushL(holdStatus);
       
  3167 	voiceCall.Hold(holdStatus);
       
  3168 	ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out."));
       
  3169 	ASSERT_EQUALS(holdStatus.Int(), KErrNone, _L("RMobileCall::Hold Returned error."));
       
  3170     
       
  3171 	// Dial a number on call 1. 
       
  3172 	dataCall.Dial(dialStatus2, dataNumber);
       
  3173     DEBUG_PRINTF2(_L("Dialling call 1(data):%S"), &dataNumber);
       
  3174 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus2, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3175 		
       
  3176 	// Check dial completes with KErrEtelCallAlreadyActive
       
  3177 	// $CTSYProblem CTSY returns KErrServerBusy instead of KErrEtelCallAlreadyActive.This is because the first data call doesn't complete.
       
  3178 	// CMmDataCallTsy::Dial() set the dialFlag to ETrue in the first data call and when second call is dialled it is still ETrue.
       
  3179 	// When CMmDataCallTsy::Dial() returns KErrEtelCallAlreadyActive it should also set dialFlag back to EFalse.	
       
  3180 	ASSERT_EQUALS(dialStatus2.Int(), KErrEtelCallAlreadyActive, _L("RMobileCall::Dial did not return KErrEtelCallAlreadyActive as expected"));
       
  3181 
       
  3182 	//
       
  3183 	// TEST END
       
  3184 	//
       
  3185 
       
  3186     StartCleanup();
       
  3187 	
       
  3188 	voiceCall.HangUp();
       
  3189     dataCall.HangUp();	
       
  3190 	
       
  3191 	// Pop
       
  3192 	// dialStatus
       
  3193 	// dialStatus2
       
  3194 	// holdStatus
       
  3195 	CleanupStack::PopAndDestroy(3,&dialStatus);	
       
  3196 	
       
  3197 	return TestStepResult();
       
  3198 	}
       
  3199 
       
  3200 TPtrC CCTSYIntegrationTestDataCallControl0010::GetTestStepName()
       
  3201 /**
       
  3202  * @return The test step name.
       
  3203  */
       
  3204 	{
       
  3205 	return _L("CCTSYIntegrationTestDataCallControl0010");
       
  3206 	}
       
  3207 
       
  3208 
       
  3209 
       
  3210 CCTSYIntegrationTestDataCallControl0011::CCTSYIntegrationTestDataCallControl0011(CEtelSessionMgr& aEtelSessionMgr)
       
  3211 	: CCTSYIntegrationTestDataCallControlBase(aEtelSessionMgr)
       
  3212 /**
       
  3213  * Constructor.
       
  3214  */
       
  3215 	{
       
  3216 	SetTestStepName(CCTSYIntegrationTestDataCallControl0011::GetTestStepName());
       
  3217 	}
       
  3218 
       
  3219 CCTSYIntegrationTestDataCallControl0011::~CCTSYIntegrationTestDataCallControl0011()
       
  3220 /**
       
  3221  * Destructor.
       
  3222  */
       
  3223 	{
       
  3224 	}
       
  3225 
       
  3226 TVerdict CCTSYIntegrationTestDataCallControl0011::doTestStepL()
       
  3227 /**
       
  3228  * @SYMTestCaseID BA-CTSY-INT-DATC-0011
       
  3229  * @SYMFssID BA/CTSY/DATC-0011
       
  3230  * @SYMTestCaseDesc CSD call can't be made when conference call is active or held
       
  3231  * @SYMTestPriority High
       
  3232  * @SYMTestActions 
       
  3233  * @SYMTestExpectedResults Pass - KErrEtelCallAlreadyActive returned on attempt to dial a data call.
       
  3234  * @SYMTestType CIT
       
  3235  * @SYMTestCaseDependencies live/automatic
       
  3236  *
       
  3237  * Reason for test: Verify KErrEtelCallAlreadyActive returned
       
  3238  *
       
  3239  * @return - TVerdict code
       
  3240  */
       
  3241 	{
       
  3242 
       
  3243 	//
       
  3244 	// SET UP
       
  3245 	//
       
  3246 
       
  3247     RMobilePhone &phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
  3248     CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  3249     
       
  3250     // Fetch used phone numbers
       
  3251     TPtrC voiceNumber1; 
       
  3252     CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, voiceNumber1), _L("Failed to obtain KIniVoiceNumber1") );
       
  3253     TPtrC voiceNumber2; 
       
  3254     CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber2, voiceNumber2), _L("Failed to obtain KIniVoiceNumber2") );
       
  3255     TPtrC dataNumber1; 
       
  3256     CHECK_TRUE_L(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, dataNumber1), _L("Failed to obtain KIniDataNumber1") );
       
  3257     	
       
  3258 	// Get data line 1. 
       
  3259 	RMobileLine& line = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  3260 
       
  3261 	// Get call 1 with data line 1. 
       
  3262 	RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
  3263 	
       
  3264 	// Ensure there is an active 3 party conference call. 
       
  3265 	RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2);
       
  3266 	RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3);
       
  3267 	RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall);
       
  3268 	
       
  3269 	TCoreEtelRequestStatus<RMobileCall> dialStatus1(call2, &RMobileCall::DialCancel);
       
  3270 	CleanupStack::PushL(dialStatus1);
       
  3271 	call2.Dial(dialStatus1, voiceNumber1);
       
  3272     DEBUG_PRINTF2(_L("Dialling call 2(voice):%S"), &voiceNumber1);
       
  3273 	CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus1, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3274 	CHECK_EQUALS_L(dialStatus1.Int(), KErrNone, _L("RMobileCall::Dial returned an error"));
       
  3275 	
       
  3276 	TExtEtelRequestStatus holdStatus(call2, EMobileCallHold);
       
  3277 	CleanupStack::PushL(holdStatus);
       
  3278 	call2.Hold(holdStatus);
       
  3279 	CHECK_EQUALS_L(WaitForRequestWithTimeOut(holdStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out."));
       
  3280 	CHECK_EQUALS_L(holdStatus.Int(), KErrNone, _L("RMobileCall::Hold Returned error."));
       
  3281 		
       
  3282 	TCoreEtelRequestStatus<RMobileCall> dialStatus2(call3, &RMobileCall::DialCancel);
       
  3283 	CleanupStack::PushL(dialStatus2);
       
  3284 	call3.Dial(dialStatus2, voiceNumber2);
       
  3285     DEBUG_PRINTF2(_L("Dialling call 3(voice):%S"), &voiceNumber2);
       
  3286 	CHECK_EQUALS_L(WaitForRequestWithTimeOut(dialStatus2, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3287 	CHECK_EQUALS_L(dialStatus2.Int(), KErrNone, _L("RMobileCall::Dial returned an error"));
       
  3288 		
       
  3289 	TExtEtelRequestStatus createConferenceStatus(phone, EMobileConferenceCallCreateConference);
       
  3290 	CleanupStack::PushL(createConferenceStatus);
       
  3291 	confCall.CreateConference(createConferenceStatus);
       
  3292 	CHECK_EQUALS_L(WaitForRequestWithTimeOut(createConferenceStatus, ETimeMedium), KErrNone, _L("RMobileConferenceCall::CreateConference timed out"));
       
  3293 	CHECK_EQUALS_L(createConferenceStatus.Int(), KErrNone, _L("RMobileConferenceCall::CreateConference returned an error"));
       
  3294     
       
  3295 	//
       
  3296 	// SET UP END
       
  3297 	//
       
  3298 	
       
  3299 	StartTest();
       
  3300 	
       
  3301 	//
       
  3302 	// TEST START
       
  3303 	//
       
  3304 		
       
  3305 	// Dial a number on call 1. 
       
  3306 	TCoreEtelRequestStatus<RMobileCall> dialStatus3(call1, &RMobileCall::DialCancel);
       
  3307 	CleanupStack::PushL(dialStatus3);
       
  3308 	call1.Dial(dialStatus3, dataNumber1);
       
  3309     DEBUG_PRINTF2(_L("Dialling call 3(data):%S"), &dataNumber1);
       
  3310     ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus3, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3311 	
       
  3312 	// Check dial completes with KErrEtelCallAlreadyActive
       
  3313 	ASSERT_EQUALS(dialStatus3.Int(), KErrEtelCallAlreadyActive, _L("RMobileCall::Dial did not return KErrEtelCallAlreadyActive as expected"));
       
  3314 
       
  3315 	// Put the conference call on hold using RMobileConferenceCall::Swap 
       
  3316 	TExtEtelRequestStatus swapConferenceStatus(confCall, EMobileConferenceCallSwap);
       
  3317 	CleanupStack::PushL(swapConferenceStatus);
       
  3318 	confCall.Swap(swapConferenceStatus);
       
  3319 	ASSERT_EQUALS(WaitForRequestWithTimeOut(swapConferenceStatus,ETimeMedium), KErrNone, _L("RMobileConferenceCall::Swap timed out"));
       
  3320 	ASSERT_EQUALS(swapConferenceStatus.Int(),KErrNone, _L("RMobileConferenceCall::Swap returned error"));
       
  3321 
       
  3322 	// Dial a number on call 1. 
       
  3323 	call1.Dial(dialStatus3, dataNumber1);
       
  3324     DEBUG_PRINTF2(_L("Dialling call 3(data):%S"), &dataNumber1);
       
  3325     ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus3, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
  3326 
       
  3327 	// Check dial completes with KErrEtelCallAlreadyActive
       
  3328 	// $CTSYProblem CTSY returns KErrServerBusy instead of KErrEtelCallAlreadyActive
       
  3329     ASSERT_EQUALS(dialStatus3.Int(), KErrEtelCallAlreadyActive, _L("RMobileCall::Dial did not return KErrEtelCallAlreadyActive as expected"));
       
  3330 	
       
  3331 	//
       
  3332 	// TEST END
       
  3333 	//
       
  3334 
       
  3335     StartCleanup();
       
  3336 		
       
  3337     call1.HangUp();
       
  3338     call2.HangUp();
       
  3339     call3.HangUp();	
       
  3340 	
       
  3341 	// Pop
       
  3342 	// dialStatus1
       
  3343 	// holdStatus
       
  3344 	// dialStatus2
       
  3345 	// createConferenceStatus
       
  3346 	// dialStatus3
       
  3347 	// swapConferenceStatus
       
  3348 	CleanupStack::PopAndDestroy(6,&dialStatus1);	
       
  3349 	
       
  3350 	return TestStepResult();
       
  3351 	}
       
  3352 
       
  3353 TPtrC CCTSYIntegrationTestDataCallControl0011::GetTestStepName()
       
  3354 /**
       
  3355  * @return The test step name.
       
  3356  */
       
  3357 	{
       
  3358 	return _L("CCTSYIntegrationTestDataCallControl0011");
       
  3359 	}
       
  3360 
       
  3361 
       
  3362