telephonyserverplugins/simtsy/src/CSimPhoneIMSAuth.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-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 
       
    23 
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "CSimPhoneIMSAuthTraces.h"
       
    27 #endif
       
    28 
    22 #include <testconfigfileparser.h>
    29 #include <testconfigfileparser.h>
    23 #include <etelmmerr.h>
    30 #include <etelmmerr.h>
    24 #include "CSimPhone.h"
    31 #include "CSimPhone.h"
    25 #include "Simlog.h"
       
    26 
    32 
    27 //
    33 //
    28 // CSimPhoneIMSAuth
    34 // CSimPhoneIMSAuth
    29 //
    35 //
    30 
    36 
    58 * @leave Leaves due to not enough memory or if any data member does not construct for any reason.
    64 * @leave Leaves due to not enough memory or if any data member does not construct for any reason.
    59 */
    65 */
    60 	{
    66 	{
    61 	iTimer=CSimTimer::NewL(iPhone);
    67 	iTimer=CSimTimer::NewL(iPhone);
    62 	iGetAuthorizationData = new CArrayPtrFlat<CListReadAllAttempt>(1);
    68 	iGetAuthorizationData = new CArrayPtrFlat<CListReadAllAttempt>(1);
    63 	LOGPHONE1("Starting to parse Phone IMS Authorization/Authentication config params...");
    69 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_CONSTRUCTL_1, "Starting to parse Phone IMS Authorization/Authentication config params...");
    64 	ParseAuthorizationInfoL();
    70 	ParseAuthorizationInfoL();
    65 	ParseAuthenticationInfoL();
    71 	ParseAuthenticationInfoL();
    66 	LOGPHONE1("Finished parsing Phone IMS Authorization/Authentication config params...");
    72 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_CONSTRUCTL_2, "Finished parsing Phone IMS Authorization/Authentication config params...");
    67 	}
    73 	}
    68 
    74 
    69 
    75 
    70 CSimPhoneIMSAuth::~CSimPhoneIMSAuth()
    76 CSimPhoneIMSAuth::~CSimPhoneIMSAuth()
    71 /**
    77 /**
    99 * Returns a pointer to the config file section
   105 * Returns a pointer to the config file section
   100 *
   106 *
   101 * @return CTestConfigSection a pointer to the configuration file data section
   107 * @return CTestConfigSection a pointer to the configuration file data section
   102 */
   108 */
   103 	{
   109 	{
   104 	LOGPHONE1(">>CSimPhoneIMSAuth::CfgFile");
   110 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_CFGFILE_1, ">>CSimPhoneIMSAuth::CfgFile");
   105 	return iPhone->CfgFile();
   111 	return iPhone->CfgFile();
   106 	}
   112 	}
   107 
   113 
   108 void CSimPhoneIMSAuth::TimerCallBack(TInt /*aId*/)
   114 void CSimPhoneIMSAuth::TimerCallBack(TInt /*aId*/)
   109 /**
   115 /**
   132 	TInt ret=KErrNone;
   138 	TInt ret=KErrNone;
   133 	TPtrC8 IMPI, IMPUValue, HNDN;
   139 	TPtrC8 IMPI, IMPUValue, HNDN;
   134 	TInt IMPUCount, authorizationDataSource, infoChangeDelay;
   140 	TInt IMPUCount, authorizationDataSource, infoChangeDelay;
   135 	TAuthorizationInfo authorizationInfo;
   141 	TAuthorizationInfo authorizationInfo;
   136 	
   142 	
   137 	LOGPHONE1("Starting to Parse IMS Authorization Info");
   143 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_1, "Starting to Parse IMS Authorization Info");
   138 	TInt count = CfgFile()->ItemCount(KAuthorizationInfo);
   144 	TInt count = CfgFile()->ItemCount(KAuthorizationInfo);
   139 	
   145 	
   140 	TInt index;
   146 	TInt index;
   141 	for(index=0;index<count;index++)
   147 	for(index=0;index<count;index++)
   142 		{
   148 		{
   149 			
   155 			
   150 		//Get the IMPI
   156 		//Get the IMPI
   151 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,IMPI);
   157 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,IMPI);
   152 		if(ret!=KErrNone)
   158 		if(ret!=KErrNone)
   153 			{
   159 			{
   154 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   160 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_2, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   155 			continue;
   161 			continue;
   156 			}
   162 			}
   157 		else
   163 		else
   158 			{
   164 			{
   159 			authorizationInfo.iIMPI.Copy(IMPI);
   165 			authorizationInfo.iIMPI.Copy(IMPI);
   162 
   168 
   163 		//Get number of elements in the IMPU Array
   169 		//Get number of elements in the IMPU Array
   164 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,IMPUCount);
   170 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,IMPUCount);
   165 		if(ret!=KErrNone)
   171 		if(ret!=KErrNone)
   166 			{
   172 			{
   167 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   173 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_3, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   168 			continue;
   174 			continue;
   169 			}
   175 			}
   170 		else
   176 		else
   171 			{
   177 			{
   172 			delimiterNum++;
   178 			delimiterNum++;
   178 			for(ii = 0;ii < IMPUCount; ii++)
   184 			for(ii = 0;ii < IMPUCount; ii++)
   179 				{
   185 				{
   180 				ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,IMPUValue);
   186 				ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,IMPUValue);
   181 				if(ret!=KErrNone)
   187 				if(ret!=KErrNone)
   182 					{
   188 					{
   183 					LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   189 					OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_4, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   184 					IMPUError = ETrue;
   190 					IMPUError = ETrue;
   185 					break;
   191 					break;
   186 					}
   192 					}
   187 				else
   193 				else
   188 					{
   194 					{
   191 					}
   197 					}
   192 				}
   198 				}
   193 			
   199 			
   194 			if(IMPUError)
   200 			if(IMPUError)
   195 				{
   201 				{
   196 				LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   202 				OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_5, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   197 				continue;
   203 				continue;
   198 				}
   204 				}
   199 			else
   205 			else
   200 				{
   206 				{
   201 				authorizationInfo.iIMPUArray = IMPUArray;	
   207 				authorizationInfo.iIMPUArray = IMPUArray;	
   204 			
   210 			
   205 		//Get the HNDN
   211 		//Get the HNDN
   206 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,HNDN);
   212 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,HNDN);
   207 		if(ret!=KErrNone)
   213 		if(ret!=KErrNone)
   208 			{
   214 			{
   209 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   215 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_6, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   210 			continue;
   216 			continue;
   211 			}
   217 			}
   212 		else
   218 		else
   213 			{
   219 			{
   214 			authorizationInfo.iHomeNetworkDomainName.Copy(HNDN);
   220 			authorizationInfo.iHomeNetworkDomainName.Copy(HNDN);
   217 			
   223 			
   218 		//Get the Authorization Data Source
   224 		//Get the Authorization Data Source
   219 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,authorizationDataSource);
   225 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,authorizationDataSource);
   220 		if(ret!=KErrNone)
   226 		if(ret!=KErrNone)
   221 			{
   227 			{
   222 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   228 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_7, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   223 			continue;
   229 			continue;
   224 			}
   230 			}
   225 		else
   231 		else
   226 			{
   232 			{
   227 			authorizationInfo.iAuthenticationDataSource = 
   233 			authorizationInfo.iAuthenticationDataSource = 
   232 		
   238 		
   233 		//Get the Authorization Info change delay
   239 		//Get the Authorization Info change delay
   234 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,infoChangeDelay);
   240 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,delimiterNum,infoChangeDelay);
   235 		if(ret!=KErrNone)
   241 		if(ret!=KErrNone)
   236 			{
   242 			{
   237 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   243 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHORIZATIONINFOL_8, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHORIZATION INFO TAG");
   238 			continue;
   244 			continue;
   239 			}
   245 			}
   240 		else
   246 		else
   241 			{
   247 			{
   242 			authorizationInfo.iInfoChangeDelay = infoChangeDelay;
   248 			authorizationInfo.iInfoChangeDelay = infoChangeDelay;
   257 	TInt ret=KErrNone;
   263 	TInt ret=KErrNone;
   258 	TPtrC8 AUTN, RAND, RES, IK, CK, AUTS;
   264 	TPtrC8 AUTN, RAND, RES, IK, CK, AUTS;
   259 	TInt authErr;
   265 	TInt authErr;
   260 	TAuthenticationInfo authenticationInfo;
   266 	TAuthenticationInfo authenticationInfo;
   261 	
   267 	
   262 	LOGPHONE1("Starting to Parse IMS Authentication Info");
   268 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_1, "Starting to Parse IMS Authentication Info");
   263 	TInt count = CfgFile()->ItemCount(KAuthenticationInfo);
   269 	TInt count = CfgFile()->ItemCount(KAuthenticationInfo);
   264 	
   270 	
   265 	TInt index;
   271 	TInt index;
   266 	for(index=0; index<count; index++)
   272 	for(index=0; index<count; index++)
   267 		{
   273 		{
   273 			
   279 			
   274 		//Get the AUTN
   280 		//Get the AUTN
   275 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,AUTN);
   281 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,AUTN);
   276 		if(ret!=KErrNone)
   282 		if(ret!=KErrNone)
   277 			{
   283 			{
   278 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   284 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_2, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   279 			continue;
   285 			continue;
   280 			}
   286 			}
   281 		else
   287 		else
   282 			{
   288 			{
   283 			authenticationInfo.iAUTN.Copy(AUTN);
   289 			authenticationInfo.iAUTN.Copy(AUTN);
   285 
   291 
   286 		//Get the RAND
   292 		//Get the RAND
   287 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,RAND);
   293 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,RAND);
   288 		if(ret!=KErrNone)
   294 		if(ret!=KErrNone)
   289 			{
   295 			{
   290 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   296 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_3, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   291 			continue;
   297 			continue;
   292 			}
   298 			}
   293 		else
   299 		else
   294 			{
   300 			{
   295 			authenticationInfo.iRAND.Copy(RAND);
   301 			authenticationInfo.iRAND.Copy(RAND);
   297 
   303 
   298 		//Get the RES
   304 		//Get the RES
   299 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,RES);
   305 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,RES);
   300 		if(ret!=KErrNone)
   306 		if(ret!=KErrNone)
   301 			{
   307 			{
   302 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   308 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_4, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   303 			continue;
   309 			continue;
   304 			}
   310 			}
   305 		else
   311 		else
   306 			{
   312 			{
   307 			authenticationInfo.iRES.Copy(RES);
   313 			authenticationInfo.iRES.Copy(RES);
   309 		
   315 		
   310 		//Get the IK
   316 		//Get the IK
   311 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,IK);
   317 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,IK);
   312 		if(ret!=KErrNone)
   318 		if(ret!=KErrNone)
   313 			{
   319 			{
   314 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   320 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_5, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   315 			continue;
   321 			continue;
   316 			}
   322 			}
   317 		else
   323 		else
   318 			{
   324 			{
   319 			authenticationInfo.iIK.Copy(IK);
   325 			authenticationInfo.iIK.Copy(IK);
   321 
   327 
   322 		//Get the CK
   328 		//Get the CK
   323 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,CK);
   329 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,CK);
   324 		if(ret!=KErrNone)
   330 		if(ret!=KErrNone)
   325 			{
   331 			{
   326 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   332 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_6, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   327 			continue;
   333 			continue;
   328 			}
   334 			}
   329 		else
   335 		else
   330 			{
   336 			{
   331 			authenticationInfo.iCK.Copy(CK);
   337 			authenticationInfo.iCK.Copy(CK);
   333 
   339 
   334 		//Get the AUTS
   340 		//Get the AUTS
   335 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,AUTS);
   341 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,AUTS);
   336 		if(ret!=KErrNone)
   342 		if(ret!=KErrNone)
   337 			{
   343 			{
   338 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   344 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_7, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   339 			continue;
   345 			continue;
   340 			}
   346 			}
   341 		else
   347 		else
   342 			{
   348 			{
   343 			authenticationInfo.iAUTS.Copy(AUTS);
   349 			authenticationInfo.iAUTS.Copy(AUTS);
   345 		
   351 		
   346 		//Get authentication error
   352 		//Get authentication error
   347 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,authErr);
   353 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,authErr);
   348 		if(ret!=KErrNone)
   354 		if(ret!=KErrNone)
   349 			{
   355 			{
   350 			LOGPHONE1("ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   356 			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PARSEAUTHENTICATIONINFOL_8, "ERROR IN CONFIGURATION FILE PARSING: BAD AUTHENTICATION INFO TAG");
   351 			continue;
   357 			continue;
   352 			}
   358 			}
   353 		else
   359 		else
   354 			{
   360 			{
   355 			authenticationInfo.iAuthenticationErr = authErr;
   361 			authenticationInfo.iAuthenticationErr = authErr;
   360 	}
   366 	}
   361 
   367 
   362 TInt CSimPhoneIMSAuth::GetAuthorizationInfoPhase1(const TTsyReqHandle aTsyReqHandle, 
   368 TInt CSimPhoneIMSAuth::GetAuthorizationInfoPhase1(const TTsyReqHandle aTsyReqHandle, 
   363 			RMobilePhone::TClientId* aClientId,TInt* aBufSize)
   369 			RMobilePhone::TClientId* aClientId,TInt* aBufSize)
   364 	{
   370 	{
   365 	LOGPHONE1("CSimPhoneIMSAuth::GetAuthorizationInfoPhase1 called");
   371 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_GETAUTHORIZATIONINFOPHASE1_1, "CSimPhoneIMSAuth::GetAuthorizationInfoPhase1 called");
   366 	TInt ret(KErrNone);
   372 	TInt ret(KErrNone);
   367 	TInt leaveCode(KErrNone);
   373 	TInt leaveCode(KErrNone);
   368 	TRAP(leaveCode, ret=ProcessGetAuthorizationInfoPhase1L(aTsyReqHandle, aClientId, aBufSize););
   374 	TRAP(leaveCode, ret=ProcessGetAuthorizationInfoPhase1L(aTsyReqHandle, aClientId, aBufSize););
   369 	if (leaveCode != KErrNone)
   375 	if (leaveCode != KErrNone)
   370 		{
   376 		{
   376 
   382 
   377 
   383 
   378 TInt CSimPhoneIMSAuth::ProcessGetAuthorizationInfoPhase1L(const TTsyReqHandle aTsyReqHandle,
   384 TInt CSimPhoneIMSAuth::ProcessGetAuthorizationInfoPhase1L(const TTsyReqHandle aTsyReqHandle,
   379 			RMobilePhone::TClientId* aClientId, TInt* aBufSize)
   385 			RMobilePhone::TClientId* aClientId, TInt* aBufSize)
   380 	{
   386 	{
   381 		LOGPHONE1("CSimPhoneIMSAuth::GetAuthorizationInfoPhase1 called");	
   387 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_PROCESSGETAUTHORIZATIONINFOPHASE1L_1, "CSimPhoneIMSAuth::GetAuthorizationInfoPhase1 called");
   382 
   388 
   383 	// Store the streamed list and the client ID
   389 	// Store the streamed list and the client ID
   384 	CListReadAllAttempt* read=CListReadAllAttempt::NewL(*aClientId,aTsyReqHandle);
   390 	CListReadAllAttempt* read=CListReadAllAttempt::NewL(*aClientId,aTsyReqHandle);
   385 	CleanupStack::PushL(read);
   391 	CleanupStack::PushL(read);
   386 	
   392 	
   437 
   443 
   438 
   444 
   439 TInt CSimPhoneIMSAuth::GetAuthorizationInfoPhase2(const TTsyReqHandle aTsyReqHandle,
   445 TInt CSimPhoneIMSAuth::GetAuthorizationInfoPhase2(const TTsyReqHandle aTsyReqHandle,
   440 			RMobilePhone::TClientId* aClientId, TDes8* aBuffer)
   446 			RMobilePhone::TClientId* aClientId, TDes8* aBuffer)
   441 	{
   447 	{
   442 	LOGPHONE1("CSimPhoneIMSAuth::GetAuthorizationInfoPhase2 called");	
   448 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_GETAUTHORIZATIONINFOPHASE2_1, "CSimPhoneIMSAuth::GetAuthorizationInfoPhase2 called");
   443 	CListReadAllAttempt* read=NULL;
   449 	CListReadAllAttempt* read=NULL;
   444 
   450 
   445 	// Find the get Authorization Info attempt from this client
   451 	// Find the get Authorization Info attempt from this client
   446 	TInt index;
   452 	TInt index;
   447 	for (index = 0; index < iGetAuthorizationData->Count(); index++)
   453 	for (index = 0; index < iGetAuthorizationData->Count(); index++)
   464 	}
   470 	}
   465 
   471 
   466 
   472 
   467 TInt CSimPhoneIMSAuth::GetAuthorizationInfoCancel(const TTsyReqHandle aTsyReqHandle)
   473 TInt CSimPhoneIMSAuth::GetAuthorizationInfoCancel(const TTsyReqHandle aTsyReqHandle)
   468 	{
   474 	{
   469 	LOGPHONE1("CSimPhoneIMSAuth::GetAuthorizationInfoCancel called");
   475 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_GETAUTHORIZATIONINFOCANCEL_1, "CSimPhoneIMSAuth::GetAuthorizationInfoCancel called");
   470 
   476 
   471 	// Remove the read all attempt from iGetAuthorizationData
   477 	// Remove the read all attempt from iGetAuthorizationData
   472 	CListReadAllAttempt* read=NULL;
   478 	CListReadAllAttempt* read=NULL;
   473 	TInt index;
   479 	TInt index;
   474 	for (index = 0; index <iGetAuthorizationData->Count(); index++)
   480 	for (index = 0; index <iGetAuthorizationData->Count(); index++)
   487 	}
   493 	}
   488 
   494 
   489 
   495 
   490 TInt CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChanged(const TTsyReqHandle aTsyReqHandle)
   496 TInt CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChanged(const TTsyReqHandle aTsyReqHandle)
   491 	{
   497 	{
   492 	LOGPHONE1("CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChanged called");
   498 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_NOTIFYIMSAUTHORIZATIONINFOCHANGED_1, "CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChanged called");
   493 	__ASSERT_ALWAYS(!iAuthInfoChangeNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding));
   499 	__ASSERT_ALWAYS(!iAuthInfoChangeNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding));
   494 
   500 
   495 	TInt count=iAuthorizationInfoList.Count();
   501 	TInt count=iAuthorizationInfoList.Count();
   496 	if(iCurrentAuthorizationInfo < count)
   502 	if(iCurrentAuthorizationInfo < count)
   497 		{
   503 		{
   506 	}
   512 	}
   507 
   513 
   508 
   514 
   509 TInt CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChangedCancel(const TTsyReqHandle aTsyReqHandle)
   515 TInt CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChangedCancel(const TTsyReqHandle aTsyReqHandle)
   510 	{
   516 	{
   511 	LOGPHONE1("CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChangedCancel called");
   517 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_NOTIFYIMSAUTHORIZATIONINFOCHANGEDCANCEL_1, "CSimPhoneIMSAuth::NotifyImsAuthorizationInfoChangedCancel called");
   512 	if(iAuthInfoChangeNotifyPending)
   518 	if(iAuthInfoChangeNotifyPending)
   513 		{
   519 		{
   514 		if(iTimerStarted)
   520 		if(iTimerStarted)
   515 			{
   521 			{
   516 			iTimer->Cancel();
   522 			iTimer->Cancel();
   524 	}
   530 	}
   525 
   531 
   526 
   532 
   527 TInt CSimPhoneIMSAuth::GetAuthenticationData(const TTsyReqHandle aTsyReqHandle,TDes8* aAuthenticationData)
   533 TInt CSimPhoneIMSAuth::GetAuthenticationData(const TTsyReqHandle aTsyReqHandle,TDes8* aAuthenticationData)
   528 	{
   534 	{
   529 	LOGPHONE1("CSimPhoneIMSAuth::AuthentificationData called");
   535 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_GETAUTHENTICATIONDATA_1, "CSimPhoneIMSAuth::AuthentificationData called");
   530 
   536 
   531 	RMobilePhone::TImsAuthenticateDataV5Pckg* authenticateDataPckgd =
   537 	RMobilePhone::TImsAuthenticateDataV5Pckg* authenticateDataPckgd =
   532 			(RMobilePhone::TImsAuthenticateDataV5Pckg*)aAuthenticationData;
   538 			(RMobilePhone::TImsAuthenticateDataV5Pckg*)aAuthenticationData;
   533 	RMobilePhone::TImsAuthenticateDataV5& authenticateData=(*authenticateDataPckgd)();
   539 	RMobilePhone::TImsAuthenticateDataV5& authenticateData=(*authenticateDataPckgd)();
   534 
   540 
   572 	}
   578 	}
   573 
   579 
   574 
   580 
   575 TInt CSimPhoneIMSAuth::GetAuthenticationDataCancel(const TTsyReqHandle aTsyReqHandle)
   581 TInt CSimPhoneIMSAuth::GetAuthenticationDataCancel(const TTsyReqHandle aTsyReqHandle)
   576 	{
   582 	{
   577 	LOGPHONE1("CSimPhoneIMSAuth::AuthentificationDatCancel called");	
   583 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHONEIMSAUTH_GETAUTHENTICATIONDATACANCEL_1, "CSimPhoneIMSAuth::AuthentificationDatCancel called");
   578 	iPhone->ReqCompleted(aTsyReqHandle, KErrCancel);
   584 	iPhone->ReqCompleted(aTsyReqHandle, KErrCancel);
   579 	return KErrNone;
   585 	return KErrNone;
   580 	}
   586 	}