telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestmultibearerinteroperability.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
child 26 8767c6acf334
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 MultiBearerInteroperability functional unit.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalTechnology
       
    20 */
       
    21 #include <etelpckt.h>
       
    22 #include <ctsy/rmmcustomapi.h>
       
    23 #include <pcktcs.h>
       
    24 #include "cctsyinidata.h" 
       
    25 #include "cctsyintegrationtestmultibearerinteroperability.h"
       
    26 #include "chttpdownload.h"
       
    27 
       
    28 
       
    29 CCTSYIntegrationTestMultiBearerInteroperabilityBase::CCTSYIntegrationTestMultiBearerInteroperabilityBase(CEtelSessionMgr& aEtelSessionMgr)
       
    30 	: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr),
       
    31 		iNetworkTestHelper(*this),
       
    32 		iPacketServiceTestHelper(*this),
       
    33 		iCallControlTestHelper(*this),
       
    34 		iSmsStoreTsyTestHelper(*this)
       
    35 			
       
    36 /**
       
    37  * Constructor
       
    38  */
       
    39 	{
       
    40 	}
       
    41 
       
    42 CCTSYIntegrationTestMultiBearerInteroperabilityBase::~CCTSYIntegrationTestMultiBearerInteroperabilityBase()
       
    43 /*
       
    44  * Destructor
       
    45  */
       
    46 	{
       
    47 	}
       
    48 	
       
    49 void CCTSYIntegrationTestMultiBearerInteroperabilityBase::SetAttachModeToWhenPossibleAndWaitForAttachL(RPacketService& aPacketService)
       
    50 /**
       
    51  * Attaches the phone to the packet service by setting the
       
    52  * attach mode to RPacketService::EAttachWhenPossible. Requests
       
    53  * that the phone attaches to the packet service and waits for
       
    54  * attach to complete.
       
    55  * 
       
    56  * @param aPacketService Reference to packet service subsession.
       
    57  *
       
    58  * @return void
       
    59  *
       
    60  */
       
    61     {
       
    62     RPacketService::TAttachMode attachMode;
       
    63     CHECK_EQUALS_L(aPacketService.GetAttachMode(attachMode), KErrNone, _L("RPacketService::GetAttachMode returned with an error."));
       
    64 
       
    65     TExtEtelRequestStatus notifyServiceStatusChStatus(aPacketService, EPacketNotifyStatusChange);
       
    66     CleanupStack::PushL(notifyServiceStatusChStatus);
       
    67     RPacketService::TStatus packetServiceStatus;
       
    68     aPacketService.NotifyStatusChange(notifyServiceStatusChStatus, packetServiceStatus);
       
    69 
       
    70     if(attachMode != RPacketService::EAttachWhenPossible)
       
    71 		{
       
    72 		CHECK_EQUALS_L(aPacketService.SetAttachMode(RPacketService::EAttachWhenPossible), KErrNone, _L("RPacketService::SetAttachMode returned with an error."));
       
    73 		}
       
    74 
       
    75     CHECK_EQUALS_L(aPacketService.GetAttachMode(attachMode), KErrNone, _L("RPacketService::GetAttachMode returned with an error."));
       
    76     CHECK_EQUALS_L(attachMode, RPacketService::EAttachWhenPossible, _L("RPacketService::GetAttachMode did not return EAttachWhenPossible."));
       
    77 
       
    78     // Ensure phone is attached to the packet service (RPacketService::GetStatus returns EStatusAttached).
       
    79 	RPacketService::TStatus packetStatus;
       
    80 	CHECK_EQUALS_L(aPacketService.GetStatus(packetStatus), KErrNone, _L("RPacketService::GetStatus returned with an error"));
       
    81 	
       
    82 	// Wait for phone to attach to packet service if it is not attached.
       
    83 	if (packetStatus == RPacketService::EStatusUnattached)
       
    84 		{
       
    85         iPacketServiceTestHelper.WaitForPacketServiceNotifyStatusChange(
       
    86 				aPacketService,
       
    87 				notifyServiceStatusChStatus,
       
    88 				packetServiceStatus, 
       
    89 				RPacketService::EStatusAttached,
       
    90 				KErrNone);
       
    91         CHECK_EQUALS_L(aPacketService.GetStatus(packetStatus), KErrNone, _L("RPacketService::GetStatus returned with an error"));
       
    92         CHECK_EQUALS_L(packetStatus, RPacketService::EStatusAttached, _L("RPacketService::GetStatus did not return EStatusAttached"));
       
    93 		}
       
    94     
       
    95     // Pop
       
    96     // notifyServiceStatusChStatus
       
    97     CleanupStack::PopAndDestroy(1, &notifyServiceStatusChStatus);
       
    98     }
       
    99 
       
   100 
       
   101 
       
   102 		
       
   103 CCTSYIntegrationTestMultiBearerInteroperability0001::CCTSYIntegrationTestMultiBearerInteroperability0001(CEtelSessionMgr& aEtelSessionMgr)
       
   104 	: CCTSYIntegrationTestMultiBearerInteroperabilityBase(aEtelSessionMgr)
       
   105 /**
       
   106  * Constructor.
       
   107  */
       
   108 	{
       
   109 	SetTestStepName(CCTSYIntegrationTestMultiBearerInteroperability0001::GetTestStepName());
       
   110 	}
       
   111 
       
   112 CCTSYIntegrationTestMultiBearerInteroperability0001::~CCTSYIntegrationTestMultiBearerInteroperability0001()
       
   113 /**
       
   114  * Destructor.
       
   115  */
       
   116 	{
       
   117 	}
       
   118 
       
   119 TVerdict CCTSYIntegrationTestMultiBearerInteroperability0001::doTestStepL()
       
   120 /**
       
   121  * @SYMTestCaseID BA-CTSY-INT-MBI-0001
       
   122  * @SYMFssID BA/CTSY/MBI-0001
       
   123  * @SYMTestCaseDesc Verify simultaneous PS connection and MO CS call
       
   124  * @SYMTestPriority High
       
   125  * @SYMTestActions RLine::NotifyStatusChange, RCall::HangUp, RPacketContext::Activate, RPacketContext::NotifyStatusChange, RPacketService::NotifyStatusChange, RMobileSmsMessaging::SendMessage
       
   126  * @SYMTestExpectedResults Pass - MO call made.
       
   127  * @SYMTestType CIT
       
   128  * @SYMTestCaseDependencies live/automatic
       
   129  *
       
   130  * Reason for test:
       
   131  *
       
   132  * @return - TVerdict code
       
   133  */
       
   134 	{
       
   135 
       
   136 	//
       
   137 	// SET UP
       
   138 	//
       
   139 
       
   140 	// Ensure phone is camped on a valid cell. 
       
   141 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer,KMainPhone);
       
   142 	
       
   143 	// Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL		
       
   144 	CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
   145 	
       
   146 	// Ensure phone is attached to packet service. 
       
   147 	RPacketService& packetService = iEtelSessionMgr.GetPacketServiceL(KMainServer, KMainPhone, KMainPacketService);
       
   148     				
       
   149 	// Get voice line 1. 
       
   150 	RMobileLine& mobileLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine);
       
   151 	
       
   152 	// Get call 1. 
       
   153 	RMobileCall& mobileCall= iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KVoiceLine, KCall1);
       
   154 
       
   155 	//
       
   156 	// SET UP END
       
   157 	//
       
   158 	
       
   159 	StartTest();
       
   160 	
       
   161 	//
       
   162 	// TEST START
       
   163 	//
       
   164 
       
   165 	// Post a notifier for RLine::NotifyStatusChange
       
   166 	TCoreEtelRequestStatus<RLine> notifyLineChangeStatus (mobileLine, &RLine::NotifyStatusChangeCancel);
       
   167 	CleanupStack::PushL(notifyLineChangeStatus);
       
   168 	RCall::TStatus lineStatus;
       
   169 	mobileLine.NotifyStatusChange(notifyLineChangeStatus,lineStatus);
       
   170 
       
   171 	// Dial a number that answers. 
       
   172 	TPtrC number;
       
   173 	ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig did not complete as expected"));
       
   174 	TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall, &RMobileCall::DialCancel);
       
   175 	CleanupStack::PushL(dialStatus);
       
   176 	mobileCall.Dial(dialStatus, number);	
       
   177     ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
   178 	ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RMobileCall::Dial returned error."));
       
   179 	
       
   180 	// Verify line rings and call is answered.
       
   181 	RCall::TStatus expectedLineStatus = RCall::EStatusDialling;
       
   182 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
   183 														 notifyLineChangeStatus,
       
   184 														 lineStatus,
       
   185 														 expectedLineStatus,
       
   186 													     KErrNone);
       
   187 	
       
   188     expectedLineStatus = RCall::EStatusConnecting;
       
   189 	mobileLine.NotifyStatusChange(notifyLineChangeStatus,lineStatus);
       
   190 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
   191 														 notifyLineChangeStatus,
       
   192 														 lineStatus,
       
   193 														 expectedLineStatus,
       
   194 														 KErrNone);
       
   195 
       
   196     expectedLineStatus = RCall::EStatusConnected;
       
   197 	mobileLine.NotifyStatusChange(notifyLineChangeStatus,lineStatus);
       
   198 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
   199 														 notifyLineChangeStatus,
       
   200 														 lineStatus,
       
   201 														 expectedLineStatus,
       
   202 														 KErrNone);
       
   203 
       
   204 	// Hang up call. 
       
   205 	TCoreEtelRequestStatus<RMobileCall> hangUpStatus (mobileCall, &RMobileCall::HangUpCancel);	
       
   206 	CleanupStack::PushL(hangUpStatus);
       
   207 	mobileCall.HangUp(hangUpStatus);
       
   208 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RMobileCall::HangUp timed-out"));
       
   209 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RMobileCall::CallHangUp returned an error"));
       
   210 	
       
   211 	// Activate a PDP context. 
       
   212 	RPacketContext& packetContext = iEtelSessionMgr.GetPrimaryPacketContextL(KMainServer, KMainPhone, KMainPacketService, KPrimaryPacketContext1);
       
   213 	iPacketServiceTestHelper.ActivatePrimaryPacketContextL(phone, packetContext);
       
   214 
       
   215     // Repost notifier for RLine::NotifyStatusChange
       
   216 	mobileLine.NotifyStatusChange(notifyLineChangeStatus,lineStatus);
       
   217 
       
   218 	// Post notification for service's status change
       
   219 	RPacketService::TStatus packetServiceStatus;
       
   220 	TExtEtelRequestStatus notifyServiceStatusChange(packetService, EPacketNotifyStatusChange);
       
   221 	CleanupStack::PushL(notifyServiceStatusChange);
       
   222 	packetService.NotifyStatusChange(notifyServiceStatusChange, packetServiceStatus);
       
   223 
       
   224 	// Post notification for context's status change
       
   225 	RPacketContext::TContextStatus packetContextStatus;
       
   226 	TExtEtelRequestStatus notifyContextStatusChange(packetContext, EPacketContextNotifyStatusChange);
       
   227 	CleanupStack::PushL(notifyContextStatusChange);
       
   228 	packetContext.NotifyStatusChange(notifyContextStatusChange, packetContextStatus);
       
   229 
       
   230 	// Dial a number that answers. 
       
   231 	mobileCall.Dial(dialStatus, number);
       
   232 
       
   233 	// Verify line rings and call is answered.
       
   234 	expectedLineStatus = RCall::EStatusDialling;
       
   235 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
   236 														 notifyLineChangeStatus,
       
   237 														 lineStatus,
       
   238 														 expectedLineStatus,
       
   239 													     KErrNone);
       
   240 	
       
   241     expectedLineStatus = RCall::EStatusConnecting;
       
   242 	mobileLine.NotifyStatusChange(notifyLineChangeStatus,lineStatus);
       
   243 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
   244 														 notifyLineChangeStatus,
       
   245 														 lineStatus,
       
   246 														 expectedLineStatus,
       
   247 														 KErrNone);
       
   248 
       
   249 	expectedLineStatus = RCall::EStatusConnected;
       
   250 	mobileLine.NotifyStatusChange(notifyLineChangeStatus,lineStatus);
       
   251 	iCallControlTestHelper.WaitForLineNotifyStatusChange(mobileLine,
       
   252 														 notifyLineChangeStatus,
       
   253 														 lineStatus,
       
   254 														 expectedLineStatus,
       
   255 														 KErrNone);
       
   256 
       
   257     ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out"));
       
   258 	ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RMobileCall::Dial returned error."));
       
   259 
       
   260 	// Verify packet service and context are suspended. 
       
   261 	RPacketService::TStatus expectedPacketServiceStatus = RPacketService::EStatusSuspended;
       
   262 	iPacketServiceTestHelper.WaitForPacketServiceNotifyStatusChange(packetService,
       
   263 	                                                                notifyServiceStatusChange,
       
   264 	                                                                packetServiceStatus,
       
   265 	                                                                expectedPacketServiceStatus,
       
   266 	                                                                KErrNone);
       
   267 
       
   268 	RPacketContext::TContextStatus expectedPacketContextStatus = RPacketContext::EStatusSuspended;
       
   269 	iPacketServiceTestHelper.WaitForPacketContextNotifyStatusChange(packetContext,
       
   270 	                                                                notifyContextStatusChange,
       
   271 	                                                                packetContextStatus,
       
   272 	                                                                expectedPacketContextStatus,
       
   273 	                                                                KErrNone);
       
   274 
       
   275 	// Repost notification for service's status change
       
   276 	packetService.NotifyStatusChange(notifyServiceStatusChange, packetServiceStatus);
       
   277 
       
   278 	// Repost notification for context's status change
       
   279 	packetContext.NotifyStatusChange(notifyContextStatusChange, packetContextStatus);
       
   280 
       
   281 	// Hang up. 
       
   282 	mobileCall.HangUp(hangUpStatus);
       
   283 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RMobileCall::HangUp timed-out"));
       
   284 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RMobileCall::CallHangUp returned an error"));
       
   285 
       
   286 	// Verify packet service and context are active again. 
       
   287     expectedPacketServiceStatus = RPacketService::EStatusActive;
       
   288 	iPacketServiceTestHelper.WaitForPacketServiceNotifyStatusChange(packetService,
       
   289 	                                                                notifyServiceStatusChange,
       
   290 	                                                                packetServiceStatus,
       
   291 	                                                                expectedPacketServiceStatus,
       
   292 	                                                                KErrNone);
       
   293 
       
   294 	expectedPacketContextStatus = RPacketContext::EStatusActive;
       
   295 	iPacketServiceTestHelper.WaitForPacketContextNotifyStatusChange(packetContext,
       
   296 	                                                                notifyContextStatusChange,
       
   297 	                                                                packetContextStatus,
       
   298 	                                                                expectedPacketContextStatus,
       
   299 	                                                                KErrNone);
       
   300 
       
   301 	//
       
   302 	// TEST END
       
   303 	//
       
   304 
       
   305     StartCleanup();
       
   306 	
       
   307 	// Pop
       
   308 	// notifyLineChangeStatus
       
   309 	// dialStatus
       
   310 	// hangUpStatus
       
   311 	// notifyServiceStatusChange
       
   312 	// notifyContextStatusChange
       
   313 	CleanupStack::PopAndDestroy(5, &notifyLineChangeStatus);
       
   314 
       
   315 	return TestStepResult();
       
   316 	}
       
   317 
       
   318 TPtrC CCTSYIntegrationTestMultiBearerInteroperability0001::GetTestStepName()
       
   319 /**
       
   320  * @return The test step name.
       
   321  */
       
   322 	{
       
   323 	return _L("CCTSYIntegrationTestMultiBearerInteroperability0001");
       
   324 	}
       
   325 
       
   326 
       
   327 
       
   328 CCTSYIntegrationTestMultiBearerInteroperability0002::CCTSYIntegrationTestMultiBearerInteroperability0002(CEtelSessionMgr& aEtelSessionMgr)
       
   329 	: CCTSYIntegrationTestMultiBearerInteroperabilityBase(aEtelSessionMgr)
       
   330 /**
       
   331  * Constructor.
       
   332  */
       
   333 	{
       
   334 	SetTestStepName(CCTSYIntegrationTestMultiBearerInteroperability0002::GetTestStepName());
       
   335 	}
       
   336 
       
   337 CCTSYIntegrationTestMultiBearerInteroperability0002::~CCTSYIntegrationTestMultiBearerInteroperability0002()
       
   338 /**
       
   339  * Destructor.
       
   340  */
       
   341 	{
       
   342 	}
       
   343 
       
   344 TVerdict CCTSYIntegrationTestMultiBearerInteroperability0002::doTestStepL()
       
   345 /**
       
   346  * @SYMTestCaseID BA-CTSY-INT-MBI-0002
       
   347  * @SYMFssID BA/CTSY/MBI-0002
       
   348  * @SYMTestCaseDesc Verify simultaneous PS connection and MO SMS
       
   349  * @SYMTestPriority High
       
   350  * @SYMTestActions RPacketContext::NotifyStatusChange, RPacketService::NotifyStatusChange, RMobileSmsMessaging::SendMessage
       
   351  * @SYMTestExpectedResults Pass - MO SMS sent.
       
   352  * @SYMTestType CIT
       
   353  * @SYMTestCaseDependencies live/automatic
       
   354  *
       
   355  * Reason for test: 
       
   356  *
       
   357  * @return - TVerdict code
       
   358  */
       
   359 	{
       
   360 
       
   361 	//
       
   362 	// SET UP
       
   363 	//
       
   364 
       
   365 	
       
   366 	// Ensure phone is camped on a valid cell. 
       
   367 
       
   368 	// Ensure phone is attached to packet service. 
       
   369 
       
   370 	// Get voice line 1. 
       
   371 
       
   372 	// Get call 1. 
       
   373 
       
   374 
       
   375 	//
       
   376 	// SET UP END
       
   377 	//
       
   378 	
       
   379 	StartTest();
       
   380 	
       
   381 	//
       
   382 	// TEST START
       
   383 	//
       
   384 	
       
   385 	
       
   386 	// Send an SMS.   
       
   387 
       
   388 	// Verify SMS can be sent. 
       
   389 
       
   390 	// Activate a PDP context. 
       
   391 
       
   392 	// Send an SMS. 
       
   393 
       
   394 	// Verify SMS can be sent. 
       
   395 
       
   396 	// Verify packet service and context become suspended and the active again when message sent. 
       
   397 
       
   398 	
       
   399 	//
       
   400 	// TEST END
       
   401 	//
       
   402 
       
   403     StartCleanup();
       
   404 	
       
   405 	// Put any required test clean up here, then remove this comment
       
   406 	
       
   407 	return TestStepResult();
       
   408 	}
       
   409 
       
   410 TPtrC CCTSYIntegrationTestMultiBearerInteroperability0002::GetTestStepName()
       
   411 /**
       
   412  * @return The test step name.
       
   413  */
       
   414 	{
       
   415 	return _L("CCTSYIntegrationTestMultiBearerInteroperability0002");
       
   416 	}
       
   417 
       
   418 
       
   419 
       
   420 CCTSYIntegrationTestMultiBearerInteroperability0003::CCTSYIntegrationTestMultiBearerInteroperability0003(CEtelSessionMgr& aEtelSessionMgr)
       
   421 	: CCTSYIntegrationTestMultiBearerInteroperabilityBase(aEtelSessionMgr)
       
   422 /**
       
   423  * Constructor.
       
   424  */
       
   425 	{
       
   426 	SetTestStepName(CCTSYIntegrationTestMultiBearerInteroperability0003::GetTestStepName());
       
   427 	}
       
   428 
       
   429 CCTSYIntegrationTestMultiBearerInteroperability0003::~CCTSYIntegrationTestMultiBearerInteroperability0003()
       
   430 /**
       
   431  * Destructor.
       
   432  */
       
   433 	{
       
   434 	}
       
   435 
       
   436 TVerdict CCTSYIntegrationTestMultiBearerInteroperability0003::doTestStepL()
       
   437 /**
       
   438  * @SYMTestCaseID BA-CTSY-INT-MBI-0003
       
   439  * @SYMFssID BA/CTSY/MBI-0003
       
   440  * @SYMTestCaseDesc 3G-2G handover with PDP context active
       
   441  * @SYMTestPriority High
       
   442  * @SYMTestActions RPacketContext::NotifyDataTransferred, RPacketContext::GetDataVolumeTransferred, RMobilePhone::GetNetworkRegistrationStatus, RMobilePhone::NotifyNetworkRegistrationStatusChange
       
   443  * @SYMTestExpectedResults Pass - File continues downloading after each cell reselection, service is never lost.
       
   444  * @SYMTestType CIT
       
   445  * @SYMTestCaseDependencies simulated/manual
       
   446  *
       
   447  * Reason for test: 
       
   448  *
       
   449  * @return - TVerdict code
       
   450  */
       
   451 	{
       
   452 
       
   453 	//
       
   454 	// SET UP
       
   455 	//
       
   456 	
       
   457 	
       
   458 	ERR_PRINTF2(_L("<font color=Orange>$CTSYProblem: defect id = %d</font>"), 10071);
       
   459 	User::Leave(KErrNone);	
       
   460 	
       
   461 
       
   462 	// Ensure phone is camped on a valid cell. 
       
   463 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   464     CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
   465 
       
   466 	// Ensure phone has KCapsNotifyRegistrationStatus and KCapsNotifyCurrentNetwork capabilities. 
       
   467 	TUint32 caps;
       
   468 	CHECK_EQUALS_L(phone.GetNetworkCaps(caps), KErrNone, _L("RMobilePhone::GetNetworkCaps returned an error"));
       
   469 	TUint32 wantedCaps = RMobilePhone::KCapsNotifyRegistrationStatus | RMobilePhone::KCapsNotifyCurrentNetwork;
       
   470 	CHECK_BITS_SET_L(caps, wantedCaps, KNoUnwantedBits, _L("RMobilePhone::GetNetworkCaps returned wrong caps"));
       
   471 
       
   472 	// Ensure phone is attached to packet service. 
       
   473 	RPacketService& packetService = iEtelSessionMgr.GetPacketServiceL(KMainServer, KMainPhone, KMainPacketService);
       
   474     SetAttachModeToWhenPossibleAndWaitForAttachL(packetService);
       
   475 
       
   476 	// Get Voice line 1. 
       
   477 	RMobileLine& voiceLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine);
       
   478 
       
   479 
       
   480 	//
       
   481 	// SET UP END
       
   482 	//
       
   483 	
       
   484 	StartTest();
       
   485 	
       
   486 	//
       
   487 	// TEST START
       
   488 	//
       
   489 
       
   490 
       
   491 	// Start downloading a file via HTTP. 
       
   492 	TBuf<140> host(_L("developer.symbian.com"));
       
   493     TBuf<140> page(_L("/main/downloads/papers/IMS_Introduction_Part_1.pdf"));
       
   494     CHTTPDownload* download = new (ELeave) CHTTPDownload(this);
       
   495     CleanupStack::PushL(download);
       
   496     ASSERT_TRUE(download->StartDownloadL(host,page), _L("Download Failed"));
       
   497     
       
   498  	// Get context info	
       
   499 	TExtEtelRequestStatus getContextInfo(packetService, EPacketGetContextInfo);
       
   500 	CleanupStack::PushL(getContextInfo);
       
   501 	RPacketService::TContextInfo contextInfo;
       
   502 	TInt index = 0;
       
   503 	packetService.GetContextInfo(getContextInfo, index, contextInfo);
       
   504 	ASSERT_EQUALS(WaitForRequestWithTimeOut(getContextInfo, ETimeLong), KErrNone, _L("RPacketService::GetContextInfo timed out"));
       
   505 	ASSERT_EQUALS(getContextInfo.Int(), KErrNone, _L("RPacketService::GetContextInfo returned an error"));
       
   506 	ASSERT_TRUE(contextInfo.iName.Length() > 0, _L("RPacketService::GetContextInfo returned with zero length context name"));
       
   507 
       
   508 	// Open a handle on an existing context with OpenExistingContext
       
   509 	RPacketContext primaryPacketContext;										
       
   510     ASSERT_EQUALS(primaryPacketContext.OpenExistingContext(packetService, contextInfo.iName), KErrNone, _L("RPacketContext::OpenExistingContext returned with an error."));
       
   511 
       
   512 	// Post notification for network change
       
   513 	RMobilePhone::TMobilePhoneNetworkInfoV1 netInfo;
       
   514 	RMobilePhone::TMobilePhoneLocationAreaV1 locationArea;
       
   515 	TPckg<RMobilePhone::TMobilePhoneNetworkInfoV1> netInfoPckg(netInfo);
       
   516 	TExtEtelRequestStatus notifyCurrentNetworkChangeStatus(phone, EMobilePhoneNotifyCurrentNetworkChange);
       
   517 	CleanupStack::PushL(notifyCurrentNetworkChangeStatus);
       
   518 	phone.NotifyCurrentNetworkChange(notifyCurrentNetworkChangeStatus, netInfoPckg, locationArea);	
       
   519 
       
   520 	// Request status for RLine::NotifyIncomingCall
       
   521 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (voiceLine, &RLine::NotifyIncomingCallCancel);
       
   522 	CleanupStack::PushL(notifyIncomingCallStatus);
       
   523 	TName incomingCallName;
       
   524 
       
   525 	// Get tranferred data for later comparison
       
   526     RPacketContext::TDataVolume dataVolume;	
       
   527 	primaryPacketContext.GetDataVolumeTransferred(dataVolume);	
       
   528 	TUint32 lastBytesSent = dataVolume.iBytesSent;
       
   529 	TUint32 lastBytesReceived = dataVolume.iBytesReceived;
       
   530 
       
   531 	// Move from one cell to another. At each cell: 
       
   532 	const TInt KCellChange = 7;
       
   533 	for(TInt index = 0; index < KCellChange; index++)
       
   534 		{
       
   535 		switch(index)
       
   536 			{
       
   537 			case 0:		// Release 99 3G cell To/From an EGSM 900 cell 
       
   538 				{
       
   539 				DisplayUserInteractionPromptL(_L("Release 99 3G cell To/From an EGSM 900 cell"));
       
   540 				break;
       
   541 				}
       
   542 			case 1: 	// Release 99 3G cell To/From an GSM 900 cell 
       
   543 				{
       
   544 				DisplayUserInteractionPromptL(_L("Release 99 3G cell To/From an GSM 900 cell"));
       
   545 				break;
       
   546 				}
       
   547 			case 2: 	// Release 99 3G cell To/From an GSM 1800 cell 
       
   548 				{
       
   549 				DisplayUserInteractionPromptL(_L("Release 99 3G cell To/From an GSM 1800 cell"));
       
   550 				break;
       
   551 				}
       
   552 			case 3:		// HSDPA enabled Release 5 3G cell To/From an EGSM 900 cell 
       
   553 				{
       
   554 				DisplayUserInteractionPromptL(_L("HSDPA enabled Release 5 3G cell To/From an EGSM 900 cell"));
       
   555 				break;
       
   556 				}
       
   557 			case 4:		// HSDPA enabled Release 5 3G cell To/From an GSM 900 cell 
       
   558 				{
       
   559 				DisplayUserInteractionPromptL(_L("HSDPA enabled Release 5 3G cell To/From an GSM 900 cell"));
       
   560 				break;
       
   561 				}
       
   562 			case 5:		// HSDPA enabled Release 5 3G cell To/From an GSM 1800 cell 
       
   563 				{
       
   564 				DisplayUserInteractionPromptL(_L("HSDPA enabled Release 5 3G cell To/From an GSM 1800 cell"));
       
   565 				break;
       
   566 				}
       
   567 			case 6:		// Cell with poor signal strength 
       
   568 				{
       
   569 				DisplayUserInteractionPromptL(_L("Move to a cell with poor signal strength"));
       
   570 				break;
       
   571 				}
       
   572 			}
       
   573 
       
   574 		// Verify cell reselection completes. 
       
   575 		ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyCurrentNetworkChangeStatus, ETimeMedium), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange timed out"));
       
   576 		ASSERT_EQUALS(notifyCurrentNetworkChangeStatus.Int(), KErrNone, _L("RMobilePhone::NotifyCurrentNetworkChange returned error"));
       
   577 
       
   578 		// Verify service is not lost and phone remains registered. 
       
   579 		ASSERT_EQUALS(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
   580 
       
   581 		// Verify volume data transferred advances realistically. 
       
   582 		primaryPacketContext.GetDataVolumeTransferred(dataVolume);	
       
   583 		ASSERT_TRUE(dataVolume.iBytesSent > lastBytesSent, _L("RPacketContext::GetDataVolumeTransferred Data bytes send is not higher than at the previous round."));
       
   584 		lastBytesSent = dataVolume.iBytesSent;
       
   585 		ASSERT_TRUE(dataVolume.iBytesReceived > lastBytesReceived, _L("RPacketContext::GetDataVolumeTransferred Data bytes received is not higher than at the previous round."));
       
   586 		lastBytesReceived = dataVolume.iBytesReceived;
       
   587 
       
   588 		// Repost notification for network change
       
   589 		phone.NotifyCurrentNetworkChange(notifyCurrentNetworkChangeStatus, netInfoPckg, locationArea);	
       
   590 
       
   591 		// Receive an incoming call and verify it can be answered
       
   592 
       
   593 		// post notify RLine::NotifyIncomingCall
       
   594 		voiceLine.NotifyIncomingCall(notifyIncomingCallStatus, incomingCallName);
       
   595 
       
   596 		// Request incoming call from RPS. 
       
   597 		ASSERT_EQUALS(RPSRequestIncomingCallL(EVoiceLine), KErrNone, _L("CCTSYIntegrationTestSuiteStepBase::RPSRequestIncomingCallL returned an error"));
       
   598 
       
   599 		// Check RLine::NotifyIncomingCall completes.
       
   600 		ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus, ETimeMedium), KErrNone, _L("RLine::NotifyIncomingCall did not complete without error"));
       
   601 		ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned an error"));
       
   602 		ASSERT_TRUE(incomingCallName.Length() > 0, _L("RLine::NotifyIncomingCall did not set a line name"));
       
   603 
       
   604 		// Get the incoming call
       
   605 		TCallId incomingCallId;
       
   606 		RMobileCall& call1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, incomingCallName, incomingCallId);
       
   607 
       
   608 		// Call RCall::AnswerIncomingCall
       
   609 		TCoreEtelRequestStatus<RCall> answerIncomingStatus(call1, &RCall::AnswerIncomingCallCancel);
       
   610 		CleanupStack::PushL(answerIncomingStatus);	
       
   611 		call1.AnswerIncomingCall(answerIncomingStatus);
       
   612 		ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
   613 		ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
   614 
       
   615 		// Hang up
       
   616 		call1.HangUp();
       
   617 		
       
   618 		// Release call
       
   619 		iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KVoiceLine, incomingCallId);
       
   620 		
       
   621 		// Pop
       
   622 		// answerIncomingStatus
       
   623 		CleanupStack::PopAndDestroy(&answerIncomingStatus);
       
   624 		}
       
   625 
       
   626 
       
   627 	//
       
   628 	// TEST END
       
   629 	//
       
   630 
       
   631     StartCleanup();
       
   632 	
       
   633 	// Pop
       
   634 	// download
       
   635 	// getContextInfo
       
   636 	// notifyCurrentNetworkChangeStatus
       
   637 	// notifyIncomingCallStatus
       
   638 	CleanupStack::PopAndDestroy(4, &download);
       
   639 
       
   640 	return TestStepResult();
       
   641 	}
       
   642 
       
   643 TPtrC CCTSYIntegrationTestMultiBearerInteroperability0003::GetTestStepName()
       
   644 /**
       
   645  * @return The test step name.
       
   646  */
       
   647 	{
       
   648 	return _L("CCTSYIntegrationTestMultiBearerInteroperability0003");
       
   649 	}
       
   650 
       
   651 
       
   652 
       
   653 CCTSYIntegrationTestMultiBearerInteroperability0004::CCTSYIntegrationTestMultiBearerInteroperability0004(CEtelSessionMgr& aEtelSessionMgr)
       
   654 	: CCTSYIntegrationTestMultiBearerInteroperabilityBase(aEtelSessionMgr)
       
   655 /**
       
   656  * Constructor.
       
   657  */
       
   658 	{
       
   659 	SetTestStepName(CCTSYIntegrationTestMultiBearerInteroperability0004::GetTestStepName());
       
   660 	}
       
   661 
       
   662 CCTSYIntegrationTestMultiBearerInteroperability0004::~CCTSYIntegrationTestMultiBearerInteroperability0004()
       
   663 /**
       
   664  * Destructor.
       
   665  */
       
   666 	{
       
   667 	}
       
   668 
       
   669 TVerdict CCTSYIntegrationTestMultiBearerInteroperability0004::doTestStepL()
       
   670 /**
       
   671  * @SYMTestCaseID BA-CTSY-INT-MBI-0004
       
   672  * @SYMFssID BA/CTSY/MBI-0004
       
   673  * @SYMTestCaseDesc Voice call & CS-data call
       
   674  * @SYMTestPriority High
       
   675  * @SYMTestActions RMobilePhone::SetMulticallParams, RMobilePhone::NotifyMulticallParamsChange, RCall::Dial, RMobilePhone::NotifyMulticallIndicatorChange, RCall::HangUp, RMobileCall::Hold, RMobileCall::Resume
       
   676  * @SYMTestExpectedResults Pass - One CS call can be hung up without disturbing other call.
       
   677  * @SYMTestType CIT
       
   678  * @SYMTestCaseDependencies live/automatic
       
   679  *
       
   680  * Reason for test: 
       
   681  *
       
   682  * @return - TVerdict code
       
   683  */
       
   684 	{
       
   685 
       
   686 	//
       
   687 	// SET UP
       
   688 	//
       
   689 
       
   690 	
       
   691 	// Ensure phone is camped on a valid cell. 
       
   692 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
   693     CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
   694 
       
   695 	// Get Voice line 1. 
       
   696 	RMobileLine& voiceLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine);
       
   697 
       
   698 	// Get call 1. 
       
   699 	RMobileCall& voiceCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1);
       
   700 
       
   701 	// Get data line 1. 
       
   702 	RMobileLine& dataLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
   703 	
       
   704 	// Get data call 1. 
       
   705 	RMobileCall& dataCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);	
       
   706 
       
   707 
       
   708 	//
       
   709 	// SET UP END
       
   710 	//
       
   711 	
       
   712 	StartTest();
       
   713 	
       
   714 	//
       
   715 	// TEST START
       
   716 	//
       
   717 
       
   718 
       
   719 	// Get the multicall parameters. 
       
   720 	RMobilePhone::TMobilePhoneMulticallSettingsV1 multiCallSettings;
       
   721 	TPckg<RMobilePhone::TMobilePhoneMulticallSettingsV1> multiCallSettingsPkg(multiCallSettings);
       
   722 	TExtEtelRequestStatus getMulticallParams(phone, EMobilePhoneGetMulticallParams);
       
   723 	CleanupStack::PushL(getMulticallParams);
       
   724 	phone.GetMulticallParams(getMulticallParams, multiCallSettingsPkg);
       
   725  	ERR_PRINTF1(_L("<font color=Orange>$CTSYProblem: RMobilePhone::GetMulticallParams always returns KErrNotSupported because there is no implementation for it. Check changed from KErrNone to KErrNotSupported.</font>"));
       
   726  	// $CTSYProblem:RMobilePhone::GetMulticallParams always returns KErrNotSupported
       
   727  	// because there is no implementation for it. Checking changed from KErrNone to KErrNotSupported
       
   728 	ASSERT_EQUALS(WaitForRequestWithTimeOut(getMulticallParams, ETimeLong), KErrNone, _L("RMobilePhone::GetMulticallParams timed out"));
       
   729 	ASSERT_EQUALS(getMulticallParams.Int(), KErrNotSupported, _L("RMobilePhone::GetMulticallParams returned an error"));
       
   730 
       
   731 	// Post notification for RMobilePhone::NotifyMulticallParamsChange
       
   732 	RMobilePhone::TMobilePhoneMulticallSettingsV1 notifiedMultiCallSettings;
       
   733 	TPckg<RMobilePhone::TMobilePhoneMulticallSettingsV1> notifiedMultiCallSettingsPkg(notifiedMultiCallSettings);
       
   734 	TExtEtelRequestStatus notifyMulticallParamsChangeStatus(phone, EMobilePhoneNotifyMulticallParamsChange);
       
   735 	CleanupStack::PushL(notifyMulticallParamsChangeStatus);
       
   736 	phone.NotifyMulticallParamsChange(notifyMulticallParamsChangeStatus, notifiedMultiCallSettingsPkg);
       
   737 
       
   738 	// Set the multicall parameters to something valid. 
       
   739 	TInt userMaxBearers = 3;
       
   740 	TExtEtelRequestStatus setMulticallParams(phone, EMobilePhoneSetMulticallParams);
       
   741 	CleanupStack::PushL(setMulticallParams);
       
   742 	phone.SetMulticallParams(setMulticallParams, userMaxBearers);
       
   743  	ERR_PRINTF1(_L("<font color=Orange>$CTSYProblem: RMobilePhone::SetMulticallParams always returns KErrNotSupported because there is no implementation for it. Check changed from KErrNone to KErrNotSupported.</font>"));
       
   744  	// $CTSYProblem:RMobilePhone::SetMulticallParams always returns KErrNotSupported
       
   745  	// because there is no implementation for it. Checking changed from KErrNone to KErrNotSupported
       
   746 	ASSERT_EQUALS(WaitForRequestWithTimeOut(setMulticallParams, ETimeLong), KErrNone, _L("RMobilePhone::SetMulticallParams timed out"));
       
   747 	ASSERT_EQUALS(setMulticallParams.Int(), KErrNotSupported, _L("RMobilePhone::SetMulticallParams returned an error"));
       
   748 
       
   749 	// Verify notification completes. 
       
   750 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyMulticallParamsChangeStatus, ETimeLong), KErrNone, _L("RMobilePhone::NotifyMulticallParamsChange timed out."));
       
   751  	ERR_PRINTF1(_L("<font color=Orange>$CTSYProblem: RMobilePhone::NotifyMulticallParamsChange always returns KErrNotSupported because there is no implementation for it. Check changed from KErrNone to KErrNotSupported.</font>"));
       
   752  	// $CTSYProblem:RMobilePhone::NotifyMulticallParamsChange always returns KErrNotSupported
       
   753  	// because there is no implementation for it. Checking changed from KErrNone to KErrNotSupported
       
   754 	ASSERT_EQUALS(notifyMulticallParamsChangeStatus.Int(), KErrNotSupported, _L("RMobilePhone::NotifyMulticallParamsChange returned with error status."));
       
   755 
       
   756 	// 1. Dial voice call (call 1). 
       
   757 	TPtrC voiceNumber;
       
   758 	ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, voiceNumber) != EFalse, _L("GetStringFromConfig did not complete as expected"));
       
   759 	TCoreEtelRequestStatus<RCall> dialStatus(voiceCall1, &RCall::DialCancel);
       
   760 	CleanupStack::PushL(dialStatus);
       
   761 	DisplayUserInteractionPromptL(_L("Board now dials to VoiceNumber1 (press any key to start dialling) "), ETimeLong);
       
   762 	voiceCall1.Dial(dialStatus, voiceNumber);
       
   763 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeLong), KErrNone, _L("RCall::Dial timed-out"));
       
   764 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   765 
       
   766 	// Hold call 1. 
       
   767 	TExtEtelRequestStatus holdStatus(voiceCall1, EMobileCallHold);
       
   768 	CleanupStack::PushL(holdStatus);
       
   769 	voiceCall1.Hold(holdStatus);
       
   770 	ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium),KErrNone, _L("RMobileCall::Hold timed out"));
       
   771 	ASSERT_EQUALS(holdStatus.Int(), KErrNone, _L("RMobileCall::Hold returned with an error"));
       
   772 
       
   773 	// Dial data call (call 2). 
       
   774 	RMobileCall::TMobileHscsdCallParamsV1 dataparams;
       
   775 	RMobileCall::TMobileHscsdCallParamsV1Pckg dataparamsPckg(dataparams);
       
   776 	dataparams.iIdRestrict = RMobileCall::ESendMyId; 
       
   777 	dataparams.iAckTimer = 0;
       
   778 	dataparams.iMSToModemWindowSize = 0;
       
   779 	dataparams.iModemToMSWindowSize = 0;	
       
   780 	dataparams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
       
   781 	dataparams.iQoS = RMobileCall::EQoSTransparent;
       
   782 	dataparams.iRLPVersion = RMobileCall::ERLPNotRequested;
       
   783 	dataparams.iResequencingPeriod = 0;
       
   784 	dataparams.iRetransmissionAttempts = 0;
       
   785 	dataparams.iService = RMobileCall::EServiceDataCircuitSync;
       
   786 	dataparams.iSpeed = RMobileCall::ESpeed64000;
       
   787 	dataparams.iUseEdge = EFalse;
       
   788 	dataparams.iV42bisCodewordsNum = 0;
       
   789 	dataparams.iV42bisMaxStringLength = 0;
       
   790 	dataparams.iV42bisReq = RMobileCall::EV42bisNeitherDirection;
       
   791 	dataparams.iAsymmetry = RMobileCall::EAsymmetryNoPreference; 
       
   792 	dataparams.iCodings = 0; 
       
   793 	dataparams.iUserInitUpgrade = EFalse; 
       
   794 
       
   795 	TPtrC dataNumber;
       
   796 	ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, dataNumber) != EFalse, _L("GetStringFromConfig did not complete as expected"));
       
   797 	DisplayUserInteractionPromptL(_L("Board now dials to DataNumber1 (press any key to start dialling) "), ETimeLong);
       
   798 	dataCall1.Dial(dialStatus, dataparamsPckg, dataNumber);
       
   799 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out"));
       
   800 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   801 
       
   802 	// Start downloading a file e.g. via HTTP. 
       
   803 	TBuf<140> host(_L("developer.symbian.com"));
       
   804     TBuf<140> page(_L("/main/downloads/papers/IMS_Introduction_Part_1.pdf"));
       
   805     CHTTPDownload *download = new (ELeave) CHTTPDownload(this);
       
   806     CleanupStack::PushL(download);
       
   807     ASSERT_TRUE(download->StartDownloadL(host,page),_L("CHTTPDownload::StartDownloadL failed"));
       
   808     
       
   809 	// Verify file is downloading. 
       
   810 	ASSERT_TRUE(download->VerifyDownloading(), _L("CHTTPDownload::VerifyDownloading did not return ETrue as expected. File is not downloaded."));
       
   811 
       
   812 	// Hang up call 1. 
       
   813 	TCoreEtelRequestStatus<RCall> hangUpStatus (voiceCall1, &RCall::HangUpCancel);	
       
   814 	CleanupStack::PushL(hangUpStatus);
       
   815 	voiceCall1.HangUp(hangUpStatus);
       
   816 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   817 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
   818 
       
   819 	// Resume call 2. 
       
   820 	TExtEtelRequestStatus resumeStatus(dataCall1, EMobileCallResume);
       
   821 	CleanupStack::PushL(resumeStatus);
       
   822 	dataCall1.Resume(resumeStatus);
       
   823 	ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeStatus, ETimeMedium),KErrNone, _L("RMobileCall::Resume timed out"));
       
   824 	ASSERT_EQUALS(resumeStatus.Int(), KErrNone, _L("RMobileCall::Resume returned with an error"));
       
   825 
       
   826 	// Verify call 2 is still active.
       
   827 	RMobileCall::TMobileCallStatus getMobileCallStatus;
       
   828 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned with an error"));
       
   829 	ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileCallStatus returned wrong status"));
       
   830 
       
   831 	// Hang up call 2.
       
   832 	dataCall1.HangUp(hangUpStatus);
       
   833 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   834 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
   835 
       
   836 	// Release calls
       
   837 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KVoiceLine, KCall1);
       
   838 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KDataLine, KCall1);
       
   839 	
       
   840 
       
   841 	// Get call 1. 
       
   842 	voiceCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1);
       
   843 
       
   844 	// 2. Dial voice call (call 1). 
       
   845 	DisplayUserInteractionPromptL(_L("Board now dials to VoiceNumber1 (press any key to start dialling) "), ETimeLong);
       
   846 	voiceCall1.Dial(dialStatus, voiceNumber);
       
   847 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeLong), KErrNone, _L("RCall::Dial timed-out"));
       
   848 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   849 
       
   850 	// Hold call 1. 
       
   851 	voiceCall1.Hold(holdStatus);
       
   852 	ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium),KErrNone, _L("RMobileCall::Hold timed out"));
       
   853 	ASSERT_EQUALS(holdStatus.Int(), KErrNone, _L("RMobileCall::Hold returned with an error"));
       
   854 
       
   855 	// Post notification for incoming call
       
   856 	TName name;
       
   857 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (dataLine, &RLine::NotifyIncomingCallCancel);
       
   858 	CleanupStack::PushL(notifyIncomingCallStatus);
       
   859 	dataLine.NotifyIncomingCall(notifyIncomingCallStatus, name);
       
   860 
       
   861 	// Request an incoming HSCSD call with RPS. 
       
   862 	ASSERT_EQUALS(RPSRequestIncomingCallL(EDataLine), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
   863 
       
   864 	// Check RLine::NotifyIncomingCall completes with valid call name.
       
   865 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeMedium),KErrNone,_L("RLine::NotifyIncomingCall timed out"));
       
   866 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"));
       
   867 	ASSERT_TRUE(name.Length() > 0, _L("RLine::NotifyIncomingCall did not return a valid call name"));
       
   868 	
       
   869 	// Get the incoming call
       
   870 	TCallId incomingCallId;
       
   871 	dataCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
   872 	
       
   873 	// Answer incoming data call. 
       
   874 	TCoreEtelRequestStatus<RCall> answerIncomingStatus(dataCall1, &RCall::AnswerIncomingCallCancel);
       
   875 	CleanupStack::PushL(answerIncomingStatus);	
       
   876 	dataCall1.AnswerIncomingCall(answerIncomingStatus);
       
   877 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
   878 	ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
   879 
       
   880 	// Start downloading a file e.g. via FTP. 
       
   881     ASSERT_TRUE(download->StartDownloadL(host,page),_L("CHTTPDownload::StartDownloadL failed"));
       
   882 
       
   883 	// Verify file is downloading. 
       
   884 	ASSERT_TRUE(download->VerifyDownloading(), _L("CHTTPDownload::VerifyDownloading did not return ETrue as expected. File is not downloaded."));
       
   885 
       
   886 	// Hang up call 1. 
       
   887 	voiceCall1.HangUp(hangUpStatus);
       
   888 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   889 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
   890 
       
   891 	// Resume call 2. 
       
   892 	dataCall1.Resume(resumeStatus);
       
   893 	ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeStatus, ETimeMedium),KErrNone, _L("RMobileCall::Resume timed out"));
       
   894 	ASSERT_EQUALS(resumeStatus.Int(), KErrNone, _L("RMobileCall::Resume returned with an error"));
       
   895 
       
   896 	// Verify call 2 is still active. 
       
   897 	ASSERT_EQUALS(dataCall1.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned with an error."));
       
   898 	ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileCallStatus returned wrong status"));
       
   899 
       
   900 	// Hang up call 2. 
       
   901 	dataCall1.HangUp(hangUpStatus);
       
   902 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   903 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
   904 
       
   905 	// Release calls
       
   906 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KVoiceLine, KCall1);
       
   907 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KDataLine, incomingCallId);
       
   908 	
       
   909 	// 3. Get data call 1.
       
   910 	dataCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
   911 
       
   912 	// Dial data call (call 1). 
       
   913 	dataCall1.Dial(dialStatus, dataparamsPckg, dataNumber);
       
   914 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out"));
       
   915 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   916 
       
   917 	// Start downloading a file e.g. via FTP. 
       
   918     ASSERT_TRUE(download->StartDownloadL(host,page),_L("CHTTPDownload::StartDownloadL failed"));
       
   919 
       
   920 	// Verify file is downloading. 
       
   921 	ASSERT_TRUE(download->VerifyDownloading(), _L("CHTTPDownload::VerifyDownloading did not return ETrue as expected. File is not downloaded."));
       
   922 
       
   923 	// Hold call 1. 
       
   924 	TExtEtelRequestStatus holdDataCallStatus(dataCall1, EMobileCallHold);
       
   925 	CleanupStack::PushL(holdDataCallStatus);
       
   926 	dataCall1.Hold(holdDataCallStatus);
       
   927 	ASSERT_EQUALS(WaitForRequestWithTimeOut(holdDataCallStatus, ETimeMedium),KErrNone, _L("RMobileCall::Hold timed out"));
       
   928 	ASSERT_EQUALS(holdDataCallStatus.Int(), KErrNone, _L("RMobileCall::Hold returned with an error"));
       
   929 
       
   930 	// Get voice call.
       
   931 	voiceCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1);
       
   932 
       
   933 	// Dial voice call (call 2). 
       
   934 	DisplayUserInteractionPromptL(_L("Board now dials to VoiceNumber1 (press any key to start dialling) "), ETimeLong);
       
   935 	voiceCall1.Dial(dialStatus, voiceNumber);
       
   936 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeLong), KErrNone, _L("RCall::Dial timed-out"));
       
   937 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   938 
       
   939 	// Hang up call 1. 
       
   940 	dataCall1.HangUp(hangUpStatus);
       
   941 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   942 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
   943 
       
   944 	// Resume call 2. 
       
   945 	voiceCall1.Resume(resumeStatus);
       
   946 	ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeStatus, ETimeMedium),KErrNone, _L("RMobileCall::Resume timed out"));
       
   947 	ASSERT_EQUALS(resumeStatus.Int(), KErrNone, _L("RMobileCall::Resume returned with an error"));
       
   948 
       
   949 	// Verify call 2 still active. 
       
   950 	ASSERT_EQUALS(voiceCall1.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned with an error."));
       
   951 	ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileCallStatus returned wrong status"));
       
   952 
       
   953 	// Hang up call 2. 
       
   954 	voiceCall1.HangUp(hangUpStatus);
       
   955 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
   956 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
   957 
       
   958 	// Release calls
       
   959 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KVoiceLine, KCall1);
       
   960 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KDataLine, KCall1);
       
   961 
       
   962 	// Get data call 1.
       
   963 	dataCall1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall1);
       
   964 
       
   965 	// 4. Dial data call (call 1). 
       
   966 	dataCall1.Dial(dialStatus, dataparamsPckg, dataNumber);
       
   967 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out"));
       
   968 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
   969 
       
   970 	// Start downloading a file e.g. via FTP. 
       
   971     ASSERT_TRUE(download->StartDownloadL(host,page),_L("CHTTPDownload::StartDownloadL failed"));
       
   972 
       
   973 	// Verify file is downloading. 
       
   974 	ASSERT_TRUE(download->VerifyDownloading(), _L("CHTTPDownload::VerifyDownloading did not return ETrue as expected. File is not downloaded."));
       
   975 
       
   976 	// Hold call 1. 
       
   977 	dataCall1.Hold(holdDataCallStatus);
       
   978 	ASSERT_EQUALS(WaitForRequestWithTimeOut(holdDataCallStatus, ETimeMedium),KErrNone, _L("RMobileCall::Hold timed out"));
       
   979 	ASSERT_EQUALS(holdDataCallStatus.Int(), KErrNone, _L("RMobileCall::Hold returned with an error"));
       
   980 
       
   981 	// Post notify RLine::NotifyIncomingCall
       
   982 	TCoreEtelRequestStatus<RLine> notifyIncomingVoiceCallStatus (voiceLine, &RLine::NotifyIncomingCallCancel);
       
   983 	CleanupStack::PushL(notifyIncomingVoiceCallStatus);
       
   984 	TName incomingCallName;
       
   985 	voiceLine.NotifyIncomingCall(notifyIncomingVoiceCallStatus, incomingCallName);
       
   986 
       
   987 	// Request incoming call from RPS. 
       
   988 	ASSERT_EQUALS (RPSRequestIncomingCallL(EVoiceLine), KErrNone, _L("CCTSYIntegrationTestSuiteStepBase::RPSRequestIncomingCallL returned an error"));
       
   989 
       
   990 	// Check RLine::NotifyIncomingCall completes.
       
   991 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingVoiceCallStatus, ETimeMedium), KErrNone, _L("RLine::NotifyIncomingCall did not complete without error"));
       
   992 	ASSERT_EQUALS(notifyIncomingVoiceCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned an error"));
       
   993 	ASSERT_TRUE(incomingCallName.Length() > 0, _L("RLine::NotifyIncomingCall did not set a line name"));
       
   994 
       
   995     // Get the incoming call
       
   996 	TCallId incomingVoiceCallId;
       
   997 	voiceCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, incomingCallName, incomingVoiceCallId);
       
   998 
       
   999 	// Answer incoming voice call (call 2). 
       
  1000 	TCoreEtelRequestStatus<RCall> answerIncomingVoiceCallStatus(voiceCall1, &RCall::AnswerIncomingCallCancel);
       
  1001 	CleanupStack::PushL(answerIncomingVoiceCallStatus);	
       
  1002 	voiceCall1.AnswerIncomingCall(answerIncomingVoiceCallStatus);
       
  1003 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingVoiceCallStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
  1004 	ASSERT_EQUALS(answerIncomingVoiceCallStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
  1005 
       
  1006 	// Hang up call 1. 
       
  1007 	dataCall1.HangUp(hangUpStatus);
       
  1008 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
  1009 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
  1010 
       
  1011 	// Resume call 2. 
       
  1012 	voiceCall1.Resume(resumeStatus);
       
  1013 	ASSERT_EQUALS(WaitForRequestWithTimeOut(resumeStatus, ETimeMedium),KErrNone, _L("RMobileCall::Resume timed out"));
       
  1014 	ASSERT_EQUALS(resumeStatus.Int(), KErrNone, _L("RMobileCall::Resume returned with an error"));
       
  1015 	
       
  1016 	// Verify call 2 still active. 
       
  1017 	ASSERT_EQUALS(voiceCall1.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned with an error."));
       
  1018 	ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileCallStatus returned wrong status"));
       
  1019 
       
  1020 	// Hang up call 2.
       
  1021 	voiceCall1.HangUp(hangUpStatus);
       
  1022 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, _L("RCall::HangUp timed-out"));
       
  1023 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
  1024 
       
  1025 	// Release calls
       
  1026 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KVoiceLine, incomingVoiceCallId);
       
  1027 	iEtelSessionMgr.ReleaseCall(KMainServer, KMainPhone, KDataLine, KCall1);
       
  1028 
       
  1029 
       
  1030 	//
       
  1031 	// TEST END
       
  1032 	//
       
  1033 
       
  1034     StartCleanup();
       
  1035 	
       
  1036 	// Pop
       
  1037 	// getMulticallParams
       
  1038 	// notifyMulticallParamsChangeStatus
       
  1039 	// setMulticallParams
       
  1040 	// dialStatus
       
  1041 	// holdStatus
       
  1042 	// download
       
  1043 	// hangUpStatus
       
  1044 	// resumeStatus
       
  1045 	// notifyIncomingCallStatus
       
  1046 	// answerIncomingStatus
       
  1047 	// holdDataCallStatus
       
  1048 	// notifyIncomingVoiceCallStatus
       
  1049 	// answerIncomingVoiceCallStatus
       
  1050 	CleanupStack::PopAndDestroy(13, &getMulticallParams);
       
  1051 	
       
  1052 	return TestStepResult();
       
  1053 	}
       
  1054 
       
  1055 TPtrC CCTSYIntegrationTestMultiBearerInteroperability0004::GetTestStepName()
       
  1056 /**
       
  1057  * @return The test step name.
       
  1058  */
       
  1059 	{
       
  1060 	return _L("CCTSYIntegrationTestMultiBearerInteroperability0004");
       
  1061 	}
       
  1062 
       
  1063 
       
  1064 
       
  1065 CCTSYIntegrationTestMultiBearerInteroperability0005::CCTSYIntegrationTestMultiBearerInteroperability0005(CEtelSessionMgr& aEtelSessionMgr)
       
  1066 	: CCTSYIntegrationTestMultiBearerInteroperabilityBase(aEtelSessionMgr)
       
  1067 /**
       
  1068  * Constructor.
       
  1069  */
       
  1070 	{
       
  1071 	SetTestStepName(CCTSYIntegrationTestMultiBearerInteroperability0005::GetTestStepName());
       
  1072 	}
       
  1073 
       
  1074 CCTSYIntegrationTestMultiBearerInteroperability0005::~CCTSYIntegrationTestMultiBearerInteroperability0005()
       
  1075 /**
       
  1076  * Destructor.
       
  1077  */
       
  1078 	{
       
  1079 	}
       
  1080 
       
  1081 TVerdict CCTSYIntegrationTestMultiBearerInteroperability0005::doTestStepL()
       
  1082 /**
       
  1083  * @SYMTestCaseID BA-CTSY-INT-MBI-0005
       
  1084  * @SYMFssID BA/CTSY/MBI-0005
       
  1085  * @SYMTestCaseDesc CS data call & PS-data call
       
  1086  * @SYMTestPriority High
       
  1087  * @SYMTestActions RCall::Dial, RPacketContext::GetDataVolumeTransferred, RPacketContext::NotifyStatusChange, RPacketContext::NotifyDataTransferred, RCall::HangUp, RCall::GetStatus
       
  1088  * @SYMTestExpectedResults Pass - Simulatneous CS and PS data call can be made.
       
  1089  * @SYMTestType CIT
       
  1090  * @SYMTestCaseDependencies live/automatic
       
  1091  *
       
  1092  * Reason for test: 
       
  1093  *
       
  1094  * @return - TVerdict code
       
  1095  */
       
  1096 	{
       
  1097 
       
  1098 	//
       
  1099 	// SET UP
       
  1100 	//
       
  1101 	
       
  1102 /*
       
  1103 
       
  1104 	
       
  1105 	// Ensure phone is camped on a valid cell. 
       
  1106 	RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);
       
  1107     CHECK_EQUALS_L(iNetworkTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error"));
       
  1108 
       
  1109 	// Ensure phone is attached to packet service. 
       
  1110 	RPacketService& packetService = iEtelSessionMgr.GetPacketServiceL(KMainServer, KMainPhone, KMainPacketService);
       
  1111     SetAttachModeToWhenPossibleAndWaitForAttachL(packetService);
       
  1112 
       
  1113 	// Get data line 1. 
       
  1114 	RMobileLine& line1= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine);
       
  1115 	
       
  1116 	// Get call 1.
       
  1117 	RMobileCall& dataCall1= iEtelSessionMgr.GetCallL(KMainServer,KMainPhone, KDataLine, KCall1);
       
  1118 
       
  1119 
       
  1120 	//
       
  1121 	// SET UP END
       
  1122 	//
       
  1123 	
       
  1124 	StartTest();
       
  1125 	
       
  1126 	//
       
  1127 	// TEST START
       
  1128 	//
       
  1129 	
       
  1130 	// Get the multicall parameters.
       
  1131 	RMobilePhone::TMobilePhoneMulticallSettingsV1 multiCallSettings;
       
  1132 	TPckg<RMobilePhone::TMobilePhoneMulticallSettingsV1> multiCallSettingsPkg(multiCallSettings);
       
  1133 	TExtEtelRequestStatus getMulticallParams(phone, EMobilePhoneGetMulticallParams);
       
  1134 	CleanupStack::PushL(getMulticallParams);
       
  1135 	phone.GetMulticallParams(getMulticallParams, multiCallSettingsPkg);
       
  1136  	// @CTSYProblem:RMobilePhone::GetMulticallParams always returns KErrNotSupported
       
  1137  	// because there is no implementation for it. Check changed from KErrNone to KErrNotSupported
       
  1138 	ASSERT_EQUALS(WaitForRequestWithTimeOut(getMulticallParams, ETimeLong), KErrNone, _L("RMobilePhone::GetMulticallParams timed out"));
       
  1139 	ASSERT_EQUALS(getMulticallParams.Int(), KErrNotSupported, _L("RMobilePhone::GetMulticallParams returned an error")); 
       
  1140 	
       
  1141 	// Post notification for RMobilePhone::NotifyMulticallParamsChange
       
  1142 	RMobilePhone::TMobilePhoneMulticallSettingsV1 notifiedMultiCallSettings;
       
  1143 	TPckg<RMobilePhone::TMobilePhoneMulticallSettingsV1> notifiedMultiCallSettingsPkg(notifiedMultiCallSettings);
       
  1144 	TExtEtelRequestStatus notifyMulticallParamsChangeStatus(phone, EMobilePhoneNotifyMulticallParamsChange);
       
  1145 	CleanupStack::PushL(notifyMulticallParamsChangeStatus);
       
  1146 	phone.NotifyMulticallParamsChange(notifyMulticallParamsChangeStatus, notifiedMultiCallSettingsPkg);
       
  1147 
       
  1148 	// Set the multicall parameters to something valid. 
       
  1149 	TInt userMaxBearers = 3;
       
  1150 	TExtEtelRequestStatus setMulticallParams(phone, EMobilePhoneSetMulticallParams);
       
  1151 	CleanupStack::PushL(setMulticallParams);
       
  1152 	phone.SetMulticallParams(getMulticallParams, userMaxBearers);
       
  1153  	// @CTSYProblem:RMobilePhone::SetMulticallParams always returns KErrNotSupported
       
  1154  	// because there is no implementation for it. Check changed from KErrNone to KErrNotSupported
       
  1155 	ASSERT_EQUALS(WaitForRequestWithTimeOut(setMulticallParams, ETimeLong), KErrNone, _L("RMobilePhone::SetMulticallParams timed out"));
       
  1156 	ASSERT_EQUALS(setMulticallParams.Int(), KErrNotSupported, _L("RMobilePhone::SetMulticallParams returned an error"));
       
  1157 
       
  1158 	// Verify notification completes. 
       
  1159 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyMulticallParamsChangeStatus, ETimeLong), KErrNone, _L("RMobilePhone::NotifyMulticallParamsChange timed out."));
       
  1160  	// @CTSYProblem:RMobilePhone::NotifyMulticallParamsChange always returns KErrNotSupported
       
  1161  	// because there is no implementation for it. Check changed from KErrNone to KErrNotSupported
       
  1162 	ASSERT_EQUALS(notifyMulticallParamsChangeStatus.Int(), KErrNotSupported, _L("RMobilePhone::NotifyMulticallParamsChange returned with error status."));
       
  1163 
       
  1164 	// 1. Dial a CS data call (call 1).
       
  1165 	RMobileCall::TMobileHscsdCallParamsV1 dataparams;
       
  1166 	RMobileCall::TMobileHscsdCallParamsV1Pckg dataparamsPckg(dataparams);
       
  1167 	dataparams.iIdRestrict = RMobileCall::ESendMyId; 
       
  1168 	dataparams.iAckTimer = 0;
       
  1169 	dataparams.iMSToModemWindowSize = 0;
       
  1170 	dataparams.iModemToMSWindowSize = 0;	
       
  1171 	dataparams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
       
  1172 	dataparams.iQoS = RMobileCall::EQoSTransparent;
       
  1173 	dataparams.iRLPVersion = RMobileCall::ERLPNotRequested;
       
  1174 	dataparams.iResequencingPeriod = 0;
       
  1175 	dataparams.iRetransmissionAttempts = 0;
       
  1176 	dataparams.iService = RMobileCall::EServiceDataCircuitSync;
       
  1177 	dataparams.iSpeed = RMobileCall::ESpeed64000;
       
  1178 	dataparams.iUseEdge = EFalse;
       
  1179 	dataparams.iV42bisCodewordsNum = 0;
       
  1180 	dataparams.iV42bisMaxStringLength = 0;
       
  1181 	dataparams.iV42bisReq = RMobileCall::EV42bisNeitherDirection;
       
  1182 	dataparams.iAsymmetry = RMobileCall::EAsymmetryNoPreference; 
       
  1183 	dataparams.iCodings = 0; 
       
  1184 	dataparams.iUserInitUpgrade = EFalse; 
       
  1185 	
       
  1186 	TPtrC dataNumber;
       
  1187 	TCoreEtelRequestStatus<RCall> dialStatus(dataCall1, &RCall::DialCancel);
       
  1188 	CleanupStack::PushL(dialStatus);
       
  1189 	ASSERT_TRUE(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, dataNumber) != EFalse, _L("GetStringFromConfig did not complete as expected"));
       
  1190 	DisplayUserInteractionPromptL(_L("Board now dials to DataNumber1 (press any key to start dialling) "), ETimeLong);
       
  1191 	dataCall1.Dial(dialStatus, dataparamsPckg, dataNumber);
       
  1192 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out"));
       
  1193 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
  1194 	
       
  1195 	// Start downloading a file on call 1.
       
  1196 	const TInt KPort = 80;
       
  1197 	TBuf<140> host(_L("developer.symbian.com"));
       
  1198     TBuf<140> page(_L("/main/downloads/papers/IMS_Introduction_Part_1.pdf"));
       
  1199     CHTTPDownload *download_CS = new (ELeave) CHTTPDownload(this);
       
  1200     CleanupStack::PushL(download_CS);
       
  1201     
       
  1202     
       
  1203    // ASSERT_TRUE(download_CS->StartDownloadL(host, page, KPort ,EFalse, ENifCSD), _L("Download Failed"));
       
  1204    ASSERT_TRUE(download_CS->StartDownloadL(host, page, KPort), _L("Download Failed"));
       
  1205    
       
  1206 	// Verify file is downloading. 
       
  1207 	ASSERT_TRUE(download_CS->VerifyDownloading(), _L("File is not downloading via CS data connection"));	
       
  1208 
       
  1209 	// Open a primary context. 
       
  1210 	RPacketContext& packetContext = iEtelSessionMgr.GetPrimaryPacketContextL(
       
  1211 											KMainServer,
       
  1212 											KMainPhone,
       
  1213 											KMainPacketService,
       
  1214 										KPrimaryPacketContext1);
       
  1215 	// Activate a context. 										
       
  1216 	iPacketServiceTestHelper.ActivatePrimaryPacketContextL(phone, packetContext);
       
  1217 
       
  1218 	// Start downloading a file via packet service connection. 
       
  1219 	TBuf<140> page2(_L("/main/downloads/papers/Leaves%20and%20Exceptions.pdf"));
       
  1220     CHTTPDownload *download_PS = new (ELeave) CHTTPDownload(this);
       
  1221     CleanupStack::PushL(download_PS);
       
  1222 	//ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort, EFalse, ENifPSD),_L("Download Failed"));
       
  1223 	ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort),_L("Download Failed"));
       
  1224 
       
  1225 
       
  1226 	// Verify both files are still downloading. 
       
  1227 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1228 	ASSERT_TRUE(download_CS->VerifyDownloading(), _L("File is not downloading via CS data connection"));	
       
  1229 	
       
  1230 	// Stop download
       
  1231 	download_CS->StopDownload();
       
  1232 	
       
  1233 	// Hang up call 1. 
       
  1234 	TCoreEtelRequestStatus<RCall> hangUpStatus (dataCall1, &RCall::HangUpCancel);	
       
  1235 	CleanupStack::PushL(hangUpStatus);
       
  1236 	dataCall1.HangUp(hangUpStatus);
       
  1237 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out"));
       
  1238 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));	
       
  1239 	
       
  1240 	// Verify file via packet service connection is still downloading. 
       
  1241 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1242 	
       
  1243 	// Stop download
       
  1244 	download_PS->StopDownload();
       
  1245 	
       
  1246 	//Deactivate context
       
  1247 	TExtEtelRequestStatus contextDeactivateStatus(packetContext, EPacketContextDeactivate);
       
  1248 	CleanupStack::PushL(contextDeactivateStatus);
       
  1249 	packetContext.Deactivate(contextDeactivateStatus);
       
  1250 	ASSERT_EQUALS(WaitForRequestWithTimeOut(contextDeactivateStatus, ETimeLong), KErrNone, 
       
  1251 					_L("RPacketContext::Deactivate timed out."));					
       
  1252 	ASSERT_EQUALS(contextDeactivateStatus.Int(), KErrNone,
       
  1253 					_L("RPacketContext::Deactivate returned with error status."));
       
  1254 
       
  1255 
       
  1256 	// 2. Activate a context. 
       
  1257 	iPacketServiceTestHelper.ActivatePrimaryPacketContextL(phone, packetContext);
       
  1258 
       
  1259 	// Start downloading a file. 
       
  1260 	//ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort, EFalse, ENifPSD),_L("Download Failed"));
       
  1261 	ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort),_L("Download Failed"));
       
  1262 
       
  1263 
       
  1264 	// Verify file is downloading. 
       
  1265 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1266 
       
  1267 	// Dial a data call. 
       
  1268 	dataCall1.Dial(dialStatus, dataparamsPckg, dataNumber);
       
  1269 	ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out"));
       
  1270 	ASSERT_EQUALS(dialStatus.Int(), KErrNone,  _L("RCall::Dial returned with an error"));
       
  1271 	
       
  1272 	// Start downloading a file via data call connection. 
       
  1273     //ASSERT_TRUE(download_CS->StartDownloadL(host,page,KPort,EFalse, ENifCSD), _L("Download Failed"));
       
  1274 	ASSERT_TRUE(download_CS->StartDownloadL(host,page,KPort), _L("Download Failed"));
       
  1275 
       
  1276 
       
  1277 	// Verify both files are downloading. 
       
  1278 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1279 	ASSERT_TRUE(download_CS->VerifyDownloading(), _L("File is not downloading via CS data connection"));	
       
  1280 
       
  1281 	// Stop download
       
  1282 	download_PS->StopDownload();
       
  1283 	
       
  1284 	// Deactivate context. 
       
  1285 	packetContext.Deactivate(contextDeactivateStatus);
       
  1286 	ASSERT_EQUALS(WaitForRequestWithTimeOut(contextDeactivateStatus, ETimeLong), KErrNone, 
       
  1287 					_L("RPacketContext::Deactivate timed out."));					
       
  1288 	ASSERT_EQUALS(contextDeactivateStatus.Int(), KErrNone,
       
  1289 					_L("RPacketContext::Deactivate returned with error status."));
       
  1290 					
       
  1291 	// Verify data call is still active and file is downloading. 
       
  1292 	RCall::TStatus callStatus;
       
  1293 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an Error"));
       
  1294 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return EStatusConnected"));
       
  1295 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1296 
       
  1297 	// Hang up 
       
  1298 	dataCall1.HangUp(hangUpStatus);
       
  1299 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out"));
       
  1300 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));	
       
  1301 	
       
  1302 
       
  1303 	// 3. Activate a context. 
       
  1304 	iPacketServiceTestHelper.ActivatePrimaryPacketContextL(phone, packetContext);
       
  1305 
       
  1306 	// Start downloading a file. 
       
  1307 	//ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort, EFalse, ENifPSD),_L("Download Failed"));
       
  1308 	ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort),_L("Download Failed"));
       
  1309 
       
  1310 	// Verify file is downloading. 
       
  1311 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1312 	
       
  1313 	// Post notification for incoming call from RPS
       
  1314 	TName name;
       
  1315 	TPtrC number;
       
  1316 	TCoreEtelRequestStatus<RLine> notifyIncomingCallStatus (line1,&RLine::NotifyIncomingCallCancel);
       
  1317 	CleanupStack::PushL(notifyIncomingCallStatus);
       
  1318 	line1.NotifyIncomingCall(notifyIncomingCallStatus,name);
       
  1319 	
       
  1320 	// Request incoming data call from RPS 
       
  1321 	ASSERT_EQUALS (RPSRequestIncomingCallL( EDataLine ), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
  1322 
       
  1323 	// Check RLine::NotifyIncomingCall completes with a call name with length > 0
       
  1324 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeMedium),KErrNone,_L("RLine::NotifyIncomingCall timed out"))
       
  1325 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"))
       
  1326 	ASSERT_TRUE(name.Length()>0, _L("RLine::NotifyIncomingCall did not return a call name"))
       
  1327 	
       
  1328     //Get the incoming call
       
  1329 	TCallId incomingCallId;
       
  1330 	dataCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
  1331 	
       
  1332 	// Answer an incoming data call. 
       
  1333 	TCoreEtelRequestStatus<RCall> answerIncomingStatus(dataCall1, &RCall::AnswerIncomingCallCancel);
       
  1334 	CleanupStack::PushL(answerIncomingStatus);	
       
  1335 	dataCall1.AnswerIncomingCall(answerIncomingStatus);
       
  1336 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
  1337 	ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
  1338 
       
  1339 	// Start downloading a file via data call connection. 
       
  1340     //ASSERT_TRUE(download_CS->StartDownloadL(host,page,KPort,EFalse, ENifCSD), _L("Download Failed"));
       
  1341     ASSERT_TRUE(download_CS->StartDownloadL(host,page,KPort), _L("Download Failed"));
       
  1342 
       
  1343 	// Verify both files are downloading. 
       
  1344 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1345 	ASSERT_TRUE(download_CS->VerifyDownloading(), _L("File is not downloading via CS data connection"));	
       
  1346 
       
  1347 	// Deactivate context. 
       
  1348 	packetContext.Deactivate(contextDeactivateStatus);
       
  1349 	ASSERT_EQUALS(WaitForRequestWithTimeOut(contextDeactivateStatus, ETimeLong), KErrNone, 
       
  1350 					_L("RPacketContext::Deactivate timed out."));					
       
  1351 	ASSERT_EQUALS(contextDeactivateStatus.Int(), KErrNone,
       
  1352 					_L("RPacketContext::Deactivate returned with error status."));
       
  1353 					
       
  1354 	// Verify data call is still active and file is downloading. 
       
  1355 	ASSERT_EQUALS(dataCall1.GetStatus(callStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus return code is not KErrNone"));
       
  1356 	ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RMobileCall::GetMobileCallStatus returned wrong status"));
       
  1357 	ASSERT_TRUE(download_CS->VerifyDownloading(), _L("File is not downloading via CS data connection"));	
       
  1358 
       
  1359 	// Hang up 
       
  1360 	dataCall1.HangUp(hangUpStatus);
       
  1361 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out"));
       
  1362 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
  1363 
       
  1364 	// 4. Activate a context. 
       
  1365 	iPacketServiceTestHelper.ActivatePrimaryPacketContextL(phone, packetContext);
       
  1366 
       
  1367 	// Start downloading a file. 
       
  1368 	//ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort, EFalse, ENifPSD),_L("Download Failed"));
       
  1369 	ASSERT_TRUE(download_PS->StartDownloadL(host,page2, KPort),_L("Download Failed"));
       
  1370 	
       
  1371 	// Verify file is downloading. 
       
  1372 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1373 
       
  1374 	// Post notification for incoming call from RPS
       
  1375 	line1.NotifyIncomingCall(notifyIncomingCallStatus,name);
       
  1376 
       
  1377 	// Request incoming data call from RPS 
       
  1378 	ASSERT_EQUALS (RPSRequestIncomingCallL( EDataLine ), KErrNone, _L("RPSRequestIncomingCallL returned an error"));
       
  1379 
       
  1380 	// Check RLine::NotifyIncomingCall completes with a call name with length > 0
       
  1381 	ASSERT_EQUALS(WaitForRequestWithTimeOut(notifyIncomingCallStatus,ETimeMedium),KErrNone,_L("RLine::NotifyIncomingCall timed out"))
       
  1382 	ASSERT_EQUALS(notifyIncomingCallStatus.Int(), KErrNone, _L("RLine::NotifyIncomingCall returned with an error"))
       
  1383 	ASSERT_TRUE(name.Length()>0, _L("RLine::NotifyIncomingCall did not return a call name"))
       
  1384 	
       
  1385     //Get the incoming call
       
  1386 	dataCall1 = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KDataLine, name, incomingCallId);
       
  1387 
       
  1388 	// Answer an incoming data call. 
       
  1389 	dataCall1.AnswerIncomingCall(answerIncomingStatus);
       
  1390 	ASSERT_EQUALS(WaitForRequestWithTimeOut(answerIncomingStatus, ETimeMedium), KErrNone, _L("RMobileCall::AnswerIncomingCall timed-out"));
       
  1391 	ASSERT_EQUALS(answerIncomingStatus.Int(), KErrNone, _L("RMobileCall::AnswerIncomingCall returned with an error"));
       
  1392 
       
  1393 	// Start downloading a file via data call connection. 
       
  1394     //ASSERT_TRUE(download_CS->StartDownloadL(host,page,KPort,EFalse, ENifCSD), _L("Download Failed"));
       
  1395     ASSERT_TRUE(download_CS->StartDownloadL(host,page,KPort), _L("Download Failed"));
       
  1396 
       
  1397 	// Verify both files are downloading. 
       
  1398 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1399 	ASSERT_TRUE(download_CS->VerifyDownloading(), _L("File is not downloading via CS data connection"));	
       
  1400 
       
  1401 	// Hang up data call. 
       
  1402 	dataCall1.HangUp(hangUpStatus);
       
  1403 	ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out"));
       
  1404 	ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error"));
       
  1405 	
       
  1406 	// Verify context is still active and file is downloading. 
       
  1407 	RPacketContext::TContextStatus contextStatus;
       
  1408 	ASSERT_EQUALS(packetContext.GetStatus(contextStatus), KErrNone, _L("RPacketContext::GetStatus returned an error"));
       
  1409 	ASSERT_EQUALS(contextStatus, RPacketContext::EStatusActive, _L("RPacketContext::GetStatus did not return EStatusActive"));
       
  1410 	ASSERT_TRUE(download_PS->VerifyDownloading(), _L("File is not downloading via PS data connection"));
       
  1411 
       
  1412 
       
  1413 	//
       
  1414 	// TEST END
       
  1415 	//
       
  1416 
       
  1417     StartCleanup();
       
  1418 	
       
  1419 	//Pop
       
  1420 	//getMulticallParams
       
  1421 	//notifyMulticallParamsChangeStatus
       
  1422 	//setMulticallParams
       
  1423 	//dialStatus
       
  1424 	//download_CS
       
  1425 	//download_PS
       
  1426 	//hangUpStatus
       
  1427 	//contextDeactivateStatus
       
  1428 	//notifyIncomingCallStatus
       
  1429 	//answerIncomingStatus
       
  1430 	
       
  1431 	CleanupStack::PopAndDestroy(10, &getMulticallParams);
       
  1432 
       
  1433 	*/
       
  1434 	
       
  1435 	return TestStepResult();
       
  1436 	}
       
  1437 
       
  1438 TPtrC CCTSYIntegrationTestMultiBearerInteroperability0005::GetTestStepName()
       
  1439 /**
       
  1440  * @return The test step name.
       
  1441  */
       
  1442 	{
       
  1443 	return _L("CCTSYIntegrationTestMultiBearerInteroperability0005");
       
  1444 	}
       
  1445 
       
  1446 
       
  1447