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