realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp
branchRCL_3
changeset 56 2c7192069824
parent 49 0a1ad22c7bdc
equal deleted inserted replaced
49:0a1ad22c7bdc 56:2c7192069824
   364 	{
   364 	{
   365 	TInt index = iObservers.Find(&aObserver);
   365 	TInt index = iObservers.Find(&aObserver);
   366 	if (index != KErrNotFound)
   366 	if (index != KErrNotFound)
   367 		{
   367 		{
   368 		iObservers.Remove(index);
   368 		iObservers.Remove(index);
   369 		iObservers.Compress();
       
   370 		}
   369 		}
   371 
   370 
   372 	RemoveFromPendingObservers(aObserver);
   371 	RemoveFromPendingObservers(aObserver);
   373 	}
   372 	}
   374 
   373 
   401 	{
   400 	{
   402 	TInt index = iUsers.Find(&aObserver);
   401 	TInt index = iUsers.Find(&aObserver);
   403 	if (index != KErrNotFound)
   402 	if (index != KErrNotFound)
   404 		{
   403 		{
   405 		iUsers.Remove(index);
   404 		iUsers.Remove(index);
   406 		iUsers.Compress();
       
   407 		CheckProfileEnabledState();
   405 		CheckProfileEnabledState();
   408 		}
   406 		}
   409 	}
   407 	}
   410 
   408 
   411 // -----------------------------------------------------------------------------
   409 // -----------------------------------------------------------------------------
   969 		{
   967 		{
   970 		// Stop monitoring the old SNAP id
   968 		// Stop monitoring the old SNAP id
   971 		StopSnapMonitoring();
   969 		StopSnapMonitoring();
   972 		}
   970 		}
   973 
   971 
   974 	if (!iMigrationController) 
   972 	if (!iMigrationController)
   975 		{
   973 		{
   976 	    TUint32 bearerId = BearerID();
   974 		iMigrationController = &iServerCore.MigrationControllerL(aSnapId);
   977 	    TSipSNAPConfigurationData aSnapData(aSnapId,bearerId);
       
   978 		iMigrationController = &iServerCore.MigrationControllerL(aSnapData);
       
   979 		PROFILE_DEBUG3("ProfileCacheItem::BearerFilter value is", bearerId)
       
   980 		TUint32 iapId = iMigrationController->AttachProfileL(*this);
   975 		TUint32 iapId = iMigrationController->AttachProfileL(*this);
   981 		if (iapId)
   976 		if (iapId)
   982 			{
   977 			{
   983 			// Initial IAP obtained
   978 			// Initial IAP obtained
   984 			aRegInProg.RegisterWithIapL(*this, iapId, aRegInProg);
   979 			aRegInProg.RegisterWithIapL(*this, iapId, aRegInProg);
  1256 	{
  1251 	{
  1257 	TInt index = iObserversWaitedForPermission.Find(&aObserver);
  1252 	TInt index = iObserversWaitedForPermission.Find(&aObserver);
  1258 	if (index != KErrNotFound)
  1253 	if (index != KErrNotFound)
  1259 		{
  1254 		{
  1260 		iObserversWaitedForPermission.Remove(index);
  1255 		iObserversWaitedForPermission.Remove(index);
  1261 		iObserversWaitedForPermission.Compress();
       
  1262 		}
  1256 		}
  1263 	}
  1257 	}
  1264 
  1258 
  1265 // -----------------------------------------------------------------------------
  1259 // -----------------------------------------------------------------------------
  1266 // CSIPProfileCacheItem::DoNewIapFailed
  1260 // CSIPProfileCacheItem::DoNewIapFailed
  1407 TBool CSIPProfileCacheItem::IsOfflineInitiated() const
  1401 TBool CSIPProfileCacheItem::IsOfflineInitiated() const
  1408     {
  1402     {
  1409     return iIsOfflineInitiated;
  1403     return iIsOfflineInitiated;
  1410     }
  1404     }
  1411 
  1405 
  1412 // -----------------------------------------------------------------------------
       
  1413 // CSIPProfileCacheItem::BearerID
       
  1414 // This function will return the Bearer ID of the Profile.
       
  1415 // -----------------------------------------------------------------------------
       
  1416 //
       
  1417 TUint32 CSIPProfileCacheItem::BearerID()
       
  1418 {   TUint32 bearerId(0);
       
  1419     LatestProfile().ExtensionParameter(KBearerType , bearerId);
       
  1420     return bearerId;
       
  1421 }
       
  1422 
       
  1423 // -----------------------------------------------------------------------------
       
  1424 // CSIPProfileCacheItem::HasQueuedUpdate
       
  1425 // This function will return true if profile updated and not yet processed
       
  1426 // false otherwise 
       
  1427 // -----------------------------------------------------------------------------
       
  1428 //
       
  1429 TBool CSIPProfileCacheItem::HasQueuedUpdate() const
       
  1430     {
       
  1431     return (iQueuedProfile != NULL);
       
  1432     }