syncmlfw/ds/dsutils/ProfileUtil/testprofileutil/src/testsync.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
   265 	iPrgCurStatus = aStatus; 
   265 	iPrgCurStatus = aStatus; 
   266 	
   266 	
   267 	switch(iInterruptStage)
   267 	switch(iInterruptStage)
   268 	{
   268 	{
   269 		case 1:if(aStatus==ESmlConnecting)
   269 		case 1:if(aStatus==ESmlConnecting)
   270 	              OfflineModeL();
   270 	           {
   271 	           break;
   271   				iProfileEngine = CreateProfileEngineExtendedL();
       
   272   				iProfileEngine->SetActiveProfileL( 5);	
       
   273   				iProfileEngine->Release();
       
   274 	           }		  
       
   275 		      break;
   272 		case 2:if(aStatus==ESmlConnected)
   276 		case 2:if(aStatus==ESmlConnected)
   273                   OfflineModeL();
   277 	           {
   274 		       break;
   278   				iProfileEngine = CreateProfileEngineExtendedL();
       
   279   				iProfileEngine->SetActiveProfileL( 5);	
       
   280   				iProfileEngine->Release();
       
   281 	           }
       
   282 		
       
   283 		      break;
   275 		case 3:if(aStatus==ESmlLoggingOn)
   284 		case 3:if(aStatus==ESmlLoggingOn)
   276 		          OfflineModeL();
   285 	           {
       
   286   				iProfileEngine = CreateProfileEngineExtendedL();
       
   287   				iProfileEngine->SetActiveProfileL( 5);	
       
   288   				iProfileEngine->Release();
       
   289 	           }
   277 		      break;
   290 		      break;
   278 		case 4:if(aStatus==ESmlLoggedOn)
   291 		case 4:if(aStatus==ESmlLoggedOn)
   279 		          OfflineModeL();
   292 	           {
       
   293   				iProfileEngine = CreateProfileEngineExtendedL();
       
   294   				iProfileEngine->SetActiveProfileL( 5);	
       
   295   				iProfileEngine->Release();
       
   296 	           }
   280 		      break;
   297 		      break;
   281 		case 5:if(aStatus==ESmlSendingModificationsToServer)
   298 		case 5:if(aStatus==ESmlSendingModificationsToServer)
   282 		          OfflineModeL();
   299 	           {
   283 		      break;		      
   300   				iProfileEngine = CreateProfileEngineExtendedL();
       
   301   				iProfileEngine->SetActiveProfileL( 5);	
       
   302   				iProfileEngine->Release();
       
   303 	           }
       
   304 		      break;
       
   305 		      
   284 	    case 6:if(aStatus==ESmlReceivingModificationsFromServer)
   306 	    case 6:if(aStatus==ESmlReceivingModificationsFromServer)
   285                   OfflineModeL();
   307 	           {
       
   308   				iProfileEngine = CreateProfileEngineExtendedL();
       
   309   				iProfileEngine->SetActiveProfileL( 5);	
       
   310   				iProfileEngine->Release();
       
   311 	           }
   286 		      break;
   312 		      break;
   287 	   case 7:if(aStatus==ESmlSendingMappingsToServer)
   313 	   case 7:if(aStatus==ESmlSendingMappingsToServer)
   288 	             OfflineModeL();
   314 	           {
       
   315   				iProfileEngine = CreateProfileEngineExtendedL();
       
   316   				iProfileEngine->SetActiveProfileL( 5);	
       
   317   				iProfileEngine->Release();
       
   318 	           }
   289 		      break;
   319 		      break;
   290 		default:
   320 		default:
   291 		      break;
   321 		      break;
   292 		    
   322 		    
   293 	}
   323 	}
   300                       const TSyncMLDataSyncModifications& aServerModifications)
   330                       const TSyncMLDataSyncModifications& aServerModifications)
   301 {
   331 {
   302 	//Do Nothing
   332 	//Do Nothing
   303 }
   333 }
   304 
   334 
   305 void CSync::OfflineModeL()
   335 
   306 {
   336 
   307     CRepository* repository = CRepository::NewL(KCRUidCoreApplicationUIs);
       
   308     TInt err = repository->Set(KCoreAppUIsNetworkConnectionAllowed, 
       
   309             ECoreAppUIsNetworkConnectionNotAllowed);
       
   310     if(repository)
       
   311            delete repository;
       
   312     User::LeaveIfError(err);    
       
   313   
       
   314 }
       
   315 
       
   316