telephonyserverplugins/simtsy/src/CSimPacketContext.cpp
branchRCL_3
changeset 19 630d2f34d719
parent 3 962e6306d9d2
child 20 07a122eea281
equal deleted inserted replaced
18:17af172ffa5f 19:630d2f34d719
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-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".
    17 
    17 
    18 /**
    18 /**
    19  @file
    19  @file
    20 */
    20 */
    21 
    21 
    22 #include "Simlog.h"
    22 
       
    23 
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "CSimPacketContextTraces.h"
       
    27 #endif
       
    28 
    23 #include "CSimPhone.h"
    29 #include "CSimPhone.h"
    24 #include "CSimPacketContext.h"
    30 #include "CSimPacketContext.h"
    25 #include "CSimPacketService.h"
    31 #include "CSimPacketService.h"
    26 #include "CSimPacketQoS.h"
    32 #include "CSimPacketQoS.h"
    27 #include "utils.h"
    33 #include "utils.h"
   120 * Constructs all the member data and retrieves all the data from the config file specific to this class.
   126 * Constructs all the member data and retrieves all the data from the config file specific to this class.
   121 *
   127 *
   122 * @leave Leaves no memory or any data member does not construct for any reason.
   128 * @leave Leaves no memory or any data member does not construct for any reason.
   123 */
   129 */
   124 	{
   130 	{
   125 	LOGPACKET1("CSimPacketContext: Entered constructor");
   131 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_1, "CSimPacketContext: Entered constructor");
   126 
   132 
   127 	iSetConfigData = new (ELeave) CArrayFixFlat<TSetConfigData>(1);
   133 	iSetConfigData = new (ELeave) CArrayFixFlat<TSetConfigData>(1);
   128 	iNotifyContextConfigChangeArray = new (ELeave) CArrayFixFlat<TNotifyContextConfigChangeData>(1);
   134 	iNotifyContextConfigChangeArray = new (ELeave) CArrayFixFlat<TNotifyContextConfigChangeData>(1);
   129 	iContextConfigParams = new (ELeave) CArrayFixFlat<TContextConfigParam>(KNumberofConfigs);
   135 	iContextConfigParams = new (ELeave) CArrayFixFlat<TContextConfigParam>(KNumberofConfigs);
   130 	iAuthorizationTokenResponse = new (ELeave) CArrayFixFlat<TAuthorizationTokenResponse>(KNumberofConfigs);
   136 	iAuthorizationTokenResponse = new (ELeave) CArrayFixFlat<TAuthorizationTokenResponse>(KNumberofConfigs);
   137 	iInitContextTimer = CSimTimer::NewL(iPhone);
   143 	iInitContextTimer = CSimTimer::NewL(iPhone);
   138 	iCreateTftTimer = CSimTimer::NewL(iPhone);
   144 	iCreateTftTimer = CSimTimer::NewL(iPhone);
   139 	iNotifyContextConfigChangeTimer= CSimTimer::NewL(iPhone);
   145 	iNotifyContextConfigChangeTimer= CSimTimer::NewL(iPhone);
   140 	iContextStatusChange = CSimPubSubChange::NewL(this, CSimPubSub::TPubSubProperty(KUidPSSimTsyCategory, KPSSimtsyPacketContextStatusChange, KPSSimtsyPacketContextStatusChangeKeyType));
   146 	iContextStatusChange = CSimPubSubChange::NewL(this, CSimPubSub::TPubSubProperty(KUidPSSimTsyCategory, KPSSimtsyPacketContextStatusChange, KPSSimtsyPacketContextStatusChangeKeyType));
   141 
   147 
   142 	LOGPACKET1("Starting to Load and Parse Packet Context the Config File");
   148 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_2, "Starting to Load and Parse Packet Context the Config File");
   143 
   149 
   144 	GetCommSetupSettingsL();
   150 	GetCommSetupSettingsL();
   145 	GetContextConfigParamSettingsL(KSetContextConfigGPRS());
   151 	GetContextConfigParamSettingsL(KSetContextConfigGPRS());
   146 	GetContextConfigParamSettingsL(KSetContextConfigRel99());
   152 	GetContextConfigParamSettingsL(KSetContextConfigRel99());
   147 	GetContextConfigParamSettingsL(KSetContextConfigRel5());
   153 	GetContextConfigParamSettingsL(KSetContextConfigRel5());
   175 		
   181 		
   176 		TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,authorizationToken);
   182 		TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,authorizationToken);
   177 
   183 
   178 		if(ret!=KErrNone)
   184 		if(ret!=KErrNone)
   179 			{
   185 			{
   180 			LOGPARSERR("CTFTMediaAuthorizationV3::authorizationToken",ret,0,&KAuthorizationToken);
   186 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element CTFTMEDIAAUTHORIZATIONV3::AUTHORIZATIONTOKEN returned %d (element no. %d) from tag %s.",ret,0,KAuthorizationToken);
   181             CleanupStack::PopAndDestroy(mediaAuthorization);			
   187             CleanupStack::PopAndDestroy(mediaAuthorization);			
   182 			continue;
   188 			continue;
   183 			}
   189 			}
   184 		else
   190 		else
   185 			{
   191 			{
   189 			
   195 			
   190 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,desiredResponse);
   196 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,desiredResponse);
   191 
   197 
   192 		if(ret!=KErrNone || desiredResponse > 0)
   198 		if(ret!=KErrNone || desiredResponse > 0)
   193 			{
   199 			{
   194 			LOGPARSERR("desiredResponse",ret,1,&KAuthorizationToken);
   200 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element DESIREDRESPONSE returned %d (element no. %d) from tag %s.",ret,1,KAuthorizationToken);
   195 	        CleanupStack::PopAndDestroy(mediaAuthorization);
   201 	        CleanupStack::PopAndDestroy(mediaAuthorization);
   196 			continue;
   202 			continue;
   197 			}
   203 			}
   198 		else
   204 		else
   199 			{
   205 			{
   217 		
   223 		
   218 			ret=CTestConfig::GetElement(item2->Value(),KStdDelimiter,0,mediaComponentNumber);
   224 			ret=CTestConfig::GetElement(item2->Value(),KStdDelimiter,0,mediaComponentNumber);
   219 
   225 
   220 			if(ret!=KErrNone || mediaComponentNumber < 0)
   226 			if(ret!=KErrNone || mediaComponentNumber < 0)
   221 				{
   227 				{
   222 				LOGPARSERR("CTFTMediaAuthorizationV3::mediaComponentNumber",ret,0,&KFlowIdentifier);
   228 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element CTFTMEDIAAUTHORIZATIONV3::MEDIACOMPONENTNUMBER returned %d (element no. %d) from tag %s.",ret,0,KFlowIdentifier);
   223 				continue;
   229 				continue;
   224 				}
   230 				}
   225 			else
   231 			else
   226 				{
   232 				{
   227 				iFlowIdentifier.iMediaComponentNumber = mediaComponentNumber;
   233 				iFlowIdentifier.iMediaComponentNumber = mediaComponentNumber;
   229 				
   235 				
   230 			ret=CTestConfig::GetElement(item2->Value(),KStdDelimiter,1,IPFlowNumber);
   236 			ret=CTestConfig::GetElement(item2->Value(),KStdDelimiter,1,IPFlowNumber);
   231 
   237 
   232 			if(ret!=KErrNone || IPFlowNumber < 0)
   238 			if(ret!=KErrNone || IPFlowNumber < 0)
   233 				{
   239 				{
   234 				LOGPARSERR("CTFTMediaAuthorizationV3::IPFlowNumber",ret,1,&KFlowIdentifier);
   240 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element CTFTMEDIAAUTHORIZATIONV3::IPFLOWNUMBER returned %d (element no. %d) from tag %s.",ret,1,KFlowIdentifier);
   235 				continue;
   241 				continue;
   236 				}
   242 				}
   237 			else
   243 			else
   238 				{
   244 				{
   239 				iFlowIdentifier.iIPFlowNumber = IPFlowNumber;
   245 				iFlowIdentifier.iIPFlowNumber = IPFlowNumber;
   244 		itemOffSet+=numberOfFlowIds;
   250 		itemOffSet+=numberOfFlowIds;
   245 		iMediaAuthorization->AppendL(*mediaAuthorization); // Add completed media authorization to array
   251 		iMediaAuthorization->AppendL(*mediaAuthorization); // Add completed media authorization to array
   246         CleanupStack::Pop(mediaAuthorization);		
   252         CleanupStack::Pop(mediaAuthorization);		
   247 		}
   253 		}
   248 
   254 
   249 	LOGPACKET1("...Finished parsing Packet Context config parameters...");
   255 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTL_7, "...Finished parsing Packet Context config parameters...");
   250 	}	
   256 	}	
   251 
   257 
   252 void CSimPacketContext::GetCommSetupSettingsL()
   258 void CSimPacketContext::GetCommSetupSettingsL()
   253 	{
   259 	{
   254 	iCommSetupArray = new (ELeave) CArrayFixFlat<TCommSetupItem>(KNumberofConfigs);
   260 	iCommSetupArray = new (ELeave) CArrayFixFlat<TCommSetupItem>(KNumberofConfigs);
   281 			TInt commReset, numInitializeFailures, errorCode, delay;
   287 			TInt commReset, numInitializeFailures, errorCode, delay;
   282 
   288 
   283 			TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,csyName);
   289 			TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,csyName);
   284 			if(ret!=KErrNone)
   290 			if(ret!=KErrNone)
   285 				{
   291 				{
   286 				LOGPARSERR("CommSetUp::csyName",ret,0,&KCommSetup);
   292 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCOMMSETUPSETTINGSL_1, "WARNING - CONFIGURATION FILE PARSING - Reading element COMMSETUP::CSYNAME returned %d (element no. %d) from tag %s.",ret,0,KCommSetup);
   287 				comm.iCsyName.Copy(KDefaultCsyName);
   293 				comm.iCsyName.Copy(KDefaultCsyName);
   288 				}
   294 				}
   289 			else
   295 			else
   290 				comm.iCsyName.Copy(csyName);
   296 				comm.iCsyName.Copy(csyName);
   291 
   297 
   292 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,portName);
   298 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,portName);
   293 			if(ret!=KErrNone)
   299 			if(ret!=KErrNone)
   294 				{
   300 				{
   295 				LOGPARSERR("CommSetUp::portName",ret,1,&KCommSetup);
   301 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCOMMSETUPSETTINGSL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element COMMSETUP::PORTNAME returned %d (element no. %d) from tag %s.",ret,1,KCommSetup);
   296 				comm.iPortName.Copy(KDefaultPortName);
   302 				comm.iPortName.Copy(KDefaultPortName);
   297 				}
   303 				}
   298 			else
   304 			else
   299 				comm.iPortName.Copy(portName);
   305 				comm.iPortName.Copy(portName);
   300 
   306 
   301 			TInt dataRate,handshake;
   307 			TInt dataRate,handshake;
   302 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,dataRate);
   308 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,dataRate);
   303 			if(ret!=KErrNone)
   309 			if(ret!=KErrNone)
   304 				{
   310 				{
   305 				LOGPARSERR("CommSetUp::dataRate",ret,2,&KCommSetup);
   311 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCOMMSETUPSETTINGSL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element COMMSETUP::DATARATE returned %d (element no. %d) from tag %s.",ret,2,KCommSetup);
   306 				comm.iConfig.iRate=KDefaultCommPortRate;
   312 				comm.iConfig.iRate=KDefaultCommPortRate;
   307 				}
   313 				}
   308 			else
   314 			else
   309 				comm.iConfig.iRate=(TBps)dataRate;
   315 				comm.iConfig.iRate=(TBps)dataRate;
   310 
   316 
   311 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,handshake);
   317 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,handshake);
   312 			if(ret!=KErrNone)
   318 			if(ret!=KErrNone)
   313 				{
   319 				{
   314 				LOGPARSERR("CommSetUp::handShake",ret,3,&KCommSetup);
   320 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCOMMSETUPSETTINGSL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element COMMSETUP::HANDSHAKE returned %d (element no. %d) from tag %s.",ret,3,KCommSetup);
   315 				comm.iConfig.iHandshake=KDefaultHandshake;
   321 				comm.iConfig.iHandshake=KDefaultHandshake;
   316 				}
   322 				}
   317 			else
   323 			else
   318 				comm.iConfig.iHandshake=(TUint)handshake;
   324 				comm.iConfig.iHandshake=(TUint)handshake;
   319 			
   325 			
   320 			
   326 			
   321 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,contextName);
   327 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,contextName);
   322 			if(ret!=KErrNone)
   328 			if(ret!=KErrNone)
   323 				{
   329 				{
   324 				LOGPARSERR("CommSetUp::contextName",ret,4,&KCommSetup);
   330 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCOMMSETUPSETTINGSL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element COMMSETUP::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,4,KCommSetup);
   325 				comm.iContextName=KDefaultSetting;
   331 				comm.iContextName=KDefaultSetting;
   326 				}
   332 				}
   327 			else
   333 			else
   328 				comm.iContextName.Copy(contextName);
   334 				comm.iContextName.Copy(contextName);
   329 
   335 
   330 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,commReset);
   336 			ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,commReset);
   331 			if(ret!=KErrNone)
   337 			if(ret!=KErrNone)
   332 				{
   338 				{
   333 				LOGPARSERR("CommSetUp::commReset",ret,5,&KCommSetup);
   339 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCOMMSETUPSETTINGSL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element COMMSETUP::COMMRESET returned %d (element no. %d) from tag %s.",ret,5,KCommSetup);
   334 				comm.iCommReset=EFalse;
   340 				comm.iCommReset=EFalse;
   335 				}
   341 				}
   336 			else
   342 			else
   337 				comm.iCommReset = commReset;
   343 				comm.iCommReset = commReset;
   338 			
   344 			
   420 		TInt delay = 0;
   426 		TInt delay = 0;
   421 		TInt ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,0,delay);
   427 		TInt ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,0,delay);
   422 
   428 
   423 		if(ret != KErrNone || delay < 0)
   429 		if(ret != KErrNone || delay < 0)
   424 			{
   430 			{
   425 			LOGPARSERR("SetConfigDelay",ret,0,&KSetConfigDelay);
   431 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETSETCONFIGSETTINGS_1, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGDELAY returned %d (element no. %d) from tag %s.",ret,0,KSetConfigDelay);
   426 			}
   432 			}
   427 		else
   433 		else
   428 			{
   434 			{
   429 			iSetConfigDelay = delay;
   435 			iSetConfigDelay = delay;
   430 			}
   436 			}
   437 		TInt32 digit = 0;
   443 		TInt32 digit = 0;
   438 		TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   444 		TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   439 
   445 
   440 		if(ret!=KErrNone)
   446 		if(ret!=KErrNone)
   441 			{
   447 			{
   442 			LOGPARSERR("SetConfigFail::contextName",ret,0,&KSetConfigFail);
   448 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETSETCONFIGSETTINGS_2, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,0,KSetConfigFail);
   443 			}
   449 			}
   444 		else
   450 		else
   445 			{
   451 			{
   446 				iSetConfigFail.iContextName.Copy(contextName);
   452 				iSetConfigFail.iContextName.Copy(contextName);
   447 			}
   453 			}
   448 
   454 
   449 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   455 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   450 		if(ret!=KErrNone)
   456 		if(ret!=KErrNone)
   451 			{
   457 			{
   452 			LOGPARSERR("SetConfigFail::numberOfTimes",ret,1,&KSetConfigFail);
   458 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETSETCONFIGSETTINGS_3, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::NUMBEROFTIMES returned %d (element no. %d) from tag %s.",ret,1,KSetConfigFail);
   453 			}
   459 			}
   454 		else
   460 		else
   455 			{
   461 			{
   456 				if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   462 				if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   457 					iSetConfigFail.iNumberOfTimes = digit;
   463 					iSetConfigFail.iNumberOfTimes = digit;
   458 			}
   464 			}
   459 
   465 
   460 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   466 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   461 		if(ret!=KErrNone)
   467 		if(ret!=KErrNone)
   462 			{
   468 			{
   463 			LOGPARSERR("SetConfigFail::failErrorCode",ret,2,&KSetConfigFail);
   469 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETSETCONFIGSETTINGS_4, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::FAILERRORCODE returned %d (element no. %d) from tag %s.",ret,2,KSetConfigFail);
   464 			}
   470 			}
   465 		else
   471 		else
   466 			{
   472 			{
   467 				if(AsciiToNum(failErrorCode, digit)==KErrNone)
   473 				if(AsciiToNum(failErrorCode, digit)==KErrNone)
   468 					iSetConfigFail.iFailErrorCode = digit;
   474 					iSetConfigFail.iFailErrorCode = digit;
   489 		//Get the Notify Context Config Change Delay value
   495 		//Get the Notify Context Config Change Delay value
   490 		TInt ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,0,
   496 		TInt ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,0,
   491 					configChangeData.iDelay);
   497 					configChangeData.iDelay);
   492 		if(ret!=KErrNone)
   498 		if(ret!=KErrNone)
   493 			{
   499 			{
   494 			LOGPARSERR("NotifyContextConfigChange::delay",ret,0,&KNotifyContextConfigChange);
   500 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGCHANGESETTINGSL_1, "WARNING - CONFIGURATION FILE PARSING - Reading element NOTIFYCONTEXTCONFIGCHANGE::DELAY returned %d (element no. %d) from tag %s.",ret,0,KNotifyContextConfigChange);
   495 			continue;
   501 			continue;
   496 			}
   502 			}
   497 			
   503 			
   498 		//Get the Notify Context Config Change, config index value
   504 		//Get the Notify Context Config Change, config index value
   499 		ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,1,
   505 		ret = CTestConfig::GetElement(item->Value(),KStdDelimiter,1,
   500 					configChangeData.iNewContextConfigIndex);
   506 					configChangeData.iNewContextConfigIndex);
   501 		if(ret!=KErrNone)
   507 		if(ret!=KErrNone)
   502 			{
   508 			{
   503 			LOGPARSERR("NotifyContextConfigChange::NewContextConfigIndex",
   509 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGCHANGESETTINGSL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element NOTIFYCONTEXTCONFIGCHANGE::NEWCONTEXTCONFIGINDEX returned %d (element no. %d) from tag %s.",ret,0,KNotifyContextConfigChange);
   504 						ret,0,&KNotifyContextConfigChange);
       
   505 			continue;		
   510 			continue;		
   506 			}
   511 			}
   507 	
   512 	
   508 		iNotifyContextConfigChangeArray->AppendL(configChangeData);
   513 		iNotifyContextConfigChangeArray->AppendL(configChangeData);
   509 		}
   514 		}
   519 		TInt32 digit = 0;
   524 		TInt32 digit = 0;
   520 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   525 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   521 
   526 
   522 		if(ret!=KErrNone)
   527 		if(ret!=KErrNone)
   523 			{
   528 			{
   524 			LOGPARSERR("SetConfigFail::contextName",ret,0,&KDeleteTftFail);
   529 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_1, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,0,KDeleteTftFail);
   525 			}
   530 			}
   526 		else
   531 		else
   527 			{
   532 			{
   528 			iDeleteTftFail.iContextName.Copy(contextName);
   533 			iDeleteTftFail.iContextName.Copy(contextName);
   529 			}
   534 			}
   530 
   535 
   531 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   536 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   532 		if(ret!=KErrNone)
   537 		if(ret!=KErrNone)
   533 			{
   538 			{
   534 			LOGPARSERR("SetConfigFail::numberOfTimes",ret,1,&KDeleteTftFail);
   539 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_2, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::NUMBEROFTIMES returned %d (element no. %d) from tag %s.",ret,1,KDeleteTftFail);
   535 			}
   540 			}
   536 		else
   541 		else
   537 		{
   542 		{
   538 			if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   543 			if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   539 				iDeleteTftFail.iNumberOfTimes = digit;
   544 				iDeleteTftFail.iNumberOfTimes = digit;
   540 			}
   545 			}
   541 
   546 
   542 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   547 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   543 		if(ret!=KErrNone)
   548 		if(ret!=KErrNone)
   544 			{
   549 			{
   545 			LOGPARSERR("SetConfigFail::failErrorCode",ret,2,&KDeleteTftFail);
   550 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_3, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::FAILERRORCODE returned %d (element no. %d) from tag %s.",ret,2,KDeleteTftFail);
   546 			}
   551 			}
   547 		else
   552 		else
   548 			{
   553 			{
   549 			if(AsciiToNum(failErrorCode, digit)==KErrNone)
   554 			if(AsciiToNum(failErrorCode, digit)==KErrNone)
   550 				iDeleteTftFail.iFailErrorCode = digit;
   555 				iDeleteTftFail.iFailErrorCode = digit;
   558 		TInt32 digit = 0;
   563 		TInt32 digit = 0;
   559 		TInt delay = 0;
   564 		TInt delay = 0;
   560 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   565 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   561 		if(ret!=KErrNone)
   566 		if(ret!=KErrNone)
   562 			{
   567 			{
   563 			LOGPARSERR("SetConfigFail::contextName",ret,0,&KCreateTftConfig);
   568 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_4, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,0,KCreateTftConfig);
   564 			}
   569 			}
   565 		else
   570 		else
   566 			{
   571 			{
   567 			iCreateTftConfig.iContextName.Copy(contextName);
   572 			iCreateTftConfig.iContextName.Copy(contextName);
   568 			}
   573 			}
   569 
   574 
   570 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   575 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   571 		if(ret!=KErrNone)
   576 		if(ret!=KErrNone)
   572 			{
   577 			{
   573 			LOGPARSERR("SetConfigFail::numberOfTimes",ret,1,&KCreateTftConfig);
   578 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_5, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::NUMBEROFTIMES returned %d (element no. %d) from tag %s.",ret,1,KCreateTftConfig);
   574 			}
   579 			}
   575 		else
   580 		else
   576 			{
   581 			{
   577 			if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   582 			if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   578 				iCreateTftConfig.iNumberOfFailures = digit;
   583 				iCreateTftConfig.iNumberOfFailures = digit;
   579 			}
   584 			}
   580 
   585 
   581 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   586 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   582 		if(ret!=KErrNone)
   587 		if(ret!=KErrNone)
   583 			{
   588 			{
   584 			LOGPARSERR("SetConfigFail::failErrorCode",ret,2,&KCreateTftConfig);
   589 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_6, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::FAILERRORCODE returned %d (element no. %d) from tag %s.",ret,2,KCreateTftConfig);
   585 			}
   590 			}
   586 		else
   591 		else
   587 			{
   592 			{
   588 			if(AsciiToNum(failErrorCode, digit)==KErrNone)
   593 			if(AsciiToNum(failErrorCode, digit)==KErrNone)
   589 				iCreateTftConfig.iFailErrorCode = digit;
   594 				iCreateTftConfig.iFailErrorCode = digit;
   590 			}
   595 			}
   591 
   596 
   592 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,delay);
   597 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,delay);
   593 		if(ret!=KErrNone)
   598 		if(ret!=KErrNone)
   594 			{
   599 			{
   595 			LOGPARSERR("SetConfigFail::failErrorCode",ret,3,&KCreateTftConfig);
   600 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_7, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::FAILERRORCODE returned %d (element no. %d) from tag %s.",ret,3,KCreateTftConfig);
   596 			}
   601 			}
   597 		else
   602 		else
   598 			{
   603 			{
   599 			iCreateTftConfig.iDelay = delay;
   604 			iCreateTftConfig.iDelay = delay;
   600 			}
   605 			}
   607 		TInt32 digit = 0;
   612 		TInt32 digit = 0;
   608 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   613 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   609 
   614 
   610 		if(ret!=KErrNone)
   615 		if(ret!=KErrNone)
   611 			{
   616 			{
   612 			LOGPARSERR("SetConfigFail::contextName",ret,0,&KAddPacketFilter);
   617 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_8, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,0,KAddPacketFilter);
   613 			}
   618 			}
   614 		else
   619 		else
   615 			{
   620 			{
   616 			iAddPacketFilter.iContextName.Copy(contextName);
   621 			iAddPacketFilter.iContextName.Copy(contextName);
   617 			}
   622 			}
   618 
   623 
   619 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   624 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,numberOfTimes);
   620 		if(ret!=KErrNone)
   625 		if(ret!=KErrNone)
   621 			{
   626 			{
   622 			LOGPARSERR("SetConfigFail::numberOfTimes",ret,1,&KAddPacketFilter);
   627 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_9, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::NUMBEROFTIMES returned %d (element no. %d) from tag %s.",ret,1,KAddPacketFilter);
   623 			}
   628 			}
   624 		else
   629 		else
   625 			{
   630 			{
   626 			if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   631 			if(AsciiToNum(numberOfTimes, digit)==KErrNone)
   627 				iAddPacketFilter.iNumberOfTimes = digit;
   632 				iAddPacketFilter.iNumberOfTimes = digit;
   628 			}
   633 			}
   629 
   634 
   630 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   635 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,failErrorCode);
   631 		if(ret!=KErrNone)
   636 		if(ret!=KErrNone)
   632 			{
   637 			{
   633 			LOGPARSERR("SetConfigFail::failErrorCode",ret,2,&KAddPacketFilter);
   638 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETPACKETFILTERSETTINGS_10, "WARNING - CONFIGURATION FILE PARSING - Reading element SETCONFIGFAIL::FAILERRORCODE returned %d (element no. %d) from tag %s.",ret,2,KAddPacketFilter);
   634 			}
   639 			}
   635 		else
   640 		else
   636 			{
   641 			{
   637 			if(AsciiToNum(failErrorCode, digit)==KErrNone)
   642 			if(AsciiToNum(failErrorCode, digit)==KErrNone)
   638 				iAddPacketFilter.iFailErrorCode = digit;
   643 				iAddPacketFilter.iFailErrorCode = digit;
   660 
   665 
   661 		TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   666 		TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   662 
   667 
   663 		if(ret!=KErrNone)
   668 		if(ret!=KErrNone)
   664 			{
   669 			{
   665 			LOGPARSERR("ContextConfigRel99::contextName",ret,0,KContextConfigRel99);
   670 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_1, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,0,KContextConfigRel99);
   666 			}
   671 			}
   667 		else
   672 		else
   668 			{
   673 			{
   669 				contextConfigRel99.iContextName.Copy(contextName);
   674 				contextConfigRel99.iContextName.Copy(contextName);
   670 			}
   675 			}
   671 
   676 
   672 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,activatePause);
   677 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,activatePause);
   673 		if(ret!=KErrNone)
   678 		if(ret!=KErrNone)
   674 			{
   679 			{
   675 			LOGPARSERR("ContextConfigRel99::activatePause",ret,1,&KContextConfigRel99);
   680 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::ACTIVATEPAUSE returned %d (element no. %d) from tag %s.",ret,1,KContextConfigRel99);
   676 			continue;
   681 			continue;
   677 			}
   682 			}
   678 		else
   683 		else
   679 			contextConfigRel99.iActivatePause = activatePause;
   684 			contextConfigRel99.iActivatePause = activatePause;
   680 
   685 
   681 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,activateErrorCode);
   686 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,activateErrorCode);
   682 		if(ret!=KErrNone)
   687 		if(ret!=KErrNone)
   683 			{
   688 			{
   684 			LOGPARSERR("ContextConfigRel99::activateErrorCode",ret,2,&KContextConfigRel99);
   689 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::ACTIVATEERRORCODE returned %d (element no. %d) from tag %s.",ret,2,KContextConfigRel99);
   685 			continue;
   690 			continue;
   686 			}
   691 			}
   687 		else
   692 		else
   688 			contextConfigRel99.iActivateErrorCode = activateErrorCode;
   693 			contextConfigRel99.iActivateErrorCode = activateErrorCode;
   689 
   694 
   690 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,aDeactivatePause);
   695 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,aDeactivatePause);
   691 		if(ret!=KErrNone)
   696 		if(ret!=KErrNone)
   692 			{
   697 			{
   693 			LOGPARSERR("ContextConfigRel99::deactivatePause",ret,3,&KContextConfigRel99);
   698 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::DEACTIVATEPAUSE returned %d (element no. %d) from tag %s.",ret,3,KContextConfigRel99);
   694 			continue;
   699 			continue;
   695 			}
   700 			}
   696 		else
   701 		else
   697 			contextConfigRel99.iDeactivatePause = aDeactivatePause;
   702 			contextConfigRel99.iDeactivatePause = aDeactivatePause;
   698 
   703 
   699 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,deactivateErrorCode);
   704 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,deactivateErrorCode);
   700 		if(ret!=KErrNone)
   705 		if(ret!=KErrNone)
   701 			{
   706 			{
   702 			LOGPARSERR("ContextConfigRel99::deactivateErrorCode",ret,4,&KContextConfigRel99);
   707 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::DEACTIVATEERRORCODE returned %d (element no. %d) from tag %s.",ret,4,KContextConfigRel99);
   703 			continue;
   708 			continue;
   704 			}
   709 			}
   705 		else
   710 		else
   706 			contextConfigRel99.iDeactivateErrorCode = deactivateErrorCode;
   711 			contextConfigRel99.iDeactivateErrorCode = deactivateErrorCode;
   707 
   712 
   708 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,deletionPause);
   713 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,deletionPause);
   709 		if(ret!=KErrNone)
   714 		if(ret!=KErrNone)
   710 			{
   715 			{
   711 			LOGPARSERR("ContextConfigRel99::deletetionPause",ret,5,&KContextConfigRel99);
   716 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::DELETETIONPAUSE returned %d (element no. %d) from tag %s.",ret,5,KContextConfigRel99);
   712 			continue;
   717 			continue;
   713 			}
   718 			}
   714 		else
   719 		else
   715 			contextConfigRel99.iDeletionPause = deletionPause;
   720 			contextConfigRel99.iDeletionPause = deletionPause;
   716 
   721 
   717 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6, deletionErrorCode);
   722 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6, deletionErrorCode);
   718 		if(ret!=KErrNone)
   723 		if(ret!=KErrNone)
   719 			{
   724 			{
   720 			LOGPARSERR("ContextConfigRel99::deletionErrorCode",ret,6,&KContextConfigRel99);
   725 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTCONFIGREL99SETTINGSL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element CONTEXTCONFIGREL99::DELETIONERRORCODE returned %d (element no. %d) from tag %s.",ret,6,KContextConfigRel99);
   721 			continue;
   726 			continue;
   722 			}
   727 			}
   723 		else
   728 		else
   724 			contextConfigRel99.iDeletionErrorCode =  deletionErrorCode;
   729 			contextConfigRel99.iDeletionErrorCode =  deletionErrorCode;
   725 
   730 
   806 		
   811 		
   807 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   812 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,contextName);
   808 
   813 
   809 		if(ret!=KErrNone)
   814 		if(ret!=KErrNone)
   810 			{
   815 			{
   811 			LOGPARSERR("NotifyContextStatusChange::contextName",ret,0,&KNotifyContextStatusChange);
   816 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTSTATUSCHANGESETTINGSL_1, "WARNING - CONFIGURATION FILE PARSING - Reading element NOTIFYCONTEXTSTATUSCHANGE::CONTEXTNAME returned %d (element no. %d) from tag %s.",ret,0,KNotifyContextStatusChange);
   812 			continue;
   817 			continue;
   813 			}
   818 			}
   814 		else
   819 		else
   815 			{
   820 			{
   816 				notifyContextStatusChange.iContextName.Copy(contextName);
   821 				notifyContextStatusChange.iContextName.Copy(contextName);
   817 			}
   822 			}
   818 
   823 
   819 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,duration);
   824 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,duration);
   820 		if(ret!=KErrNone)
   825 		if(ret!=KErrNone)
   821 			{
   826 			{
   822 			LOGPARSERR("NotifyContextStatusChange::duration",ret,1,&KNotifyContextStatusChange);
   827 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTSTATUSCHANGESETTINGSL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element NOTIFYCONTEXTSTATUSCHANGE::DURATION returned %d (element no. %d) from tag %s.",ret,1,KNotifyContextStatusChange);
   823 			continue;
   828 			continue;
   824 			}
   829 			}
   825 		else
   830 		else
   826 			notifyContextStatusChange.iDuration = duration;
   831 			notifyContextStatusChange.iDuration = duration;
   827 
   832 
   828 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,contextStatus);
   833 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,contextStatus);
   829 		if(ret!=KErrNone)
   834 		if(ret!=KErrNone)
   830 			{
   835 			{
   831 			LOGPARSERR("NotifyContextStatusChange::duration",ret,2,&KNotifyContextStatusChange);
   836 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONTEXTSTATUSCHANGESETTINGSL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element NOTIFYCONTEXTSTATUSCHANGE::DURATION returned %d (element no. %d) from tag %s.",ret,2,KNotifyContextStatusChange);
   832 			continue;
   837 			continue;
   833 			}
   838 			}
   834 		else
   839 		else
   835 			notifyContextStatusChange.iStatus = (RPacketContext::TContextStatus)contextStatus;		
   840 			notifyContextStatusChange.iStatus = (RPacketContext::TContextStatus)contextStatus;		
   836 
   841 
   877 		
   882 		
   878 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,id);
   883 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,id);
   879 
   884 
   880 		if(ret!=KErrNone)
   885 		if(ret!=KErrNone)
   881 			{
   886 			{
   882 			LOGPARSERR("PacketFilterInfo::id",ret,0,&KPacketFilterInfo);
   887 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_1, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::ID returned %d (element no. %d) from tag %s.",ret,0,KPacketFilterInfo);
   883 			continue;	
   888 			continue;	
   884 			}
   889 			}
   885 		else
   890 		else
   886 			{
   891 			{
   887 			packetFilter.iId= id;
   892 			packetFilter.iId= id;
   889 
   894 
   890 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,evaluationPrecedenceIndex);
   895 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,evaluationPrecedenceIndex);
   891 
   896 
   892 		if(ret!=KErrNone)
   897 		if(ret!=KErrNone)
   893 			{
   898 			{
   894 			LOGPARSERR("PacketFilterInfo::evaluationPrecedenceIndex",ret,1,&KPacketFilterInfo);
   899 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::EVALUATIONPRECEDENCEINDEX returned %d (element no. %d) from tag %s.",ret,1,KPacketFilterInfo);
   895 			continue;	
   900 			continue;	
   896 			}
   901 			}
   897 		else
   902 		else
   898 			{
   903 			{
   899 			packetFilter.iEvaluationPrecedenceIndex= evaluationPrecedenceIndex;
   904 			packetFilter.iEvaluationPrecedenceIndex= evaluationPrecedenceIndex;
   901 
   906 
   902 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,srcAddr);
   907 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,srcAddr);
   903 
   908 
   904 		if(ret!=KErrNone)
   909 		if(ret!=KErrNone)
   905 			{
   910 			{
   906 			LOGPARSERR("PacketFilterInfo::srcAddr",ret,2,&KPacketFilterInfo);
   911 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::SRCADDR returned %d (element no. %d) from tag %s.",ret,2,KPacketFilterInfo);
   907 			continue;
   912 			continue;
   908 			}
   913 			}
   909 		else
   914 		else
   910 			{
   915 			{
   911 			TUint8 digit=0;
   916 			TUint8 digit=0;
  1012 
  1017 
  1013 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,srcAddrSubnetMask);
  1018 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,srcAddrSubnetMask);
  1014 
  1019 
  1015 		if(ret!=KErrNone)
  1020 		if(ret!=KErrNone)
  1016 			{
  1021 			{
  1017 			LOGPARSERR("PacketFilterInfo::srcAddrSubnetMask",ret,3,&KPacketFilterInfo);
  1022 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::SRCADDRSUBNETMASK returned %d (element no. %d) from tag %s.",ret,3,KPacketFilterInfo);
  1018 			continue;
  1023 			continue;
  1019 			}
  1024 			}
  1020 		else
  1025 		else
  1021 			{
  1026 			{
  1022 			TUint8 digit=0;
  1027 			TUint8 digit=0;
  1122 
  1127 
  1123 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,protocolNumberOrNextHeader);
  1128 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,protocolNumberOrNextHeader);
  1124 
  1129 
  1125 		if(ret!=KErrNone)
  1130 		if(ret!=KErrNone)
  1126 			{
  1131 			{
  1127 			LOGPARSERR("PacketFilterInfo::protocolNumberOrNextNumber",ret,4,&KPacketFilterInfo);
  1132 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::PROTOCOLNUMBERORNEXTNUMBER returned %d (element no. %d) from tag %s.",ret,4,KPacketFilterInfo);
  1128 			packetFilter.iProtocolNumberOrNextHeader = KUnsetInteger;				
  1133 			packetFilter.iProtocolNumberOrNextHeader = KUnsetInteger;				
  1129 			}
  1134 			}
  1130 		else
  1135 		else
  1131 			{
  1136 			{
  1132 			packetFilter.iProtocolNumberOrNextHeader= protocolNumberOrNextHeader;
  1137 			packetFilter.iProtocolNumberOrNextHeader= protocolNumberOrNextHeader;
  1134 
  1139 
  1135 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,srcPortMin);
  1140 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,srcPortMin);
  1136 
  1141 
  1137 		if(ret!=KErrNone)
  1142 		if(ret!=KErrNone)
  1138 			{
  1143 			{
  1139 			LOGPARSERR("PacketFilterInfo::srcPortMin",ret,5,&KPacketFilterInfo);
  1144 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::SRCPORTMIN returned %d (element no. %d) from tag %s.",ret,5,KPacketFilterInfo);
  1140 			packetFilter.iSrcPortMin = KUnsetInteger;
  1145 			packetFilter.iSrcPortMin = KUnsetInteger;
  1141 			}
  1146 			}
  1142 		else
  1147 		else
  1143 			{
  1148 			{
  1144 			packetFilter.iSrcPortMin= srcPortMin;
  1149 			packetFilter.iSrcPortMin= srcPortMin;
  1146 
  1151 
  1147 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,srcPortMax);
  1152 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,srcPortMax);
  1148 
  1153 
  1149 		if(ret!=KErrNone)
  1154 		if(ret!=KErrNone)
  1150 			{
  1155 			{
  1151 			LOGPARSERR("PacketFilterInfo::srcPortMax",ret,6,&KPacketFilterInfo);
  1156 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::SRCPORTMAX returned %d (element no. %d) from tag %s.",ret,6,KPacketFilterInfo);
  1152 			packetFilter.iSrcPortMax = KUnsetInteger;
  1157 			packetFilter.iSrcPortMax = KUnsetInteger;
  1153 			}
  1158 			}
  1154 		else
  1159 		else
  1155 			{
  1160 			{
  1156 			packetFilter.iSrcPortMax= srcPortMax;
  1161 			packetFilter.iSrcPortMax= srcPortMax;
  1158 
  1163 
  1159 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,destPortMin);
  1164 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,destPortMin);
  1160 
  1165 
  1161 		if(ret!=KErrNone)
  1166 		if(ret!=KErrNone)
  1162 			{
  1167 			{
  1163 			LOGPARSERR("PacketFilterInfo::destPortMin",ret,7,&KPacketFilterInfo);
  1168 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_8, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::DESTPORTMIN returned %d (element no. %d) from tag %s.",ret,7,KPacketFilterInfo);
  1164 			packetFilter.iDestPortMin = KUnsetInteger;
  1169 			packetFilter.iDestPortMin = KUnsetInteger;
  1165 			}
  1170 			}
  1166 		else
  1171 		else
  1167 			{
  1172 			{
  1168 			packetFilter.iDestPortMin= destPortMin;
  1173 			packetFilter.iDestPortMin= destPortMin;
  1170 
  1175 
  1171 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,destPortMax);
  1176 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,destPortMax);
  1172 
  1177 
  1173 		if(ret!=KErrNone)
  1178 		if(ret!=KErrNone)
  1174 			{
  1179 			{
  1175 			LOGPARSERR("PacketFilterInfo::srcPortMax",ret,8,&KPacketFilterInfo);
  1180 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_9, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::SRCPORTMAX returned %d (element no. %d) from tag %s.",ret,8,KPacketFilterInfo);
  1176 			packetFilter.iDestPortMax = KUnsetInteger;
  1181 			packetFilter.iDestPortMax = KUnsetInteger;
  1177 			}
  1182 			}
  1178 		else
  1183 		else
  1179 			{
  1184 			{
  1180 			packetFilter.iDestPortMax= destPortMax;
  1185 			packetFilter.iDestPortMax= destPortMax;
  1182 
  1187 
  1183 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,ipSecSPI);
  1188 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,ipSecSPI);
  1184 
  1189 
  1185 		if(ret!=KErrNone)
  1190 		if(ret!=KErrNone)
  1186 			{
  1191 			{
  1187 			LOGPARSERR("PacketFilterInfo::ipSecSPI",ret,9,&KPacketFilterInfo);
  1192 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_10, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::IPSECSPI returned %d (element no. %d) from tag %s.",ret,9,KPacketFilterInfo);
  1188 			packetFilter.iIPSecSPI = KUnsetInteger;
  1193 			packetFilter.iIPSecSPI = KUnsetInteger;
  1189 			}
  1194 			}
  1190 		else
  1195 		else
  1191 			{
  1196 			{
  1192 			packetFilter.iIPSecSPI= ipSecSPI;
  1197 			packetFilter.iIPSecSPI= ipSecSPI;
  1194 	
  1199 	
  1195 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,10,toSorTrafficClass);
  1200 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,10,toSorTrafficClass);
  1196 
  1201 
  1197 		if(ret!=KErrNone)
  1202 		if(ret!=KErrNone)
  1198 			{
  1203 			{
  1199 			LOGPARSERR("PacketFilterInfo::toSorTrafficClass",ret,10,&KPacketFilterInfo);
  1204 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_11, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::TOSORTRAFFICCLASS returned %d (element no. %d) from tag %s.",ret,10,KPacketFilterInfo);
  1200 			continue;
  1205 			continue;
  1201 			}
  1206 			}
  1202 		else
  1207 		else
  1203 			{
  1208 			{
  1204 			packetFilter.iTOSorTrafficClass = (TUint16)toSorTrafficClass;
  1209 			packetFilter.iTOSorTrafficClass = (TUint16)toSorTrafficClass;
  1206 
  1211 
  1207 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,11,flowLabel);
  1212 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,11,flowLabel);
  1208 
  1213 
  1209 		if(ret!=KErrNone)
  1214 		if(ret!=KErrNone)
  1210 			{
  1215 			{
  1211 			LOGPARSERR("PacketFilterInfo::flowLabel",ret,11,&KPacketFilterInfo);
  1216 			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_12, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::FLOWLABEL returned %d (element no. %d) from tag %s.",ret,11,KPacketFilterInfo);
  1212 			packetFilter.iFlowLabel = KUnsetInteger;
  1217 			packetFilter.iFlowLabel = KUnsetInteger;
  1213 			}
  1218 			}
  1214 		else
  1219 		else
  1215 			{
  1220 			{
  1216 			packetFilter.iFlowLabel = flowLabel;
  1221 			packetFilter.iFlowLabel = flowLabel;
  1220 
  1225 
  1221 		if(ret!=KErrNone)
  1226 		if(ret!=KErrNone)
  1222 			{
  1227 			{
  1223 			if(ret == KErrNotFound)
  1228 			if(ret == KErrNotFound)
  1224 				{
  1229 				{
  1225 				LOGCONFIG1("CONFIGURATION FILE PARSING - PacketFilterInfo::TPacketFilterV2 info encountered");
  1230 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_13, "CONFIGURATION FILE PARSING - PacketFilterInfo::TPacketFilterV2 info encountered");
  1226 				packetFilter.iFilterType = RPacketContext::EPacketFilterTypeUnknown;
  1231 				packetFilter.iFilterType = RPacketContext::EPacketFilterTypeUnknown;
  1227 				}
  1232 				}
  1228 			else
  1233 			else
  1229 				{
  1234 				{
  1230 				LOGPARSERR("PacketFilterInfo::filterType",ret,12,&KPacketFilterInfo);
  1235 				OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CONSTRUCTPACKETFILTERSL_14, "WARNING - CONFIGURATION FILE PARSING - Reading element PACKETFILTERINFO::FILTERTYPE returned %d (element no. %d) from tag %s.",ret,12,KPacketFilterInfo);
  1231 				continue;	
  1236 				continue;	
  1232 				}
  1237 				}
  1233 			}
  1238 			}
  1234 		else
  1239 		else
  1235 			{
  1240 			{
  1246 * Trivial Destructor
  1251 * Trivial Destructor
  1247 * Closes all CObject type objects and destroys all other objects created in the ConstructL()
  1252 * Closes all CObject type objects and destroys all other objects created in the ConstructL()
  1248 *
  1253 *
  1249 */
  1254 */
  1250 	{
  1255 	{
  1251 	LOGPACKET1("CSimPacketContext: Entered destructor");
  1256 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DTOR_1, "CSimPacketContext: Entered destructor");
  1252 	
  1257 	
  1253 	if (iContextConfigParams != NULL)
  1258 	if (iContextConfigParams != NULL)
  1254 	{
  1259 	{
  1255 		iContextConfigParams->Delete(0, iContextConfigParams->Count());
  1260 		iContextConfigParams->Delete(0, iContextConfigParams->Count());
  1256 		delete iContextConfigParams;
  1261 		delete iContextConfigParams;
  1449 		case EPacketContextNotifyStatusChange:
  1454 		case EPacketContextNotifyStatusChange:
  1450 		case EPacketContextNotifyDataTransferred:
  1455 		case EPacketContextNotifyDataTransferred:
  1451 			return KErrNone;
  1456 			return KErrNone;
  1452 		default:
  1457 		default:
  1453 			// Unknown or invalid IPC
  1458 			// Unknown or invalid IPC
  1454 			LOGPACKET1("CSimPacketContext: Register error, unknown IPC");
  1459 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_REGISTERNOTIFICATION_1, "CSimPacketContext: Register error, unknown IPC");
  1455 			return KErrNotSupported;
  1460 			return KErrNotSupported;
  1456 		}
  1461 		}
  1457 	}
  1462 	}
  1458 
  1463 
  1459 TInt CSimPacketContext::DeregisterNotification(const TInt aIpc)
  1464 TInt CSimPacketContext::DeregisterNotification(const TInt aIpc)
  1472 	switch (aIpc)
  1477 	switch (aIpc)
  1473 		{
  1478 		{
  1474 		case EPacketContextNotifyConfigChanged:
  1479 		case EPacketContextNotifyConfigChanged:
  1475 		case EPacketContextNotifyStatusChange:
  1480 		case EPacketContextNotifyStatusChange:
  1476 		case EPacketContextNotifyDataTransferred:
  1481 		case EPacketContextNotifyDataTransferred:
  1477 			LOGPACKET1("CSimPacketContext: DeregisterNotification");
  1482 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DEREGISTERNOTIFICATION_1, "CSimPacketContext: DeregisterNotification");
  1478 			return KErrNone;
  1483 			return KErrNone;
  1479 		default:
  1484 		default:
  1480 			// Unknown or invalid IPC
  1485 			// Unknown or invalid IPC
  1481 			LOGPACKET1("CSimPacketContext: Deregister error, unknown IPC");
  1486 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DEREGISTERNOTIFICATION_2, "CSimPacketContext: Deregister error, unknown IPC");
  1482 			return KErrNotSupported;
  1487 			return KErrNotSupported;
  1483 		}
  1488 		}
  1484 	}
  1489 	}
  1485 
  1490 
  1486 TInt CSimPacketContext::NumberOfSlotsL(const TInt aIpc)
  1491 TInt CSimPacketContext::NumberOfSlotsL(const TInt aIpc)
  1497 	switch (aIpc)
  1502 	switch (aIpc)
  1498 		{
  1503 		{
  1499 		case EPacketContextNotifyConfigChanged:
  1504 		case EPacketContextNotifyConfigChanged:
  1500 		case EPacketContextNotifyStatusChange:
  1505 		case EPacketContextNotifyStatusChange:
  1501 		case EPacketContextNotifyDataTransferred:
  1506 		case EPacketContextNotifyDataTransferred:
  1502 			LOGPACKET1("CGprsDGprsTsy: Registered with 5 slots");
  1507 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_NUMBEROFSLOTSL_1, "CGprsDGprsTsy: Registered with 5 slots");
  1503 			numberOfSlots=5;
  1508 			numberOfSlots=5;
  1504 			break;
  1509 			break;
  1505 		default:
  1510 		default:
  1506 			// Unknown or invalid IPC
  1511 			// Unknown or invalid IPC
  1507 			LOGPACKET1("CSimPacketContext: Number of Slots error, unknown IPC");
  1512 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_NUMBEROFSLOTSL_2, "CSimPacketContext: Number of Slots error, unknown IPC");
  1508 			User::Leave(KErrNotSupported);
  1513 			User::Leave(KErrNotSupported);
  1509 			break;
  1514 			break;
  1510 		}  
  1515 		}  
  1511 	return numberOfSlots;
  1516 	return numberOfSlots;
  1512 	}
  1517 	}
  1551 					setConfigData.iData = aPackage.Des1n();
  1556 					setConfigData.iData = aPackage.Des1n();
  1552 
  1557 
  1553 					TRAPD(ret, iSetConfigData->AppendL(setConfigData) );
  1558 					TRAPD(ret, iSetConfigData->AppendL(setConfigData) );
  1554 					if (ret != KErrNone)
  1559 					if (ret != KErrNone)
  1555                 		{
  1560                 		{
  1556                 		LOGPACKET1("CSimPacketContext::ExtFunc AppendL call fail");
  1561                 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_EXTFUNC_1, "CSimPacketContext::ExtFunc AppendL call fail");
  1557                 		return ret;
  1562                 		return ret;
  1558                 		}
  1563                 		}
  1559                 		
  1564                 		
  1560 					iSetConfigTimer->Start(iSetConfigDelay,this,ETimerIdPcktContextSetConfig);
  1565 					iSetConfigTimer->Start(iSetConfigDelay,this,ETimerIdPcktContextSetConfig);
  1561 					}
  1566 					}
  1701 * @param aTsyReqHandle  The request handle for completing the request 
  1706 * @param aTsyReqHandle  The request handle for completing the request 
  1702 * @param aIpc Ipc representing the request
  1707 * @param aIpc Ipc representing the request
  1703 * @return err KErrNone if request completes ok
  1708 * @return err KErrNone if request completes ok
  1704 */
  1709 */
  1705 	{
  1710 	{
  1706 	LOGPACKET1("CSimPacketContext: - CancelService called");
  1711 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CANCELSERVICE_1, "CSimPacketContext: - CancelService called");
  1707 	switch (aIpc)
  1712 	switch (aIpc)
  1708 		{
  1713 		{
  1709 		case EPacketContextSetConfig:
  1714 		case EPacketContextSetConfig:
  1710 			return SetConfigCancel(aTsyReqHandle);
  1715 			return SetConfigCancel(aTsyReqHandle);
  1711 		case EPacketContextGetConfig:
  1716 		case EPacketContextGetConfig:
  1775 * @param aConfig pointer containing the parameters to set to.
  1780 * @param aConfig pointer containing the parameters to set to.
  1776 * @return KErrNone
  1781 * @return KErrNone
  1777 
  1782 
  1778 */
  1783 */
  1779 	{
  1784 	{
  1780 	LOGPACKET1("CSimPacketContext::SetConfig called");
  1785 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_SETCONFIG_1, "CSimPacketContext::SetConfig called");
  1781 
  1786 
  1782 	TPckg<TPacketDataConfigBase>* configBase = (TPckg<TPacketDataConfigBase>*)aConfig;
  1787 	TPckg<TPacketDataConfigBase>* configBase = (TPckg<TPacketDataConfigBase>*)aConfig;
  1783 	TPacketDataConfigBase& configBaseV1 = (*configBase)();
  1788 	TPacketDataConfigBase& configBaseV1 = (*configBase)();
  1784 
  1789 
  1785 	TInt err = KErrGeneral;
  1790 	TInt err = KErrGeneral;
  1895 * @param aTsyReqHandle Tsy Request handle for the client request
  1900 * @param aTsyReqHandle Tsy Request handle for the client request
  1896 * @param aConfig pointer to the data to retrieve
  1901 * @param aConfig pointer to the data to retrieve
  1897 * @return KErrNone
  1902 * @return KErrNone
  1898 */
  1903 */
  1899 	{
  1904 	{
  1900 	LOGPACKET1("CSimPacketContext::GetConfig called");
  1905 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETCONFIG_1, "CSimPacketContext::GetConfig called");
  1901 	TPckg<TPacketDataConfigBase>* configBase = (TPckg<TPacketDataConfigBase>*)aConfig;
  1906 	TPckg<TPacketDataConfigBase>* configBase = (TPckg<TPacketDataConfigBase>*)aConfig;
  1902 	TPacketDataConfigBase& configBaseV1 = (*configBase)();
  1907 	TPacketDataConfigBase& configBaseV1 = (*configBase)();
  1903 	
  1908 	
  1904 	// GPRS configuration
  1909 	// GPRS configuration
  1905 	if(configBaseV1.ExtensionId()==TPacketDataConfigBase::KConfigGPRS)
  1910 	if(configBaseV1.ExtensionId()==TPacketDataConfigBase::KConfigGPRS)
  2000 * 
  2005 * 
  2001 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2006 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2002 * @return KErrNone
  2007 * @return KErrNone
  2003 */
  2008 */
  2004 	{
  2009 	{
  2005 	LOGPACKET1("CSimPacketContext::NotifyConfigChangedCancel called");
  2010 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_NOTIFYCONFIGCHANGEDCANCEL_1, "CSimPacketContext::NotifyConfigChangedCancel called");
  2006 	if(iNotifyConfigGPRS.iNotifyPending &&
  2011 	if(iNotifyConfigGPRS.iNotifyPending &&
  2007 		iNotifyConfigGPRS.iNotifyHandle == aTsyReqHandle)
  2012 		iNotifyConfigGPRS.iNotifyHandle == aTsyReqHandle)
  2008 		{
  2013 		{
  2009 		iNotifyConfigGPRS.iNotifyPending=EFalse;
  2014 		iNotifyConfigGPRS.iNotifyPending=EFalse;
  2010 		ReqCompleted(aTsyReqHandle,KErrCancel);
  2015 		ReqCompleted(aTsyReqHandle,KErrCancel);
  2107 *
  2112 *
  2108 * @param aTsyReqHandle Tsy Request handle for the client request
  2113 * @param aTsyReqHandle Tsy Request handle for the client request
  2109 * @return KErrNone
  2114 * @return KErrNone
  2110 */
  2115 */
  2111 	{
  2116 	{
  2112 	LOGPACKET1("CSimPacketContext::Deactivate called");
  2117 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DEACTIVATE_1, "CSimPacketContext::Deactivate called");
  2113 	iDeactivateRequestHandle = aTsyReqHandle;
  2118 	iDeactivateRequestHandle = aTsyReqHandle;
  2114 	TInt ret;
  2119 	TInt ret;
  2115 	ret = ActionEvent(EContextEventDeactivate,KErrNone);
  2120 	ret = ActionEvent(EContextEventDeactivate,KErrNone);
  2116 	return ret;
  2121 	return ret;
  2117 	}
  2122 	}
  2124 *
  2129 *
  2125 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2130 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2126 * @return KErrNone
  2131 * @return KErrNone
  2127 */
  2132 */
  2128 	{
  2133 	{
  2129 	LOGPACKET1("CSimPacketContext::DeactivateCancel called");
  2134 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DEACTIVATECANCEL_1, "CSimPacketContext::DeactivateCancel called");
  2130 	if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusDeactivating)) && 
  2135 	if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusDeactivating)) && 
  2131 					(iCurrentEvent==EContextEventDeactivate))
  2136 					(iCurrentEvent==EContextEventDeactivate))
  2132 		{
  2137 		{
  2133 		iTimer->Cancel();
  2138 		iTimer->Cancel();
  2134 		iCurrentEvent= EContextEventNone;
  2139 		iCurrentEvent= EContextEventNone;
  2224 *
  2229 *
  2225 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2230 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2226 * @return KErrNone
  2231 * @return KErrNone
  2227 */
  2232 */
  2228 	{
  2233 	{
  2229 	LOGPACKET1("CSimPacketContext::ActivateCancel called");
  2234 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_ACTIVATECANCEL_1, "CSimPacketContext::ActivateCancel called");
  2230 	if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusActivating)) && 
  2235 	if(((iState == RPacketContext::EStatusInactive) || (iState == RPacketContext::EStatusActivating)) && 
  2231 					(iCurrentEvent==EContextEventActivate))
  2236 					(iCurrentEvent==EContextEventActivate))
  2232 		{
  2237 		{
  2233 		iTimer->Cancel();
  2238 		iTimer->Cancel();
  2234 		iCurrentEvent= EContextEventNone;
  2239 		iCurrentEvent= EContextEventNone;
  2275 *
  2280 *
  2276 * @param aTsyReqHandle Tsy Request handle for the client request
  2281 * @param aTsyReqHandle Tsy Request handle for the client request
  2277 * @return KErrNone
  2282 * @return KErrNone
  2278 */
  2283 */
  2279 	{
  2284 	{
  2280 	LOGPACKET1("CSimPacketContext::Delete called");
  2285 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DELETE_1, "CSimPacketContext::Delete called");
  2281 	iDeleteRequestHandle = aTsyReqHandle;
  2286 	iDeleteRequestHandle = aTsyReqHandle;
  2282 	TInt ret;
  2287 	TInt ret;
  2283 	ret = ActionEvent(EContextEventDelete,KErrNone);
  2288 	ret = ActionEvent(EContextEventDelete,KErrNone);
  2284 	return ret;
  2289 	return ret;
  2285 	}
  2290 	}
  2292 *
  2297 *
  2293 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2298 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2294 * @return KErrNone
  2299 * @return KErrNone
  2295 */
  2300 */
  2296 	{
  2301 	{
  2297 	LOGPACKET1("CSimPacketContext::DeleteCancel called");
  2302 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_DELETECANCEL_1, "CSimPacketContext::DeleteCancel called");
  2298 	if((iState == RPacketContext::EStatusInactive) && (iCurrentEvent==EContextEventDelete))
  2303 	if((iState == RPacketContext::EStatusInactive) && (iCurrentEvent==EContextEventDelete))
  2299 		{
  2304 		{
  2300 		iTimer->Cancel();
  2305 		iTimer->Cancel();
  2301 		iCurrentEvent= EContextEventNone;
  2306 		iCurrentEvent= EContextEventNone;
  2302 		ReqCompleted(aTsyReqHandle,KErrCancel);
  2307 		ReqCompleted(aTsyReqHandle,KErrCancel);
  2311 * @param aTsyReqHandle Tsy Request handle for the client request
  2316 * @param aTsyReqHandle Tsy Request handle for the client request
  2312 * @param aDataPort Pointer to the port  and csy name for the opened port.
  2317 * @param aDataPort Pointer to the port  and csy name for the opened port.
  2313 * @return KErrNone
  2318 * @return KErrNone
  2314 */
  2319 */
  2315 	{
  2320 	{
  2316 	LOGPACKET1("CSimPacketContext::LoanCommPort called");
  2321 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_LOANCOMMPORT_1, "CSimPacketContext::LoanCommPort called");
  2317 
  2322 
  2318 	if(iState != RPacketContext::EStatusActive)
  2323 	if(iState != RPacketContext::EStatusActive)
  2319 		{
  2324 		{
  2320 		ReqCompleted(aTsyReqHandle, KErrEtelCallNotActive);
  2325 		ReqCompleted(aTsyReqHandle, KErrEtelCallNotActive);
  2321 		return KErrNone;
  2326 		return KErrNone;
  2341 *
  2346 *
  2342 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2347 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2343 * @return KErrNone
  2348 * @return KErrNone
  2344 */
  2349 */
  2345 	{
  2350 	{
  2346 	LOGPACKET1("CSimPacketContext::LoanCommPortCancel called");
  2351 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_LOANCOMMPORTCANCEL_1, "CSimPacketContext::LoanCommPortCancel called");
  2347 	return KErrNone;
  2352 	return KErrNone;
  2348 	}
  2353 	}
  2349 
  2354 
  2350 TInt CSimPacketContext::RecoverCommPort(const TTsyReqHandle aTsyReqHandle)
  2355 TInt CSimPacketContext::RecoverCommPort(const TTsyReqHandle aTsyReqHandle)
  2351 /**
  2356 /**
  2353 *
  2358 *
  2354 * @param aTsyReqHandle Tsy Request handle for the client request
  2359 * @param aTsyReqHandle Tsy Request handle for the client request
  2355 * @return KErrNone
  2360 * @return KErrNone
  2356 */
  2361 */
  2357 	{
  2362 	{
  2358 	LOGPACKET1("CSimPacketContext::RecoverCommPort called");
  2363 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_RECOVERCOMMPORT_1, "CSimPacketContext::RecoverCommPort called");
  2359 	if (!iCommPortLoaned)
  2364 	if (!iCommPortLoaned)
  2360 		{
  2365 		{
  2361 		ReqCompleted(aTsyReqHandle, KErrEtelPortNotLoanedToClient);
  2366 		ReqCompleted(aTsyReqHandle, KErrEtelPortNotLoanedToClient);
  2362 		return KErrNone;
  2367 		return KErrNone;
  2363 		}
  2368 		}
  2373 *
  2378 *
  2374 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2379 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2375 * @return KErrNone
  2380 * @return KErrNone
  2376 */
  2381 */
  2377 	{
  2382 	{
  2378 	LOGPACKET1("CSimPacketContext::RecoverCommPortCancel called");
  2383 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_RECOVERCOMMPORTCANCEL_1, "CSimPacketContext::RecoverCommPortCancel called");
  2379 	return KErrNone;
  2384 	return KErrNone;
  2380 	}
  2385 	}
  2381 
  2386 
  2382 TInt CSimPacketContext::GetStatus(const TTsyReqHandle aTsyReqHandle,RPacketContext::TContextStatus* aContextStatus)
  2387 TInt CSimPacketContext::GetStatus(const TTsyReqHandle aTsyReqHandle,RPacketContext::TContextStatus* aContextStatus)
  2383 /**
  2388 /**
  2386 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2391 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2387 * @param aContextStatus pointer to the status of the packet context.
  2392 * @param aContextStatus pointer to the status of the packet context.
  2388 * @return KerrNone
  2393 * @return KerrNone
  2389 */
  2394 */
  2390 	{
  2395 	{
  2391 	LOGPACKET1("CSimPacketContext::GetStatus called");
  2396 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETSTATUS_1, "CSimPacketContext::GetStatus called");
  2392 	*aContextStatus = iState;
  2397 	*aContextStatus = iState;
  2393 	ReqCompleted(aTsyReqHandle,KErrNone);
  2398 	ReqCompleted(aTsyReqHandle,KErrNone);
  2394 	return KErrNone;
  2399 	return KErrNone;
  2395 	}
  2400 	}
  2396 
  2401 
  2404 * @param aTsyReqHandle Tsy Request handle for the client request
  2409 * @param aTsyReqHandle Tsy Request handle for the client request
  2405 * @param aContextStatus pointer to the packet context status
  2410 * @param aContextStatus pointer to the packet context status
  2406 * @return KErrNone
  2411 * @return KErrNone
  2407 */
  2412 */
  2408 	{
  2413 	{
  2409 	LOGPACKET1("CSimPacketContext::NotifyStatusChange called");
  2414 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_NOTIFYSTATUSCHANGE_1, "CSimPacketContext::NotifyStatusChange called");
  2410 	__ASSERT_ALWAYS(!iNotifyStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
  2415 	__ASSERT_ALWAYS(!iNotifyStatusChange.iNotifyPending,SimPanic(ENotificationAlreadyPending));
  2411 	iNotifyStatusChange.iNotifyPending = ETrue;
  2416 	iNotifyStatusChange.iNotifyPending = ETrue;
  2412 	iNotifyStatusChange.iNotifyHandle = aTsyReqHandle;
  2417 	iNotifyStatusChange.iNotifyHandle = aTsyReqHandle;
  2413 	iNotifyStatusChange.iNotifyData = aContextStatus;
  2418 	iNotifyStatusChange.iNotifyData = aContextStatus;
  2414 	return KErrNone;
  2419 	return KErrNone;
  2423 * 
  2428 * 
  2424 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2429 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2425 * @return KErrNone
  2430 * @return KErrNone
  2426 */
  2431 */
  2427 	{
  2432 	{
  2428 	LOGPACKET1("CSimPacketContext::NotifyStatusChangeCancel called");
  2433 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_NOTIFYSTATUSCHANGECANCEL_1, "CSimPacketContext::NotifyStatusChangeCancel called");
  2429 	if(iNotifyStatusChange.iNotifyPending)
  2434 	if(iNotifyStatusChange.iNotifyPending)
  2430 		{
  2435 		{
  2431 		iNotifyStatusChange.iNotifyPending=EFalse;
  2436 		iNotifyStatusChange.iNotifyPending=EFalse;
  2432 		ReqCompleted(aTsyReqHandle,KErrCancel);
  2437 		ReqCompleted(aTsyReqHandle,KErrCancel);
  2433 		}
  2438 		}
  2442 * @param aTsyReqHandle Tsy Request handle for the client request
  2447 * @param aTsyReqHandle Tsy Request handle for the client request
  2443 * @param aVolume pointer to the volume of data trasferred so far.
  2448 * @param aVolume pointer to the volume of data trasferred so far.
  2444 * @return KErrNone
  2449 * @return KErrNone
  2445 */
  2450 */
  2446 	{
  2451 	{
  2447 	LOGPACKET1("CSimPacketContext::GetDataVolumeTransferred called");
  2452 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETDATAVOLUMETRANSFERRED_1, "CSimPacketContext::GetDataVolumeTransferred called");
  2448 	ReqCompleted(aTsyReqHandle,KErrNotSupported);
  2453 	ReqCompleted(aTsyReqHandle,KErrNotSupported);
  2449 	return KErrNone;
  2454 	return KErrNone;
  2450 	}
  2455 	}
  2451 
  2456 
  2452 TInt CSimPacketContext::NotifyDataTransferred(const TTsyReqHandle aTsyReqHandle, RPacketContext::TDataVolume* /*aVolume*/, RPacketContext::TNotifyDataTransferredRequest* /*aData*/)
  2457 TInt CSimPacketContext::NotifyDataTransferred(const TTsyReqHandle aTsyReqHandle, RPacketContext::TDataVolume* /*aVolume*/, RPacketContext::TNotifyDataTransferredRequest* /*aData*/)
  2470 *
  2475 *
  2471 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2476 * @param aTsyReqHandle Tsy Request handle for the client cancel request
  2472 * @return KerrNone
  2477 * @return KerrNone
  2473 */
  2478 */
  2474 	{
  2479 	{
  2475 	LOGPACKET1("CSimPacketContext::NotifyDataTransferredCancel called");
  2480 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_NOTIFYDATATRANSFERREDCANCEL_1, "CSimPacketContext::NotifyDataTransferredCancel called");
  2476 	return KErrNone;
  2481 	return KErrNone;
  2477 	}
  2482 	}
  2478 
  2483 
  2479 TInt CSimPacketContext::GetLastErrorCause(const TTsyReqHandle aTsyReqHandle, TInt* aError)
  2484 TInt CSimPacketContext::GetLastErrorCause(const TTsyReqHandle aTsyReqHandle, TInt* aError)
  2480 /**
  2485 /**
  2483 * @param aTsyReqHandle Tsy Request handle for the client request
  2488 * @param aTsyReqHandle Tsy Request handle for the client request
  2484 * @param aError pointer to the last error cause
  2489 * @param aError pointer to the last error cause
  2485 * @return KerrNone
  2490 * @return KerrNone
  2486 */
  2491 */
  2487 	{
  2492 	{
  2488 	LOGPACKET1("CSimPacketContext::GetLastErrorCause called");
  2493 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETLASTERRORCAUSE_1, "CSimPacketContext::GetLastErrorCause called");
  2489 	*aError = iLastError;
  2494 	*aError = iLastError;
  2490 	ReqCompleted(aTsyReqHandle,iErrorCodeForGetLastErrorCause);
  2495 	ReqCompleted(aTsyReqHandle,iErrorCodeForGetLastErrorCause);
  2491 	iErrorCodeForGetLastErrorCause = KErrNone;
  2496 	iErrorCodeForGetLastErrorCause = KErrNone;
  2492 	return KErrNone;
  2497 	return KErrNone;
  2493 	}
  2498 	}
  2545 					}	
  2550 					}	
  2546 				}
  2551 				}
  2547 
  2552 
  2548 			else
  2553 			else
  2549 				{
  2554 				{
  2550 				LOGMISC1(">>CSimPacketContext.cpp: Invalid new context config param index");
  2555 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_TIMERCALLBACK_1, ">>CSimPacketContext.cpp: Invalid new context config param index");
  2551 				}
  2556 				}
  2552 				
  2557 				
  2553 			//Delete the current NotifyContextConfigChange item and set the next one if possible
  2558 			//Delete the current NotifyContextConfigChange item and set the next one if possible
  2554 			iNotifyContextConfigChangeArray->Delete(0);
  2559 			iNotifyContextConfigChangeArray->Delete(0);
  2555 			
  2560 			
  2566 		case ETimerIdPcktContextCreateTft:
  2571 		case ETimerIdPcktContextCreateTft:
  2567 			DoCreateNewTFT();
  2572 			DoCreateNewTFT();
  2568 			break;
  2573 			break;
  2569 		default:
  2574 		default:
  2570 			{
  2575 			{
  2571 			LOGPACKET1(">>CSimPacketContext::TimerCallBack");
  2576 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_TIMERCALLBACK_2, ">>CSimPacketContext::TimerCallBack");
  2572 			TInt ret=ActionEvent(EContextEventTimeOut,KErrNone);
  2577 			TInt ret=ActionEvent(EContextEventTimeOut,KErrNone);
  2573 			__ASSERT_ALWAYS(ret==KErrNone,SimPanic(ETimeOutEventActionFailed));	// Note: this is very crude error handling and should be replaced by something rather more elegant.
  2578 			__ASSERT_ALWAYS(ret==KErrNone,SimPanic(ETimeOutEventActionFailed));	// Note: this is very crude error handling and should be replaced by something rather more elegant.
  2574 			LOGPACKET1("<<CSimPacketContext::TimerCallBack");
  2579 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_TIMERCALLBACK_3, "<<CSimPacketContext::TimerCallBack");
  2575 			iTFTChangeBool = EFalse;
  2580 			iTFTChangeBool = EFalse;
  2576 			break;
  2581 			break;
  2577 			}		
  2582 			}		
  2578 		}
  2583 		}
  2579 	}
  2584 	}
  2678 *
  2683 *
  2679 * @param aNewState the new state to change to
  2684 * @param aNewState the new state to change to
  2680 * @return Error indication if change of state is successful or not
  2685 * @return Error indication if change of state is successful or not
  2681 */
  2686 */
  2682 	{
  2687 	{
  2683 	LOGPACKET2(">>CSimPacketContext::ChangeState [newState=%d]", aNewState);
  2688 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CHANGESTATE_1, ">>CSimPacketContext::ChangeState [newState=%d]", aNewState);
  2684 	__ASSERT_ALWAYS(aNewState!=RPacketContext::EStatusUnknown,SimPanic(ECallStatusUnknownIllegal));
  2689 	__ASSERT_ALWAYS(aNewState!=RPacketContext::EStatusUnknown,SimPanic(ECallStatusUnknownIllegal));
  2685 
  2690 
  2686 	if(iState==aNewState)
  2691 	if(iState==aNewState)
  2687 		return KErrNone;
  2692 		return KErrNone;
  2688 
  2693 
  2716 		*(RPacketContext::TContextStatus*)iNotifyStatusChange.iNotifyData=iState;
  2721 		*(RPacketContext::TContextStatus*)iNotifyStatusChange.iNotifyData=iState;
  2717 		ReqCompleted(iNotifyStatusChange.iNotifyHandle,KErrNone);
  2722 		ReqCompleted(iNotifyStatusChange.iNotifyHandle,KErrNone);
  2718 		}
  2723 		}
  2719 
  2724 
  2720 
  2725 
  2721 	LOGPACKET1("<<CSimPacketContext::ChangeState");
  2726 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_CHANGESTATE_2, "<<CSimPacketContext::ChangeState");
  2722 	return KErrNone;
  2727 	return KErrNone;
  2723 	}
  2728 	}
  2724 
  2729 
  2725 TInt CSimPacketContext::ActionEvent(TContextEvent aEvent,TInt aStatus)
  2730 TInt CSimPacketContext::ActionEvent(TContextEvent aEvent,TInt aStatus)
  2726 /**
  2731 /**
  2749 		}
  2754 		}
  2750 
  2755 
  2751 	switch(aEvent)
  2756 	switch(aEvent)
  2752 		{
  2757 		{
  2753 		case EContextEventActivate:
  2758 		case EContextEventActivate:
  2754 			LOGPACKET1(">>CSimPacketContext::ActionEvent = [EContextEventActivate]");
  2759 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_ACTIONEVENT_1, ">>CSimPacketContext::ActionEvent = [EContextEventActivate]");
  2755 			if(iState==RPacketContext::EStatusInactive)
  2760 			if(iState==RPacketContext::EStatusInactive)
  2756 				{
  2761 				{
  2757 				iCurrentEvent=EContextEventActivate;
  2762 				iCurrentEvent=EContextEventActivate;
  2758 				ret = ChangeState(RPacketContext::EStatusActivating);
  2763 				ret = ChangeState(RPacketContext::EStatusActivating);
  2759 					if(ret!=KErrNone)
  2764 					if(ret!=KErrNone)
  2769 			else
  2774 			else
  2770 				ReqCompleted(iActivateRequestHandle, KErrGprsActivationRejected);
  2775 				ReqCompleted(iActivateRequestHandle, KErrGprsActivationRejected);
  2771 			break;
  2776 			break;
  2772 
  2777 
  2773 		case EContextEventDeactivate:
  2778 		case EContextEventDeactivate:
  2774 			LOGPACKET1(">>CSimPacketContext::ActionEvent = [EContextEventDeactivate]");
  2779 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_ACTIONEVENT_2, ">>CSimPacketContext::ActionEvent = [EContextEventDeactivate]");
  2775 			if(iState==RPacketContext::EStatusActive)
  2780 			if(iState==RPacketContext::EStatusActive)
  2776 				{
  2781 				{
  2777 				iCurrentEvent=EContextEventDeactivate;
  2782 				iCurrentEvent=EContextEventDeactivate;
  2778 				ret = ChangeState(RPacketContext::EStatusDeactivating);
  2783 				ret = ChangeState(RPacketContext::EStatusDeactivating);
  2779 					if(ret!=KErrNone)
  2784 					if(ret!=KErrNone)
  2789 			else
  2794 			else
  2790 				ReqCompleted(iDeactivateRequestHandle, KErrNone);
  2795 				ReqCompleted(iDeactivateRequestHandle, KErrNone);
  2791 			break;
  2796 			break;
  2792 
  2797 
  2793 		case EContextEventDelete:
  2798 		case EContextEventDelete:
  2794 			LOGPACKET1(">>CSimPacketContext::ActionEvent = [EContextEventDelete]");
  2799 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_ACTIONEVENT_3, ">>CSimPacketContext::ActionEvent = [EContextEventDelete]");
  2795 			if(iState==RPacketContext::EStatusInactive)
  2800 			if(iState==RPacketContext::EStatusInactive)
  2796 				{
  2801 				{
  2797 				iCurrentEvent=EContextEventDelete;
  2802 				iCurrentEvent=EContextEventDelete;
  2798 
  2803 
  2799 				if (!found)
  2804 				if (!found)
  2825 				}
  2830 				}
  2826 			iCurrentEvent=EContextEventNone;
  2831 			iCurrentEvent=EContextEventNone;
  2827 			break;
  2832 			break;
  2828 
  2833 
  2829 		case EContextEventTimeOut:
  2834 		case EContextEventTimeOut:
  2830 			LOGPACKET1(">>CSimPacketContext::ActionEvent = [EContextEventTimeOut]");
  2835 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_ACTIONEVENT_4, ">>CSimPacketContext::ActionEvent = [EContextEventTimeOut]");
  2831 			switch(iCurrentEvent)
  2836 			switch(iCurrentEvent)
  2832 				{
  2837 				{
  2833 			case EContextEventNone:
  2838 			case EContextEventNone:
  2834 				break;
  2839 				break;
  2835 			case EContextEventActivate:
  2840 			case EContextEventActivate:
  3596 		}
  3601 		}
  3597 	
  3602 	
  3598 	TRAPD(ret, mediaAuthV3 = RPacketContext::CTFTMediaAuthorizationV3::NewL());
  3603 	TRAPD(ret, mediaAuthV3 = RPacketContext::CTFTMediaAuthorizationV3::NewL());
  3599 	if (ret != KErrNone)
  3604 	if (ret != KErrNone)
  3600 		{
  3605 		{
  3601 		LOGPACKET1("CSimPacketContext::GetAddMediaAuthorization NewL call fail");
  3606 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETADDMEDIAAUTHORIZATION_1, "CSimPacketContext::GetAddMediaAuthorization NewL call fail");
  3602 		return ret;
  3607 		return ret;
  3603 		}		
  3608 		}		
  3604 
  3609 
  3605 	TRAP(ret, mediaAuthV3->InternalizeL(*aBuffer) );
  3610 	TRAP(ret, mediaAuthV3->InternalizeL(*aBuffer) );
  3606 	if (ret != KErrNone)
  3611 	if (ret != KErrNone)
  3607 		{
  3612 		{
  3608 		delete mediaAuthV3;
  3613 		delete mediaAuthV3;
  3609 		LOGPACKET1("CSimPacketContext::GetAddMediaAuthorization InternalizeL call fail");
  3614 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPACKETCONTEXT_GETADDMEDIAAUTHORIZATION_2, "CSimPacketContext::GetAddMediaAuthorization InternalizeL call fail");
  3610 		return ret;
  3615 		return ret;
  3611 		}
  3616 		}
  3612 
  3617 
  3613 	for (TUint i=0; i<iAuthorizationTokenResponse->Count(); i++)
  3618 	for (TUint i=0; i<iAuthorizationTokenResponse->Count(); i++)
  3614 		{
  3619 		{