telephonyprotocols/pdplayer/umts/spudtel/src/eteldriverstrategies.cpp
changeset 42 3adadc800673
parent 20 244d7c5f118e
child 44 8b72faa1200f
equal deleted inserted replaced
31:8ab6687fb94c 42:3adadc800673
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 /**
    18 /**
    19  @file 
    19  @file 
    20  @internalComponent
    20  @internalComponent
    21 */
    21 */
    22 
    22 
       
    23 
       
    24 
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "eteldriverstrategiesTraces.h"
       
    28 #endif
       
    29 
    23 #include <e32def.h>
    30 #include <e32def.h>
    24 
    31 
    25 #include "ceteldrivercontext.h"
    32 #include "ceteldrivercontext.h"
    26 #include "eteldriverstrategies.h"
    33 #include "eteldriverstrategies.h"
    27 #include "spudteldebuglogger.h"
       
    28 #include "pdpfsmnmspace.h"
    34 #include "pdpfsmnmspace.h"
    29 
    35 
    30 #include <pcktcs.h>
    36 #include <pcktcs.h>
    31 using namespace ConnectionServ;
    37 using namespace ConnectionServ;
    32 
    38 
    38 @param aContext - pdp context
    44 @param aContext - pdp context
    39 @param aStatus - request status of this step
    45 @param aStatus - request status of this step
    40 */
    46 */
    41 void TOpenStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
    47 void TOpenStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
    42 	{
    48 	{
    43 	SPUDTEL_FNLOG("TOpenStrategy::Next()");
    49 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TOPENSTRATEGY_NEXT_1, "TOpenStrategy::Next()");
    44 	
    50 	
    45 	TInt err = KErrNone;
    51 	TInt err = KErrNone;
    46 	
    52 	
    47 	switch(aContext.StrategyStep())
    53 	switch(aContext.StrategyStep())
    48 		{
    54 		{
    59 			break;
    65 			break;
    60 			}
    66 			}
    61 			
    67 			
    62 		default:
    68 		default:
    63 			// incorrect step
    69 			// incorrect step
    64 			SPUDTEL_ERROR_LOG0(_L("Incorrect step"));
    70 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TOPENSTRATEGY_NEXT_2, "Incorrect step");
    65 			ASSERT(EFalse);
    71 			ASSERT(EFalse);
    66 			err = KErrNotSupported;
    72 			err = KErrNotSupported;
    67 			break;
    73 			break;
    68 				
    74 				
    69 		} // switch
    75 		} // switch
    83 */	
    89 */	
    84 void TOpenStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
    90 void TOpenStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
    85 	{
    91 	{
    86 	if(aCompletionStatus == KErrNone)
    92 	if(aCompletionStatus == KErrNone)
    87 		{
    93 		{
    88 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPhoneOpened"));
    94 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TOPENSTRATEGY_NOTIFYFSM_1, "Notifying FSM: EPhoneOpened");
    89 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPhoneOpened);
    95 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPhoneOpened);
    90 		}
    96 		}
    91 	else
    97 	else
    92 		{
    98 		{
    93 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPhoneOpenedFailed"));
    99 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TOPENSTRATEGY_NOTIFYFSM_2, "Notifying FSM: EPhoneOpenedFailed");
    94 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPhoneOpenedFailed, aCompletionStatus.Int());
   100 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPhoneOpenedFailed, aCompletionStatus.Int());
    95 		}
   101 		}
    96 	}
   102 	}
    97 
   103 
    98 /** Cancels last asynchronous request to eTel
   104 /** Cancels last asynchronous request to eTel
   103 	{
   109 	{
   104 	switch(aContext.StrategyStep())
   110 	switch(aContext.StrategyStep())
   105 		{
   111 		{
   106 		case EInitPhoneStep:
   112 		case EInitPhoneStep:
   107 			{
   113 			{
   108 			SPUDTEL_INFO_LOG(_L("Cancel Phone::InitialiseCancel"));
   114 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TOPENSTRATEGY_CANCELASYNCREQUEST_1, "Cancel Phone::InitialiseCancel");
   109 			aContext.Phone().InitialiseCancel();
   115 			aContext.Phone().InitialiseCancel();
   110 			break;
   116 			break;
   111 			}
   117 			}
   112 			
   118 			
   113 		default:
   119 		default:
   114 			// there're NO outstanding async requests
   120 			// there're NO outstanding async requests
   115 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TOpenStrategy::CancelAsyncRequest"));
   121 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TOPENSTRATEGY_CANCELASYNCREQUEST_2, "ERROR: Incorrect case in TOpenStrategy::CancelAsyncRequest");
   116 			ASSERT(EFalse);
   122 			ASSERT(EFalse);
   117 			break;
   123 			break;
   118 		}
   124 		}
   119 	}
   125 	}
   120 
   126 
   127 @param aContext - pdp context
   133 @param aContext - pdp context
   128 @param aStatus - request status of this step
   134 @param aStatus - request status of this step
   129 */
   135 */
   130 void TContextDeleteStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   136 void TContextDeleteStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   131 	{
   137 	{
   132 	SPUDTEL_FNLOG("TContextDeleteStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)");
   138 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_NEXT_1, "TContextDeleteStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)");
   133 	
   139 	
   134 	TInt err = KErrNone;
   140 	TInt err = KErrNone;
   135 	
   141 	
   136 	// steps:
   142 	// steps:
   137 	//	-- cancel notifications
   143 	//	-- cancel notifications
   233 			break;
   239 			break;
   234 			}
   240 			}
   235 			
   241 			
   236 		default:
   242 		default:
   237 			// incorrect step
   243 			// incorrect step
   238 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   244 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_NEXT_2, "ERROR: Incorrect case");
   239 			ASSERT(EFalse);
   245 			ASSERT(EFalse);
   240 			err = KErrNotSupported;
   246 			err = KErrNotSupported;
   241 			break;
   247 			break;
   242 				
   248 				
   243 		} // switch
   249 		} // switch
   260 	{
   266 	{
   261 	aContext.PdpFsmInterface().Set(aContext.Id(), RPacketContext::EStatusDeleted);
   267 	aContext.PdpFsmInterface().Set(aContext.Id(), RPacketContext::EStatusDeleted);
   262 	
   268 	
   263 	if(aCompletionStatus == KErrNone)
   269 	if(aCompletionStatus == KErrNone)
   264 		{
   270 		{
   265 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EContextDeleted"));
   271 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_NOTIFYFSM_1, "Notifying FSM: EContextDeleted");
   266 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EContextDeleted);
   272 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EContextDeleted);
   267 		}
   273 		}
   268 	else
   274 	else
   269 		{
   275 		{
   270 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EContextDeletedFailed"));
   276 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_NOTIFYFSM_2, "Notifying FSM: EContextDeletedFailed");
   271 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EContextDeletedFailed, aCompletionStatus.Int());
   277 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EContextDeletedFailed, aCompletionStatus.Int());
   272 		}
   278 		}
   273 	}
   279 	}
   274 
   280 
   275 /** Cancels last asynchronous request to eTel
   281 /** Cancels last asynchronous request to eTel
   276 
   282 
   277 @param  aContext - pdp context
   283 @param  aContext - pdp context
   278 */
   284 */
   279 void TContextDeleteStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
   285 void TContextDeleteStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
   280 	{
   286 	{
   281 	SPUDTEL_FNLOG("TContextDeleteStrategy::CancelAsyncRequest()");
   287 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_CANCELASYNCREQUEST_1, "TContextDeleteStrategy::CancelAsyncRequest()");
   282 	
   288 	
   283 	// When there is no sub-session, the strategy will not call DeactivateContext, but will be in the EDeactivateStep state
   289 	// When there is no sub-session, the strategy will not call DeactivateContext, but will be in the EDeactivateStep state
   284 	// In this case we don't want to cancel the deactivate request
   290 	// In this case we don't want to cancel the deactivate request
   285 	if (aContext.iStatus != KRequestPending)
   291 	if (aContext.iStatus != KRequestPending)
   286 		{
   292 		{
   289 		
   295 		
   290 	switch(aContext.StrategyStep())
   296 	switch(aContext.StrategyStep())
   291 		{
   297 		{
   292 		case EDeactivateStep:
   298 		case EDeactivateStep:
   293 			{
   299 			{
   294 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextDeactivate"));
   300 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketContext::EPacketContextDeactivate");
   295 			aContext.PacketContext().CancelAsyncRequest(EPacketContextDeactivate);
   301 			aContext.PacketContext().CancelAsyncRequest(EPacketContextDeactivate);
   296 			break;
   302 			break;
   297 			}
   303 			}
   298 			
   304 			
   299 		case EDeleteContextStep:
   305 		case EDeleteContextStep:
   300 			{
   306 			{
   301 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextDelete"));
   307 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_CANCELASYNCREQUEST_3, "Cancel PacketContext::EPacketContextDelete");
   302 			aContext.PacketContext().CancelAsyncRequest(EPacketContextDelete);
   308 			aContext.PacketContext().CancelAsyncRequest(EPacketContextDelete);
   303 			break;
   309 			break;
   304 			}
   310 			}
   305 			
   311 			
   306 		default:
   312 		default:
   307 			// there're NO outstanding async requests
   313 			// there're NO outstanding async requests
   308 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   314 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCONTEXTDELETESTRATEGY_CANCELASYNCREQUEST_4, "ERROR: Incorrect case");
   309 			ASSERT(EFalse);
   315 			ASSERT(EFalse);
   310 			break;
   316 			break;
   311 		}
   317 		}
   312 	}
   318 	}
   313 
   319 
   320 @param aContext - pdp context
   326 @param aContext - pdp context
   321 @param aStatus - request status of this step
   327 @param aStatus - request status of this step
   322 */
   328 */
   323 void TCreate1ryPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   329 void TCreate1ryPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   324 	{
   330 	{
   325 	SPUDTEL_FNLOG("TCreate1ryPdpContextStrategy::Next()");
   331 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_NEXT_1, "TCreate1ryPdpContextStrategy::Next()");
   326 	
   332 	
   327 	TInt err = KErrNone;
   333 	TInt err = KErrNone;
   328 	
   334 	
   329 	// possible steps:
   335 	// possible steps:
   330 	// 	-- open new context
   336 	// 	-- open new context
   335 		case EStartStep:
   341 		case EStartStep:
   336 			{
   342 			{
   337 			err = aContext.PacketContext().OpenNewContext (aContext.PacketService(), aContext.Name());
   343 			err = aContext.PacketContext().OpenNewContext (aContext.PacketService(), aContext.Name());
   338 			if (err)
   344 			if (err)
   339 				{
   345 				{
   340 				SPUDTEL_ERROR_LOG(_L("PacketContextOpenNewContext returned %d"), err);
   346 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_NEXT_2, "PacketContextOpenNewContext returned %d", err);
   341 				break;
   347 				break;
   342 				}
   348 				}
   343 				
   349 				
   344 			aContext.PacketContext().InitialiseContext(*aStatus, aContext.DataChannelV2Pckg());						
   350 			aContext.PacketContext().InitialiseContext(*aStatus, aContext.DataChannelV2Pckg());						
   345 			aContext.SetStrategyStep (EInitialiseContextStep);
   351 			aContext.SetStrategyStep (EInitialiseContextStep);
   362 			// QoS name is not used anywhere
   368 			// QoS name is not used anywhere
   363 			TName newName;
   369 			TName newName;
   364 			err = aContext.PacketQoS().OpenNewQoS (aContext.PacketContext(), newName);
   370 			err = aContext.PacketQoS().OpenNewQoS (aContext.PacketContext(), newName);
   365 			if (err)
   371 			if (err)
   366 				{ 
   372 				{ 
   367 				SPUDTEL_ERROR_LOG(_L("PacketQoS OpenNewQoS returned %d"), err);
   373 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_NEXT_3, "PacketQoS OpenNewQoS returned %d", err);
   368 				break; 
   374 				break; 
   369 				}
   375 				}
   370 				
   376 				
   371 #ifdef SYMBIAN_NETWORKING_UMTSR5
   377 #ifdef SYMBIAN_NETWORKING_UMTSR5
   372             RPacketQoS::TQoSR5Requested r5;
   378             RPacketQoS::TQoSR5Requested r5;
   378 			aContext.QosRequested() = r4;
   384 			aContext.QosRequested() = r4;
   379 #endif 
   385 #endif 
   380 // SYMBIAN_NETWORKING_UMTSR5
   386 // SYMBIAN_NETWORKING_UMTSR5
   381 
   387 
   382 
   388 
   383 #ifdef _DEBUG
   389 #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
   384             aContext.DumpReqProfileParameters ();
   390             aContext.DumpReqProfileParameters ();
   385 #endif			
   391 #endif			
   386 			aContext.PacketQoS().SetProfileParameters (*aStatus, aContext.QosRequestedPckg());
   392 			aContext.PacketQoS().SetProfileParameters (*aStatus, aContext.QosRequestedPckg());
   387 			aContext.SetStrategyStep (ESetProfileParamsStep);
   393 			aContext.SetStrategyStep (ESetProfileParamsStep);
   388 			break;
   394 			break;
   393 			aContext.SetStrategyStep (EFinishStep);
   399 			aContext.SetStrategyStep (EFinishStep);
   394 			break;
   400 			break;
   395 			}
   401 			}
   396 			
   402 			
   397 		default:
   403 		default:
   398 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   404 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_NEXT_4, "ERROR: Incorrect case");
   399 			ASSERT(EFalse);
   405 			ASSERT(EFalse);
   400 			err = KErrNotSupported;
   406 			err = KErrNotSupported;
   401 			break;
   407 			break;
   402 		}
   408 		}
   403 		
   409 		
   417 */	
   423 */	
   418 void TCreate1ryPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
   424 void TCreate1ryPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
   419 {
   425 {
   420 	if(aCompletionStatus == KErrNone)
   426 	if(aCompletionStatus == KErrNone)
   421 		{
   427 		{
   422 		SPUDTEL_INFO_LOG(_L("Notifying FSM: E1ryPdpContextCreated"));
   428 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_NOTIFYFSM_1, "Notifying FSM: E1ryPdpContextCreated");
   423 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E1ryPdpContextCreated);
   429 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E1ryPdpContextCreated);
   424 		}
   430 		}
   425 	else
   431 	else
   426 		{
   432 		{
   427 		SPUDTEL_INFO_LOG(_L("Notifying FSM: E1ryPdpContextCreatedFailed"));
   433 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_NOTIFYFSM_2, "Notifying FSM: E1ryPdpContextCreatedFailed");
   428 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E1ryPdpContextCreatedFailed, aCompletionStatus.Int());
   434 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E1ryPdpContextCreatedFailed, aCompletionStatus.Int());
   429 		}
   435 		}
   430 }
   436 }
   431 
   437 
   432 /** Cancels last asynchronous request to eTel
   438 /** Cancels last asynchronous request to eTel
   433 
   439 
   434 @param  aContext - pdp context
   440 @param  aContext - pdp context
   435 */
   441 */
   436 void TCreate1ryPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
   442 void TCreate1ryPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
   437 	{
   443 	{
   438 	SPUDTEL_FNLOG("TCreate1ryPdpContextStrategy::CancelAsyncRequest()");
   444 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_1, "TCreate1ryPdpContextStrategy::CancelAsyncRequest()");
   439 	
   445 	
   440 	switch(aContext.StrategyStep())
   446 	switch(aContext.StrategyStep())
   441 		{
   447 		{
   442 		case ESetConfigStep:
   448 		case ESetConfigStep:
   443 			{
   449 			{
   444 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextSetConfig"));
   450 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketContext::EPacketContextSetConfig");
   445 			aContext.PacketContext().CancelAsyncRequest(EPacketContextSetConfig);
   451 			aContext.PacketContext().CancelAsyncRequest(EPacketContextSetConfig);
   446 			break;
   452 			break;
   447 			}
   453 			}
   448 			
   454 			
   449 		case ESetProfileParamsStep:
   455 		case ESetProfileParamsStep:
   450 			{
   456 			{
   451 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSSetProfileParams"));
   457 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_3, "Cancel PacketContext::EPacketQoSSetProfileParams");
   452 			aContext.PacketQoS().CancelAsyncRequest(EPacketQoSSetProfileParams);
   458 			aContext.PacketQoS().CancelAsyncRequest(EPacketQoSSetProfileParams);
   453 			break;
   459 			break;
   454 			}
   460 			}
   455 			
   461 			
   456 		case EInitialiseContextStep:
   462 		case EInitialiseContextStep:
   457 		    SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextActivate"));
   463 		    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_4, "Cancel PacketContext::EPacketContextActivate");
   458 		    aContext.PacketContext().CancelAsyncRequest(EPacketContextActivateCancel);
   464 		    aContext.PacketContext().CancelAsyncRequest(EPacketContextActivateCancel);
   459 		    break;
   465 		    break;
   460 			
   466 			
   461 		default:
   467 		default:
   462 			// there're NO outstanding async requests
   468 			// there're NO outstanding async requests
   463 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   469 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE1RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_5, "ERROR: Incorrect case");
   464 			ASSERT(EFalse);
   470 			ASSERT(EFalse);
   465 			break;
   471 			break;
   466 		}
   472 		}
   467 	}
   473 	}
   468 
   474 
   475 @param aContext - pdp context
   481 @param aContext - pdp context
   476 @param aStatus - request status of this step
   482 @param aStatus - request status of this step
   477 */
   483 */
   478 void TCreate2ryPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   484 void TCreate2ryPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   479 	{
   485 	{
   480 	SPUDTEL_FNLOG("TCreate2ryPdpContextStrategy::Next()");
   486 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_NEXT_1, "TCreate2ryPdpContextStrategy::Next()");
   481 	
   487 	
   482 	TInt err = KErrNone;
   488 	TInt err = KErrNone;
   483 	
   489 	
   484 	// possible steps:
   490 	// possible steps:
   485 	//	-- open new secondary context
   491 	//	-- open new secondary context
   500 			// QoS name is not used anywhere
   506 			// QoS name is not used anywhere
   501 			TName newName;
   507 			TName newName;
   502 			err = aContext.PacketQoS().OpenNewQoS (aContext.PacketContext(), newName);
   508 			err = aContext.PacketQoS().OpenNewQoS (aContext.PacketContext(), newName);
   503 			if (err)
   509 			if (err)
   504 				{ 
   510 				{ 
   505 				SPUDTEL_ERROR_LOG(_L("PacketQoS OpenNewQoS returned %d"), err);
   511 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_NEXT_2, "PacketQoS OpenNewQoS returned %d", err);
   506 				break; 
   512 				break; 
   507 				}
   513 				}
   508 			aContext.SetStrategyStep (EFinishStep);
   514 			aContext.SetStrategyStep (EFinishStep);
   509 			break;
   515 			break;
   510 			}
   516 			}
   511 			
   517 			
   512 		default:
   518 		default:
   513 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   519 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_NEXT_3, "ERROR: Incorrect case");
   514 			ASSERT(EFalse);
   520 			ASSERT(EFalse);
   515 			err = KErrNotSupported;
   521 			err = KErrNotSupported;
   516 			break;
   522 			break;
   517 		}
   523 		}
   518 		
   524 		
   532 */	
   538 */	
   533 void TCreate2ryPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
   539 void TCreate2ryPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
   534 {
   540 {
   535 	if(aCompletionStatus == KErrNone)
   541 	if(aCompletionStatus == KErrNone)
   536 		{
   542 		{
   537 		SPUDTEL_INFO_LOG(_L("Notifying FSM: E2ryPdpContextCreated"));
   543 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_NOTIFYFSM_1, "Notifying FSM: E2ryPdpContextCreated");
   538 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E2ryPdpContextCreated);
   544 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E2ryPdpContextCreated);
   539 		}
   545 		}
   540 	else
   546 	else
   541 		{
   547 		{
   542 		SPUDTEL_INFO_LOG(_L("Notifying FSM: E2ryPdpContextCreatedFailed"));
   548 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_NOTIFYFSM_2, "Notifying FSM: E2ryPdpContextCreatedFailed");
   543 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E2ryPdpContextCreatedFailed, aCompletionStatus.Int());
   549 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::E2ryPdpContextCreatedFailed, aCompletionStatus.Int());
   544 		}
   550 		}
   545 }
   551 }
   546 
   552 
   547 /** Cancels last asynchronous request to eTel
   553 /** Cancels last asynchronous request to eTel
   548 
   554 
   549 @param  aContext - pdp context
   555 @param  aContext - pdp context
   550 */
   556 */
   551 void TCreate2ryPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& /*aContext*/)
   557 void TCreate2ryPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& /*aContext*/)
   552 	{
   558 	{
   553 	SPUDTEL_FNLOG("TCreate2ryPdpContextStrategy::CancelAsyncRequest()");
   559 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_1, "TCreate2ryPdpContextStrategy::CancelAsyncRequest()");
   554 	SPUDTEL_ERROR_LOG0(_L("ERROR: No outstanding requests"));
   560 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATE2RYPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_2, "ERROR: No outstanding requests");
   555 	}
   561 	}
   556 
   562 
   557 
   563 
   558 //
   564 //
   559 // TSetQoSStrategy
   565 // TSetQoSStrategy
   563 @param aContext - pdp context
   569 @param aContext - pdp context
   564 @param aStatus - request status of this step
   570 @param aStatus - request status of this step
   565 */
   571 */
   566 void TSetQoSStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   572 void TSetQoSStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   567 	{
   573 	{
   568 	SPUDTEL_FNLOG("TSetQoSStrategy::Next()");
   574 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETQOSSTRATEGY_NEXT_1, "TSetQoSStrategy::Next()");
   569 	
   575 	
   570 	TInt err = KErrNone;
   576 	TInt err = KErrNone;
   571 	
   577 	
   572 	// possible steps:
   578 	// possible steps:
   573 	//	-- set QoS profile parameters
   579 	//	-- set QoS profile parameters
   584 
   590 
   585 			aContext.PdpFsmInterface().Get (aContext.Id(), req);
   591 			aContext.PdpFsmInterface().Get (aContext.Id(), req);
   586 			aContext.QosRequested() = req;	
   592 			aContext.QosRequested() = req;	
   587 
   593 
   588 
   594 
   589 #ifdef _DEBUG
   595 #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
   590             aContext.DumpReqProfileParameters ();
   596             aContext.DumpReqProfileParameters ();
   591 #endif			
   597 #endif			
   592             aContext.PacketQoS().SetProfileParameters (*aStatus, aContext.QosRequestedPckg());
   598             aContext.PacketQoS().SetProfileParameters (*aStatus, aContext.QosRequestedPckg());
   593 			aContext.SetStrategyStep (ESetProfileParamsStep);
   599 			aContext.SetStrategyStep (ESetProfileParamsStep);
   594 			break;
   600 			break;
   601 			}
   607 			}
   602 			
   608 			
   603 		default:
   609 		default:
   604 			{
   610 			{
   605 			// unexpected
   611 			// unexpected
   606 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   612 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETQOSSTRATEGY_NEXT_2, "ERROR: Incorrect case");
   607 			ASSERT(EFalse);
   613 			ASSERT(EFalse);
   608 			err = KErrNotSupported;
   614 			err = KErrNotSupported;
   609 			break;
   615 			break;
   610 			}
   616 			}
   611 		}
   617 		}
   624 */	
   630 */	
   625 void TSetQoSStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
   631 void TSetQoSStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
   626 	{
   632 	{
   627 	if(aCompletionStatus == KErrNone)
   633 	if(aCompletionStatus == KErrNone)
   628 		{
   634 		{
   629 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EQoSSet"));
   635 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETQOSSTRATEGY_NOTIFYFSM_1, "Notifying FSM: EQoSSet");
   630 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EQoSSet);
   636 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EQoSSet);
   631 		}
   637 		}
   632 	else
   638 	else
   633 		{
   639 		{
   634 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EQoSSetFailed"));
   640 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETQOSSTRATEGY_NOTIFYFSM_2, "Notifying FSM: EQoSSetFailed");
   635 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EQoSSetFailed, aCompletionStatus.Int());
   641 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EQoSSetFailed, aCompletionStatus.Int());
   636 		}
   642 		}
   637 	}
   643 	}
   638 	
   644 	
   639 /** Cancels last asynchronous request to eTel
   645 /** Cancels last asynchronous request to eTel
   645 	switch(aContext.StrategyStep())
   651 	switch(aContext.StrategyStep())
   646 		{
   652 		{
   647 		case ESetProfileParamsStep:
   653 		case ESetProfileParamsStep:
   648 			{
   654 			{
   649 			aContext.PacketQoS().CancelAsyncRequest(EPacketQoSSetProfileParams);
   655 			aContext.PacketQoS().CancelAsyncRequest(EPacketQoSSetProfileParams);
   650 			SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketQoSSetProfileParams"));
   656 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETQOSSTRATEGY_CANCELASYNCREQUEST_1, "Cancel PacketQoS::EPacketQoSSetProfileParams");
   651 			break;
   657 			break;
   652 			}
   658 			}
   653 			
   659 			
   654 		default:
   660 		default:
   655 			// there're NO outstanding async requests
   661 			// there're NO outstanding async requests
   656 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TSetQoSStrategy::CancelAsyncRequest"));
   662 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETQOSSTRATEGY_CANCELASYNCREQUEST_2, "ERROR: Incorrect case in TSetQoSStrategy::CancelAsyncRequest");
   657 			ASSERT(EFalse);
   663 			ASSERT(EFalse);
   658 			break;
   664 			break;
   659 		}
   665 		}
   660 	}
   666 	}
   661 
   667 
   668 @param aContext - pdp context
   674 @param aContext - pdp context
   669 @param aStatus - request status of this step
   675 @param aStatus - request status of this step
   670 */
   676 */
   671 void TSetTftStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   677 void TSetTftStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   672 	{
   678 	{
   673 	SPUDTEL_FNLOG("TSetTftStrategy::Next()");
   679 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_1, "TSetTftStrategy::Next()");
   674 	
   680 	
   675 	TInt err = KErrNone;
   681 	TInt err = KErrNone;
   676 
   682 
   677 	// possible steps:
   683 	// possible steps:
   678 	// 	-- add filters
   684 	// 	-- add filters
   683 			aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftOperationCode());
   689 			aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftOperationCode());
   684 			switch(aContext.TftOperationCode())
   690 			switch(aContext.TftOperationCode())
   685 				{
   691 				{
   686 				case KAddFilters:
   692 				case KAddFilters:
   687 					aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
   693 					aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
   688 					SPUDTELVERBOSE_INFO_LOG1(_L("TftOperationCode - Add Filters"), aContext.TftInfo().FilterCount());
   694 					OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_2, "TftOperationCode - Add Filters %d", aContext.TftInfo().FilterCount());
   689 					// Set strategy assumes that TFT has to be created on a first place
   695 					// Set strategy assumes that TFT has to be created on a first place
   690 					SPUDTELVERBOSE_INFO_LOG(_L("Creating TFT..."));
   696 					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_3, "Creating TFT...");
   691 					if (aContext.ContextType() != SpudMan::EMbms)
   697 					if (aContext.ContextType() != SpudMan::EMbms)
   692 						{	
   698 						{	
   693 						aContext.PacketContext().CreateNewTFT(*aStatus, aContext.TftInfo().FilterCount());
   699 						aContext.PacketContext().CreateNewTFT(*aStatus, aContext.TftInfo().FilterCount());
   694 						}
   700 						}
   695 					else
   701 					else
   699 					aContext.SetStrategyStep (ECreateNewTFTStep);
   705 					aContext.SetStrategyStep (ECreateNewTFTStep);
   700 					break;
   706 					break;
   701 
   707 
   702 				case KRemoveFilters:
   708 				case KRemoveFilters:
   703 					err = KErrNotSupported;
   709 					err = KErrNotSupported;
   704 					SPUDTEL_ERROR_LOG(_L("TftOperationCode - Remove is not supported in a Set strategy, return %d"), err);
   710 					OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_4, "TftOperationCode - Remove is not supported in a Set strategy, return %d", err);
   705 					break;
   711 					break;
   706 
   712 
   707 				case KDeleteTFT:
   713 				case KDeleteTFT:
   708 					err = KErrNotSupported;
   714 					err = KErrNotSupported;
   709 					SPUDTEL_ERROR_LOG(_L("TftOperationCode - Delete is not supported in a Set strategy, return %d"), err);
   715 					OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_5, "TftOperationCode - Delete is not supported in a Set strategy, return %d", err);
   710 					break;
   716 					break;
   711 
   717 
   712 				default:
   718 				default:
   713 					// wrong case
   719 					// wrong case
   714 					SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   720 					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_6, "ERROR: Incorrect case");
   715 					ASSERT(EFalse);
   721 					ASSERT(EFalse);
   716 					err = KErrNotSupported;
   722 					err = KErrNotSupported;
   717 					break;
   723 					break;
   718 				}
   724 				}
   719 			break;
   725 			break;
   769 			break;
   775 			break;
   770 			}
   776 			}
   771 
   777 
   772 		default:
   778 		default:
   773 			// unexpected
   779 			// unexpected
   774 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   780 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NEXT_7, "ERROR: Incorrect case");
   775 			ASSERT(EFalse);
   781 			ASSERT(EFalse);
   776 			err = KErrNotSupported;
   782 			err = KErrNotSupported;
   777 			break;
   783 			break;
   778 		}
   784 		}
   779 		
   785 		
   792 */	
   798 */	
   793 void TSetTftStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
   799 void TSetTftStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
   794 	{
   800 	{
   795 	if(aCompletionStatus == KErrNone)
   801 	if(aCompletionStatus == KErrNone)
   796 		{
   802 		{
   797 		SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftSet"));
   803 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NOTIFYFSM_1, "Notifying FSM: ETftSet");
   798 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftSet);
   804 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftSet);
   799 		}
   805 		}
   800 	else
   806 	else
   801 		{
   807 		{
   802 		SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftSetFailed"));
   808 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_NOTIFYFSM_2, "Notifying FSM: ETftSetFailed");
   803 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftSetFailed, aCompletionStatus.Int());
   809 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftSetFailed, aCompletionStatus.Int());
   804 		}
   810 		}
   805 	}
   811 	}
   806 	
   812 	
   807 /** Cancels last asynchronous request to eTel
   813 /** Cancels last asynchronous request to eTel
   813 	switch(aContext.StrategyStep())
   819 	switch(aContext.StrategyStep())
   814 		{
   820 		{
   815 		case ECreateNewTFTStep:
   821 		case ECreateNewTFTStep:
   816 			{
   822 			{
   817 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextCreateNewTFT);
   823 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextCreateNewTFT);
   818 			SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextCreateNewTFT"));
   824 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_CANCELASYNCREQUEST_1, "Cancel PacketQoS::EPacketContextCreateNewTFT");
   819 			break;
   825 			break;
   820 			}
   826 			}
   821 			
   827 			
   822 		case EAddTftStep:
   828 		case EAddTftStep:
   823 			{
   829 			{
   824 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextAddPacketFilter);
   830 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextAddPacketFilter);
   825 			SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextAddPacketFilter"));
   831 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketQoS::EPacketContextAddPacketFilter");
   826 			break;
   832 			break;
   827 			}
   833 			}
   828 
   834 
   829 		default:
   835 		default:
   830 			// unexpected
   836 			// unexpected
   831 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TSetTftStrategy::CancelAsyncRequest"));
   837 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TSETTFTSTRATEGY_CANCELASYNCREQUEST_3, "ERROR: Incorrect case in TSetTftStrategy::CancelAsyncRequest");
   832 			ASSERT(EFalse);
   838 			ASSERT(EFalse);
   833 			break;
   839 			break;
   834 		}
   840 		}
   835 	}
   841 	}
   836 
   842 
   843 @param aContext - pdp context
   849 @param aContext - pdp context
   844 @param aStatus - request status of this step
   850 @param aStatus - request status of this step
   845 */
   851 */
   846 void TChangeTftStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   852 void TChangeTftStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
   847 	{
   853 	{
   848 	SPUDTEL_FNLOG("TChangeTftStrategy::Next()");
   854 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NEXT_1, "TChangeTftStrategy::Next()");
   849 	
   855 	
   850 	TInt err = KErrNone;
   856 	TInt err = KErrNone;
   851 
   857 
   852 	// special case. 
   858 	// special case. 
   853 	if(EStartStep == aContext.StrategyStep())
   859 	if(EStartStep == aContext.StrategyStep())
   855 		aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftOperationCode());
   861 		aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftOperationCode());
   856 		switch(aContext.TftOperationCode())
   862 		switch(aContext.TftOperationCode())
   857 			{
   863 			{
   858 			case KAddFilters:
   864 			case KAddFilters:
   859 				aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
   865 				aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
   860 				SPUDTELVERBOSE_INFO_LOG1(_L("TftOperationCode - Add Filters"), aContext.TftInfo().FilterCount());
   866 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NEXT_2, "TftOperationCode - Add Filters %d", aContext.TftInfo().FilterCount());
   861 				aContext.SetStrategyStep (EAddFirstTftStep);
   867 				aContext.SetStrategyStep (EAddFirstTftStep);
   862 				break;
   868 				break;
   863 
   869 
   864 			case KRemoveFilters:
   870 			case KRemoveFilters:
   865 				aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
   871 				aContext.PdpFsmInterface().Get (aContext.Id(), aContext.TftInfo());
   866 				SPUDTELVERBOSE_INFO_LOG1(_L("TftOperationCode - Remove %d Filters"), aContext.TftInfo().FilterCount());
   872 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NEXT_3, "TftOperationCode - Remove %d Filters", aContext.TftInfo().FilterCount());
   867 				aContext.SetStrategyStep (ERemoveFirstTftStep);
   873 				aContext.SetStrategyStep (ERemoveFirstTftStep);
   868 				break;
   874 				break;
   869 
   875 
   870 			case KDeleteTFT:
   876 			case KDeleteTFT:
   871 				SPUDTELVERBOSE_INFO_LOG(_L("TftOperationCode - Delete TFT"));
   877 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NEXT_4, "TftOperationCode - Delete TFT");
   872 				// delete old TFT
   878 				// delete old TFT
   873 				aContext.PacketContext().DeleteTFT(*aStatus);
   879 				aContext.PacketContext().DeleteTFT(*aStatus);
   874 				aContext.SetStrategyStep (EDeleteTftStep);
   880 				aContext.SetStrategyStep (EDeleteTftStep);
   875 				// DeleteTFT() ia an async operation => return 
   881 				// DeleteTFT() ia an async operation => return 
   876 				return;
   882 				return;
   877 
   883 
   878 			default:
   884 			default:
   879 				// wrong case
   885 				// wrong case
   880 				SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
   886 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NEXT_5, "ERROR: Incorrect case");
   881 				ASSERT(EFalse);
   887 				ASSERT(EFalse);
   882 				err = KErrNotSupported;
   888 				err = KErrNotSupported;
   883 				break;
   889 				break;
   884 			}
   890 			}
   885 		}
   891 		}
  1002 				break;
  1008 				break;
  1003 
  1009 
  1004 				
  1010 				
  1005 			default:
  1011 			default:
  1006 				// unexpected
  1012 				// unexpected
  1007 				SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1013 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NEXT_6, "ERROR: Incorrect case");
  1008 				ASSERT(EFalse);
  1014 				ASSERT(EFalse);
  1009 				err = KErrNotSupported;
  1015 				err = KErrNotSupported;
  1010 				break;
  1016 				break;
  1011 			}
  1017 			}
  1012 		}
  1018 		}
  1027 */	
  1033 */	
  1028 void TChangeTftStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1034 void TChangeTftStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1029 	{
  1035 	{
  1030 	if(aCompletionStatus == KErrNone)
  1036 	if(aCompletionStatus == KErrNone)
  1031 		{
  1037 		{
  1032 		SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftChanged"));
  1038 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NOTIFYFSM_1, "Notifying FSM: ETftChanged");
  1033 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftChanged);
  1039 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftChanged);
  1034 		}
  1040 		}
  1035 	else
  1041 	else
  1036 		{
  1042 		{
  1037 		SPUDTEL_INFO_LOG(_L("Notifying FSM: ETftChangedFailed"));
  1043 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_NOTIFYFSM_2, "Notifying FSM: ETftChangedFailed");
  1038 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftChangedFailed, aCompletionStatus.Int());
  1044 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::ETftChangedFailed, aCompletionStatus.Int());
  1039 		}
  1045 		}
  1040 	}
  1046 	}
  1041 	
  1047 	
  1042 /** Cancels last asynchronous request to eTel
  1048 /** Cancels last asynchronous request to eTel
  1047 	{
  1053 	{
  1048 	switch(aContext.StrategyStep())
  1054 	switch(aContext.StrategyStep())
  1049 		{
  1055 		{
  1050 		case EDeleteTftStep:
  1056 		case EDeleteTftStep:
  1051 			{
  1057 			{
  1052 			SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextDeleteTFTCancel"));
  1058 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_CANCELASYNCREQUEST_1, "Cancel PacketQoS::EPacketContextDeleteTFTCancel");
  1053 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextDeleteTFTCancel);
  1059 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextDeleteTFTCancel);
  1054 			break;
  1060 			break;
  1055 			}
  1061 			}
  1056 		
  1062 		
  1057 		case ERemoveTftStep:
  1063 		case ERemoveTftStep:
  1058 			{
  1064 			{
  1059 			SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextRemovePacketFilterCancel"));
  1065 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketQoS::EPacketContextRemovePacketFilterCancel");
  1060 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextRemovePacketFilterCancel);
  1066 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextRemovePacketFilterCancel);
  1061 			break;
  1067 			break;
  1062 			}
  1068 			}
  1063 			
  1069 			
  1064 		case EAddTftStep:
  1070 		case EAddTftStep:
  1065 			{
  1071 			{
  1066 			SPUDTEL_INFO_LOG(_L("Cancel PacketQoS::EPacketContextAddPacketFilter"));
  1072 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_CANCELASYNCREQUEST_3, "Cancel PacketQoS::EPacketContextAddPacketFilter");
  1067 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextAddPacketFilterCancel);
  1073 			aContext.PacketQoS().CancelAsyncRequest(EPacketContextAddPacketFilterCancel);
  1068 			break;
  1074 			break;
  1069 			}
  1075 			}
  1070 
  1076 
  1071 		default:
  1077 		default:
  1072 			// unexpected
  1078 			// unexpected
  1073 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TChangeTftStrategy::CancelAsyncRequest"));
  1079 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCHANGETFTSTRATEGY_CANCELASYNCREQUEST_4, "ERROR: Incorrect case in TChangeTftStrategy::CancelAsyncRequest");
  1074 			ASSERT(EFalse);
  1080 			ASSERT(EFalse);
  1075 			break;
  1081 			break;
  1076 		}
  1082 		}
  1077 	}
  1083 	}
  1078 
  1084 
  1085 @param aContext - pdp context
  1091 @param aContext - pdp context
  1086 @param aStatus - request status of this step
  1092 @param aStatus - request status of this step
  1087 */
  1093 */
  1088 void TActivatePdpStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1094 void TActivatePdpStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1089 	{
  1095 	{
  1090 	SPUDTEL_FNLOG("TActivatePdpStrategy::Next()");
  1096 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NEXT_1, "TActivatePdpStrategy::Next()");
  1091 	
  1097 	
  1092 	TInt err = KErrNone;
  1098 	TInt err = KErrNone;
  1093 	
  1099 	
  1094 	switch(aContext.StrategyStep())
  1100 	switch(aContext.StrategyStep())
  1095 		{
  1101 		{
  1163 			{
  1169 			{
  1164 			aContext.PdpFsmInterface().Set (aContext.Id(), aContext.ContextPacketDataConfigBase());
  1170 			aContext.PdpFsmInterface().Set (aContext.Id(), aContext.ContextPacketDataConfigBase());
  1165 			if (KPrimaryContextId == aContext.Id())
  1171 			if (KPrimaryContextId == aContext.Id())
  1166 				{
  1172 				{
  1167                 aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());	
  1173                 aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());	
  1168 #ifdef _DEBUG
  1174 #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
  1169                 aContext.DumpNegProfileParameters ();
  1175                 aContext.DumpNegProfileParameters ();
  1170 #endif
  1176 #endif
  1171                 aContext.SetStrategyStep (EGetProfileParamsStep);
  1177                 aContext.SetStrategyStep (EGetProfileParamsStep);
  1172                 }
  1178                 }
  1173 			else
  1179 			else
  1193 			break;
  1199 			break;
  1194 			}
  1200 			}
  1195 			
  1201 			
  1196 		default:
  1202 		default:
  1197 			// unexpected
  1203 			// unexpected
  1198 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1204 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NEXT_2, "ERROR: Incorrect case");
  1199 			ASSERT(EFalse);
  1205 			ASSERT(EFalse);
  1200 			err = KErrNotSupported;
  1206 			err = KErrNotSupported;
  1201 			break;
  1207 			break;
  1202 		}
  1208 		}
  1203 		
  1209 		
  1217 */	
  1223 */	
  1218 void TActivatePdpStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1224 void TActivatePdpStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1219 	{
  1225 	{
  1220 	if(aCompletionStatus == KErrNone)
  1226 	if(aCompletionStatus == KErrNone)
  1221 		{
  1227 		{
  1222 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set: DataChannelV2"));
  1228 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NOTIFYFSM_1, "FSM set: DataChannelV2");
  1223 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.DataChannelV2());
  1229 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.DataChannelV2());
  1224 
  1230 
  1225 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1231 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1226 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR5Negotiated"));
  1232 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NOTIFYFSM_2, "FSM set: QoSR5Negotiated");
  1227 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
  1233 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
  1228 
  1234 
  1229 #else
  1235 #else
  1230 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR99_R4Negotiated"));
  1236 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NOTIFYFSM_3, "FSM set: QoSR99_R4Negotiated");
  1231 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
  1237 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
  1232 #endif 
  1238 #endif 
  1233 // SYMBIAN_NETWORKING_UMTSR5
  1239 // SYMBIAN_NETWORKING_UMTSR5
  1234 
  1240 
  1235 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpActivated"));
  1241 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NOTIFYFSM_4, "Notifying FSM: EPdpActivated");
  1236 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivated);
  1242 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivated);
  1237 
  1243 
  1238 		}
  1244 		}
  1239 	else
  1245 	else
  1240 		{
  1246 		{
  1241 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpActivatedFailed"));
  1247 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_NOTIFYFSM_5, "Notifying FSM: EPdpActivatedFailed");
  1242 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivatedFailed, aCompletionStatus.Int());
  1248 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivatedFailed, aCompletionStatus.Int());
  1243 		}
  1249 		}
  1244 	}
  1250 	}
  1245 	
  1251 	
  1246 /** Cancels last asynchronous request to eTel
  1252 /** Cancels last asynchronous request to eTel
  1252 	switch(aContext.StrategyStep())
  1258 	switch(aContext.StrategyStep())
  1253 		{
  1259 		{
  1254 		case EActivateStep:
  1260 		case EActivateStep:
  1255 			{
  1261 			{
  1256 			aContext.PacketContext().CancelAsyncRequest(EPacketContextActivate);
  1262 			aContext.PacketContext().CancelAsyncRequest(EPacketContextActivate);
  1257 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextActivate"));
  1263 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_CANCELASYNCREQUEST_1, "Cancel PacketContext::EPacketContextActivate");
  1258 			break;
  1264 			break;
  1259 			}
  1265 			}
  1260 			
  1266 			
  1261 		case EGetConfigStep:
  1267 		case EGetConfigStep:
  1262 			{
  1268 			{
  1263 			aContext.PacketContext().CancelAsyncRequest(EGetConfigStep);
  1269 			aContext.PacketContext().CancelAsyncRequest(EGetConfigStep);
  1264 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EGetConfigStep"));
  1270 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketContext::EGetConfigStep");
  1265 			break;
  1271 			break;
  1266 			}
  1272 			}
  1267 		
  1273 		
  1268 		case EInitialiseContextStep:
  1274 		case EInitialiseContextStep:
  1269 			{
  1275 			{
  1270 			aContext.PacketContext().CancelAsyncRequest(EPacketContextInitialiseContext);	
  1276 			aContext.PacketContext().CancelAsyncRequest(EPacketContextInitialiseContext);	
  1271 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextInitialiseContext"));
  1277 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_CANCELASYNCREQUEST_3, "Cancel PacketContext::EPacketContextInitialiseContext");
  1272 			break;
  1278 			break;
  1273 			}
  1279 			}
  1274 			
  1280 			
  1275 		case EGetProfileParamsStep:
  1281 		case EGetProfileParamsStep:
  1276 			{
  1282 			{
  1277 			if(KPrimaryContextId == aContext.Id())
  1283 			if(KPrimaryContextId == aContext.Id())
  1278 				{
  1284 				{
  1279 				aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);	
  1285 				aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);	
  1280 				SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSGetProfileParams"));
  1286 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_CANCELASYNCREQUEST_4, "Cancel PacketContext::EPacketQoSGetProfileParams");
  1281 				break;
  1287 				break;
  1282 				}
  1288 				}
  1283 			}
  1289 			}
  1284 			
  1290 			
  1285 		default:
  1291 		default:
  1286 			// unexpected
  1292 			// unexpected
  1287 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TActivatePdpStrategy::CancelAsyncRequest"));
  1293 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEPDPSTRATEGY_CANCELASYNCREQUEST_5, "ERROR: Incorrect case in TActivatePdpStrategy::CancelAsyncRequest");
  1288 			ASSERT(EFalse);
  1294 			ASSERT(EFalse);
  1289 			break;
  1295 			break;
  1290 		}
  1296 		}
  1291 	}
  1297 	}
  1292 
  1298 
  1298 @param aContext - pdp context
  1304 @param aContext - pdp context
  1299 @param aStatus - request status of this step
  1305 @param aStatus - request status of this step
  1300 */
  1306 */
  1301 void TGetNegQoSStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1307 void TGetNegQoSStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1302 	{
  1308 	{
  1303 	SPUDTEL_FNLOG("TGetNegQoSStrategy::Next()");
  1309 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_NEXT_1, "TGetNegQoSStrategy::Next()");
  1304 	
  1310 	
  1305 	TInt err = KErrNone;
  1311 	TInt err = KErrNone;
  1306 	
  1312 	
  1307 	switch(aContext.StrategyStep())
  1313 	switch(aContext.StrategyStep())
  1308 		{
  1314 		{
  1309 		case EStartStep:
  1315 		case EStartStep:
  1310 			{
  1316 			{
  1311 			aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
  1317 			aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
  1312 #ifdef _DEBUG
  1318 #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
  1313             aContext.DumpNegProfileParameters ();
  1319             aContext.DumpNegProfileParameters ();
  1314 #endif
  1320 #endif
  1315 			aContext.SetStrategyStep (EGetProfileParamsStep);
  1321 			aContext.SetStrategyStep (EGetProfileParamsStep);
  1316 			break;
  1322 			break;
  1317 			}
  1323 			}
  1322 			break;
  1328 			break;
  1323 			}
  1329 			}
  1324 			
  1330 			
  1325 		default:
  1331 		default:
  1326 			// unexpected
  1332 			// unexpected
  1327 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1333 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_NEXT_2, "ERROR: Incorrect case");
  1328 			ASSERT(EFalse);
  1334 			ASSERT(EFalse);
  1329 			err = KErrNotSupported;
  1335 			err = KErrNotSupported;
  1330 			break;
  1336 			break;
  1331 		}
  1337 		}
  1332 		
  1338 		
  1347 void TGetNegQoSStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1353 void TGetNegQoSStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1348 	{
  1354 	{
  1349 	if(aCompletionStatus == KErrNone)
  1355 	if(aCompletionStatus == KErrNone)
  1350 		{
  1356 		{
  1351 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1357 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1352 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR5Negotiated"));
  1358 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_NOTIFYFSM_1, "FSM set: QoSR5Negotiated");
  1353 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
  1359 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
  1354 
  1360 
  1355 #else
  1361 #else
  1356 // !SYMBIAN_NETWORKING_UMTSR5
  1362 // !SYMBIAN_NETWORKING_UMTSR5
  1357 
  1363 
  1358 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR99_R4Negotiated"));
  1364 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_NOTIFYFSM_2, "FSM set: QoSR99_R4Negotiated");
  1359 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
  1365 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
  1360 #endif
  1366 #endif
  1361 // SYMBIAN_NETWORKING_UMTSR5
  1367 // SYMBIAN_NETWORKING_UMTSR5
  1362 		
  1368 		
  1363 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpNegQoSRetrieved"));
  1369 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_NOTIFYFSM_3, "Notifying FSM: EPdpNegQoSRetrieved");
  1364 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpNegQoSRetrieved);
  1370 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpNegQoSRetrieved);
  1365 		}
  1371 		}
  1366 	else
  1372 	else
  1367 		{
  1373 		{
  1368 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpNegQoSRetrievedFailed"));
  1374 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_NOTIFYFSM_4, "Notifying FSM: EPdpNegQoSRetrievedFailed");
  1369 	 	aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpNegQoSRetrievedFailed, aCompletionStatus.Int());
  1375 	 	aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpNegQoSRetrievedFailed, aCompletionStatus.Int());
  1370 		}
  1376 		}
  1371 	}
  1377 	}
  1372 	
  1378 	
  1373 /** Cancels last asynchronous request to eTel
  1379 /** Cancels last asynchronous request to eTel
  1379 	switch(aContext.StrategyStep())
  1385 	switch(aContext.StrategyStep())
  1380 		{	
  1386 		{	
  1381 		case EGetProfileParamsStep:
  1387 		case EGetProfileParamsStep:
  1382 			{
  1388 			{
  1383 			aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);	
  1389 			aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);	
  1384 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSGetProfileParams"));
  1390 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_CANCELASYNCREQUEST_1, "Cancel PacketContext::EPacketQoSGetProfileParams");
  1385 			break;
  1391 			break;
  1386 			}
  1392 			}
  1387 			
  1393 			
  1388 		default:
  1394 		default:
  1389 			// unexpected
  1395 			// unexpected
  1390 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TGetNegQoSStrategy::CancelAsyncRequest"));
  1396 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TGETNEGQOSSTRATEGY_CANCELASYNCREQUEST_2, "ERROR: Incorrect case in TGetNegQoSStrategy::CancelAsyncRequest");
  1391 			ASSERT(EFalse);
  1397 			ASSERT(EFalse);
  1392 			break;
  1398 			break;
  1393 		}
  1399 		}
  1394 	}
  1400 	}
  1395 
  1401 
  1402 @param aContext - pdp context
  1408 @param aContext - pdp context
  1403 @param aStatus - request status of this step
  1409 @param aStatus - request status of this step
  1404 */
  1410 */
  1405 void TModifyActiveStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1411 void TModifyActiveStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1406 	{
  1412 	{
  1407 	SPUDTEL_FNLOG("TModifyActiveStrategy::Next()");
  1413 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_NEXT_1, "TModifyActiveStrategy::Next()");
  1408 	
  1414 	
  1409 	TInt err = KErrNone;
  1415 	TInt err = KErrNone;
  1410 	
  1416 	
  1411 	switch(aContext.StrategyStep())
  1417 	switch(aContext.StrategyStep())
  1412 		{
  1418 		{
  1427 			}
  1433 			}
  1428 		
  1434 		
  1429 		case EModifyActiveStep:
  1435 		case EModifyActiveStep:
  1430 			{
  1436 			{
  1431 			aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
  1437 			aContext.PacketQoS().GetProfileParameters (*aStatus, aContext.QosNegotiatedPckg());
  1432 #ifdef _DEBUG
  1438 #if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
  1433             aContext.DumpNegProfileParameters ();
  1439             aContext.DumpNegProfileParameters ();
  1434 #endif
  1440 #endif
  1435 			aContext.SetStrategyStep (EGetProfileParamsStep);
  1441 			aContext.SetStrategyStep (EGetProfileParamsStep);
  1436 			break;
  1442 			break;
  1437 			}
  1443 			}
  1442 			break;
  1448 			break;
  1443 			}
  1449 			}
  1444 			
  1450 			
  1445 		default:
  1451 		default:
  1446 			// unexpected
  1452 			// unexpected
  1447 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1453 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_NEXT_2, "ERROR: Incorrect case");
  1448 			ASSERT(EFalse);
  1454 			ASSERT(EFalse);
  1449 			err = KErrNotSupported;
  1455 			err = KErrNotSupported;
  1450 			break;
  1456 			break;
  1451 		}
  1457 		}
  1452 		
  1458 		
  1469 	if(aCompletionStatus == KErrNone)
  1475 	if(aCompletionStatus == KErrNone)
  1470 		{
  1476 		{
  1471 		if(aContext.ContextType() != SpudMan::EMbms)
  1477 		if(aContext.ContextType() != SpudMan::EMbms)
  1472 			{
  1478 			{
  1473 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1479 #ifdef SYMBIAN_NETWORKING_UMTSR5
  1474 			SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR5Negotiated"));
  1480 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_NOTIFYFSM_1, "FSM set: QoSR5Negotiated");
  1475 			aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
  1481 			aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR5());
  1476 
  1482 
  1477 #else
  1483 #else
  1478 			SPUDTELVERBOSE_INFO_LOG(_L("FSM set: QoSR99_R4Negotiated"));
  1484 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_NOTIFYFSM_2, "FSM set: QoSR99_R4Negotiated");
  1479  			aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
  1485  			aContext.PdpFsmInterface().Set(aContext.Id(), aContext.QosNegotiated().NegotiatedQoSR99_R4());
  1480 #endif 
  1486 #endif 
  1481 // SYMBIAN_NETWORKING_UMTSR5
  1487 // SYMBIAN_NETWORKING_UMTSR5
  1482 			}
  1488 			}
  1483 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpContextModified"));
  1489 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_NOTIFYFSM_3, "Notifying FSM: EPdpContextModified");
  1484 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpContextModified);
  1490 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpContextModified);
  1485 
  1491 
  1486 		}
  1492 		}
  1487 	else
  1493 	else
  1488 		{
  1494 		{
  1489 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpContextModifiedFailed"));
  1495 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_NOTIFYFSM_4, "Notifying FSM: EPdpContextModifiedFailed");
  1490 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpContextModifiedFailed, aCompletionStatus.Int());
  1496 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpContextModifiedFailed, aCompletionStatus.Int());
  1491 		}
  1497 		}
  1492 	}
  1498 	}
  1493 	
  1499 	
  1494 /** Cancels last asynchronous request to eTel
  1500 /** Cancels last asynchronous request to eTel
  1500 	switch(aContext.StrategyStep())
  1506 	switch(aContext.StrategyStep())
  1501 		{
  1507 		{
  1502 		case EModifyActiveStep:
  1508 		case EModifyActiveStep:
  1503 			{
  1509 			{
  1504 			aContext.PacketContext().CancelAsyncRequest(EPacketContextModifyActiveContext);
  1510 			aContext.PacketContext().CancelAsyncRequest(EPacketContextModifyActiveContext);
  1505 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextModifyActiveContext"));
  1511 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_CANCELASYNCREQUEST_1, "Cancel PacketContext::EPacketContextModifyActiveContext");
  1506 			break;
  1512 			break;
  1507 			}
  1513 			}
  1508 			
  1514 			
  1509 		case EGetProfileParamsStep:
  1515 		case EGetProfileParamsStep:
  1510 			{
  1516 			{
  1511 			aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);
  1517 			aContext.PacketContext().CancelAsyncRequest(EPacketQoSGetProfileParams);
  1512 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketQoSGetProfileParams"));
  1518 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketContext::EPacketQoSGetProfileParams");
  1513 			break;
  1519 			break;
  1514 			}
  1520 			}
  1515 			
  1521 			
  1516 		default:
  1522 		default:
  1517 			// unexpected
  1523 			// unexpected
  1518 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TModifyActiveStrategy::CancelAsyncRequest"));
  1524 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMODIFYACTIVESTRATEGY_CANCELASYNCREQUEST_3, "ERROR: Incorrect case in TModifyActiveStrategy::CancelAsyncRequest");
  1519 			ASSERT(EFalse);
  1525 			ASSERT(EFalse);
  1520 			break;
  1526 			break;
  1521 		}
  1527 		}
  1522 	}
  1528 	}
  1523 
  1529 
  1536 @param aContext - pdp context
  1542 @param aContext - pdp context
  1537 @param aStatus - request status of this step
  1543 @param aStatus - request status of this step
  1538 */
  1544 */
  1539 void TCreateMbmsPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1545 void TCreateMbmsPdpContextStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1540 	{
  1546 	{
  1541 	SPUDTEL_FNLOG("TCreateMbmsPdpContextStrategy::Next()");
  1547 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_NEXT_1, "TCreateMbmsPdpContextStrategy::Next()");
  1542 	
  1548 	
  1543 	TInt err = KErrNone;
  1549 	TInt err = KErrNone;
  1544 	
  1550 	
  1545 	// possible steps:
  1551 	// possible steps:
  1546 	// 	-- open new context
  1552 	// 	-- open new context
  1551 		case EStartStep:
  1557 		case EStartStep:
  1552 			{
  1558 			{
  1553 			err = aContext.MbmsPacketContext().OpenNewContext (aContext.PacketService(), aContext.Name());
  1559 			err = aContext.MbmsPacketContext().OpenNewContext (aContext.PacketService(), aContext.Name());
  1554 			if (err)
  1560 			if (err)
  1555 				{
  1561 				{
  1556 				SPUDTEL_ERROR_LOG(_L("PacketContextOpenNewContext returned for MBMS %d"), err);
  1562 				OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_NEXT_2, "PacketContextOpenNewContext returned for MBMS %d", err);
  1557 				break;
  1563 				break;
  1558 				}
  1564 				}
  1559 				
  1565 				
  1560 			aContext.MbmsPacketContext().InitialiseContext(*aStatus, aContext.DataChannelV2Pckg());						
  1566 			aContext.MbmsPacketContext().InitialiseContext(*aStatus, aContext.DataChannelV2Pckg());						
  1561 			aContext.SetStrategyStep (EInitialiseContextStep);
  1567 			aContext.SetStrategyStep (EInitialiseContextStep);
  1575 		case ESetConfigStep:
  1581 		case ESetConfigStep:
  1576 			aContext.SetStrategyStep (EFinishStep);
  1582 			aContext.SetStrategyStep (EFinishStep);
  1577 			break;	
  1583 			break;	
  1578 	
  1584 	
  1579 		default:
  1585 		default:
  1580 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1586 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_NEXT_3, "ERROR: Incorrect case");
  1581 			ASSERT(EFalse);
  1587 			ASSERT(EFalse);
  1582 			err = KErrNotSupported;
  1588 			err = KErrNotSupported;
  1583 			break;
  1589 			break;
  1584 		}
  1590 		}
  1585 		
  1591 		
  1599 */	
  1605 */	
  1600 void TCreateMbmsPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
  1606 void TCreateMbmsPdpContextStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus)
  1601 {
  1607 {
  1602 	if(aCompletionStatus == KErrNone)
  1608 	if(aCompletionStatus == KErrNone)
  1603 		{
  1609 		{
  1604 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EMbmsPdpContextCreated"));
  1610 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_NOTIFYFSM_1, "Notifying FSM: EMbmsPdpContextCreated");
  1605 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EMbmsPdpContextCreated);
  1611 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EMbmsPdpContextCreated);
  1606 		}
  1612 		}
  1607 	else
  1613 	else
  1608 		{
  1614 		{
  1609 		SPUDTEL_INFO_LOG(_L("Notifying FSM: E1ryPdpContextCreatedFailed"));
  1615 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_NOTIFYFSM_2, "Notifying FSM: E1ryPdpContextCreatedFailed");
  1610 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EMbmsPdpContextCreatedFailed, aCompletionStatus.Int());
  1616 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EMbmsPdpContextCreatedFailed, aCompletionStatus.Int());
  1611 		}
  1617 		}
  1612 }
  1618 }
  1613 
  1619 
  1614 /** Cancels last asynchronous request to eTel
  1620 /** Cancels last asynchronous request to eTel
  1615 
  1621 
  1616 @param  aContext - pdp context
  1622 @param  aContext - pdp context
  1617 */
  1623 */
  1618 void TCreateMbmsPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
  1624 void TCreateMbmsPdpContextStrategy::CancelAsyncRequest(CEtelDriverContext& aContext)
  1619 	{
  1625 	{
  1620 	SPUDTEL_FNLOG("TCreate1ryPdpContextStrategy::CancelAsyncRequest()");
  1626 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_1, "TCreate1ryPdpContextStrategy::CancelAsyncRequest()");
  1621 	
  1627 	
  1622 	switch(aContext.StrategyStep())
  1628 	switch(aContext.StrategyStep())
  1623 		{
  1629 		{
  1624 		case ESetConfigStep:
  1630 		case ESetConfigStep:
  1625 			{
  1631 			{
  1626 			SPUDTEL_INFO_LOG(_L("Cancel PacketContext::EPacketContextSetConfig"));
  1632 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_2, "Cancel PacketContext::EPacketContextSetConfig");
  1627 			aContext.PacketContext().CancelAsyncRequest(EPacketContextSetConfig);
  1633 			aContext.PacketContext().CancelAsyncRequest(EPacketContextSetConfig);
  1628 			break;
  1634 			break;
  1629 			}
  1635 			}
  1630 			
  1636 			
  1631 		default:
  1637 		default:
  1632 			// there're NO outstanding async requests
  1638 			// there're NO outstanding async requests
  1633 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1639 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TCREATEMBMSPDPCONTEXTSTRATEGY_CANCELASYNCREQUEST_3, "ERROR: Incorrect case");
  1634 			ASSERT(EFalse);
  1640 			ASSERT(EFalse);
  1635 			break;
  1641 			break;
  1636 		}
  1642 		}
  1637 	}
  1643 	}
  1638 
  1644 
  1645 @param aContext - pdp context
  1651 @param aContext - pdp context
  1646 @param aStatus - request status of this step
  1652 @param aStatus - request status of this step
  1647 */
  1653 */
  1648 void TActivateMbmsPdpStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1654 void TActivateMbmsPdpStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1649 	{
  1655 	{
  1650 	SPUDTEL_FNLOG("TActivatePdpStrategy::Next()");
  1656 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_NEXT_1, "TActivatePdpStrategy::Next()");
  1651 	
  1657 	
  1652 	TInt err = KErrNone;
  1658 	TInt err = KErrNone;
  1653 	
  1659 	
  1654 	switch(aContext.StrategyStep())
  1660 	switch(aContext.StrategyStep())
  1655 		{
  1661 		{
  1688 			break;
  1694 			break;
  1689 			}
  1695 			}
  1690 			
  1696 			
  1691 		default:
  1697 		default:
  1692 			// unexpected
  1698 			// unexpected
  1693 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case"));
  1699 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_NEXT_2, "ERROR: Incorrect case");
  1694 			ASSERT(EFalse);
  1700 			ASSERT(EFalse);
  1695 			err = KErrNotSupported;
  1701 			err = KErrNotSupported;
  1696 			break;
  1702 			break;
  1697 		}
  1703 		}
  1698 		
  1704 		
  1712 */	
  1718 */	
  1713 void TActivateMbmsPdpStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1719 void TActivateMbmsPdpStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1714 	{
  1720 	{
  1715 	if(aCompletionStatus == KErrNone)
  1721 	if(aCompletionStatus == KErrNone)
  1716 		{
  1722 		{
  1717 		SPUDTELVERBOSE_INFO_LOG(_L("FSM set: DataChannelV2"));
  1723 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_NOTIFYFSM_1, "FSM set: DataChannelV2");
  1718 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.DataChannelV2());
  1724 		aContext.PdpFsmInterface().Set(aContext.Id(), aContext.DataChannelV2());
  1719 
  1725 
  1720 
  1726 
  1721 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpActivated"));
  1727 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_NOTIFYFSM_2, "Notifying FSM: EPdpActivated");
  1722 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivated);
  1728 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivated);
  1723 		}
  1729 		}
  1724 	else
  1730 	else
  1725 		{
  1731 		{
  1726 		SPUDTEL_INFO_LOG(_L("Notifying FSM: EPdpActivatedFailed"));
  1732 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_NOTIFYFSM_3, "Notifying FSM: EPdpActivatedFailed");
  1727 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivatedFailed, aCompletionStatus.Int());
  1733 		aContext.PdpFsmInterface().Input(aContext.Id(), PdpFsm::EPdpActivatedFailed, aCompletionStatus.Int());
  1728 		}
  1734 		}
  1729 	}
  1735 	}
  1730 	
  1736 	
  1731 /** Cancels last asynchronous request to eTel
  1737 /** Cancels last asynchronous request to eTel
  1737 	switch(aContext.StrategyStep())
  1743 	switch(aContext.StrategyStep())
  1738 		{
  1744 		{
  1739 		case EActivateStep:
  1745 		case EActivateStep:
  1740 			{
  1746 			{
  1741 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextActivate);
  1747 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextActivate);
  1742 			SPUDTEL_INFO_LOG(_L("Cancel MbmsPacketContext::EPacketContextActivate"));
  1748 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_CANCELASYNCREQUEST_1, "Cancel MbmsPacketContext::EPacketContextActivate");
  1743 			break;
  1749 			break;
  1744 			}
  1750 			}
  1745 		
  1751 		
  1746 		case EGetConfigStep:
  1752 		case EGetConfigStep:
  1747 			{
  1753 			{
  1748 			aContext.MbmsPacketContext().CancelAsyncRequest(EGetConfigStep);
  1754 			aContext.MbmsPacketContext().CancelAsyncRequest(EGetConfigStep);
  1749 			SPUDTEL_INFO_LOG(_L("Cancel MbmsPacketContext::EGetConfigStep"));
  1755 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_CANCELASYNCREQUEST_2, "Cancel MbmsPacketContext::EGetConfigStep");
  1750 			break;
  1756 			break;
  1751 			}
  1757 			}
  1752 		
  1758 		
  1753 		case EInitialiseContextStep:
  1759 		case EInitialiseContextStep:
  1754 			{
  1760 			{
  1755 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextInitialiseContext);	
  1761 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextInitialiseContext);	
  1756 			SPUDTEL_INFO_LOG(_L("Cancel MbmsPacketContext::EPacketContextInitialiseContext"));
  1762 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_CANCELASYNCREQUEST_3, "Cancel MbmsPacketContext::EPacketContextInitialiseContext");
  1757 			break;
  1763 			break;
  1758 			}
  1764 			}
  1759 			
  1765 			
  1760 					
  1766 					
  1761 		default:
  1767 		default:
  1762 			// unexpected
  1768 			// unexpected
  1763 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TActivatePdpStrategy::CancelAsyncRequest"));
  1769 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TACTIVATEMBMSPDPSTRATEGY_CANCELASYNCREQUEST_4, "ERROR: Incorrect case in TActivatePdpStrategy::CancelAsyncRequest");
  1764 			ASSERT(EFalse);
  1770 			ASSERT(EFalse);
  1765 			break;
  1771 			break;
  1766 		}
  1772 		}
  1767 	}
  1773 	}
  1768 	
  1774 	
  1774 @param aContext - pdp context
  1780 @param aContext - pdp context
  1775 @param aStatus - request status of this step
  1781 @param aStatus - request status of this step
  1776 */	
  1782 */	
  1777 void TMbmsSessionUpdateStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1783 void TMbmsSessionUpdateStrategy::Next(CEtelDriverContext& aContext, TRequestStatus* aStatus)
  1778 	{
  1784 	{
  1779 	SPUDTEL_FNLOG("TMbmsSessionUpdateStrategy::Next()");
  1785 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMBMSSESSIONUPDATESTRATEGY_NEXT_1, "TMbmsSessionUpdateStrategy::Next()");
  1780 	
  1786 	
  1781 	TInt err = KErrNone;
  1787 	TInt err = KErrNone;
  1782 	switch(aContext.StrategyStep())
  1788 	switch(aContext.StrategyStep())
  1783 		{
  1789 		{
  1784 		case EStartStep:
  1790 		case EStartStep:
  1882 */		
  1888 */		
  1883 void TMbmsSessionUpdateStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1889 void TMbmsSessionUpdateStrategy::NotifyFsm(CEtelDriverContext& aContext, TRequestStatus& aCompletionStatus )
  1884 	{
  1890 	{
  1885 		if(aCompletionStatus == KErrNone)
  1891 		if(aCompletionStatus == KErrNone)
  1886 		{
  1892 		{
  1887 		SPUDTEL_INFO_LOG(_L("Notifying FSM: TMbmsSessionUpdateStrategy"));
  1893 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMBMSSESSIONUPDATESTRATEGY_NOTIFYFSM_1, "Notifying FSM: TMbmsSessionUpdateStrategy");
  1888 		aContext.PdpFsmInterface().Input(aContext.Id(), SpudMan::EMbmsParameterUpdate);
  1894 		aContext.PdpFsmInterface().Input(aContext.Id(), SpudMan::EMbmsParameterUpdate);
  1889 		}
  1895 		}
  1890 	else
  1896 	else
  1891 		{
  1897 		{
  1892 		SPUDTEL_INFO_LOG(_L("Notifying FSM: TMbmsSessionUpdateStrategy"));
  1898 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMBMSSESSIONUPDATESTRATEGY_NOTIFYFSM_2, "Notifying FSM: TMbmsSessionUpdateStrategy");
  1893 		aContext.PdpFsmInterface().Input(aContext.Id(), SpudMan::EMbmsParameterUpdate, aCompletionStatus.Int());
  1899 		aContext.PdpFsmInterface().Input(aContext.Id(), SpudMan::EMbmsParameterUpdate, aCompletionStatus.Int());
  1894 		}
  1900 		}
  1895 	}
  1901 	}
  1896 /** Cancels last asynchronous request to eTel
  1902 /** Cancels last asynchronous request to eTel
  1897 
  1903 
  1903 	switch(aContext.StrategyStep())
  1909 	switch(aContext.StrategyStep())
  1904 		{
  1910 		{
  1905 		case EUpdateMbmsSessionList:
  1911 		case EUpdateMbmsSessionList:
  1906 			{
  1912 			{
  1907 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextSetConfig);
  1913 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextSetConfig);
  1908 			SPUDTEL_INFO_LOG(_L("Cancel MbmsPacketContext::EUpdateMbmsSessionList"));
  1914 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMBMSSESSIONUPDATESTRATEGY_CANCELASYNCREQUEST_1, "Cancel MbmsPacketContext::EUpdateMbmsSessionList");
  1909 			break;
  1915 			break;
  1910 			}
  1916 			}
  1911 		
  1917 		
  1912 		case EPrepareSessionList:
  1918 		case EPrepareSessionList:
  1913 			{
  1919 			{
  1914 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextSetConfig);
  1920 			aContext.MbmsPacketContext().CancelAsyncRequest(EPacketContextSetConfig);
  1915 			SPUDTEL_INFO_LOG(_L("Cancel MbmsPacketContext::EPrepareSessionList"));
  1921 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMBMSSESSIONUPDATESTRATEGY_CANCELASYNCREQUEST_2, "Cancel MbmsPacketContext::EPrepareSessionList");
  1916 			break;
  1922 			break;
  1917 			}
  1923 			}
  1918 								
  1924 								
  1919 		default:
  1925 		default:
  1920 			// unexpected
  1926 			// unexpected
  1921 			SPUDTEL_ERROR_LOG0(_L("ERROR: Incorrect case in TMbmsSessionUpdateStrategy::CancelAsyncRequest"));
  1927 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, TMBMSSESSIONUPDATESTRATEGY_CANCELASYNCREQUEST_3, "ERROR: Incorrect case in TMbmsSessionUpdateStrategy::CancelAsyncRequest");
  1922 			ASSERT(EFalse);
  1928 			ASSERT(EFalse);
  1923 			break;
  1929 			break;
  1924 		}
  1930 		}
  1925 	
  1931 	
  1926 	}
  1932 	}