syncmlfw/ds/dsutils/ProfileUtil/testprofileutil/src/testsync.cpp
branchRCL_3
changeset 61 b183ec05bd8c
parent 0 b497e44ab2fc
child 62 19bba8228ff0
equal deleted inserted replaced
59:13d7c31c74e0 61:b183ec05bd8c
   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 	           {
   270 	              OfflineModeL();
   271   				iProfileEngine = CreateProfileEngineExtendedL();
   271 	           break;
   272   				iProfileEngine->SetActiveProfileL( 5);	
       
   273   				iProfileEngine->Release();
       
   274 	           }		  
       
   275 		      break;
       
   276 		case 2:if(aStatus==ESmlConnected)
   272 		case 2:if(aStatus==ESmlConnected)
   277 	           {
   273                   OfflineModeL();
   278   				iProfileEngine = CreateProfileEngineExtendedL();
   274 		       break;
   279   				iProfileEngine->SetActiveProfileL( 5);	
       
   280   				iProfileEngine->Release();
       
   281 	           }
       
   282 		
       
   283 		      break;
       
   284 		case 3:if(aStatus==ESmlLoggingOn)
   275 		case 3:if(aStatus==ESmlLoggingOn)
   285 	           {
   276 		          OfflineModeL();
   286   				iProfileEngine = CreateProfileEngineExtendedL();
       
   287   				iProfileEngine->SetActiveProfileL( 5);	
       
   288   				iProfileEngine->Release();
       
   289 	           }
       
   290 		      break;
   277 		      break;
   291 		case 4:if(aStatus==ESmlLoggedOn)
   278 		case 4:if(aStatus==ESmlLoggedOn)
   292 	           {
   279 		          OfflineModeL();
   293   				iProfileEngine = CreateProfileEngineExtendedL();
       
   294   				iProfileEngine->SetActiveProfileL( 5);	
       
   295   				iProfileEngine->Release();
       
   296 	           }
       
   297 		      break;
   280 		      break;
   298 		case 5:if(aStatus==ESmlSendingModificationsToServer)
   281 		case 5:if(aStatus==ESmlSendingModificationsToServer)
   299 	           {
   282 		          OfflineModeL();
   300   				iProfileEngine = CreateProfileEngineExtendedL();
   283 		      break;		      
   301   				iProfileEngine->SetActiveProfileL( 5);	
       
   302   				iProfileEngine->Release();
       
   303 	           }
       
   304 		      break;
       
   305 		      
       
   306 	    case 6:if(aStatus==ESmlReceivingModificationsFromServer)
   284 	    case 6:if(aStatus==ESmlReceivingModificationsFromServer)
   307 	           {
   285                   OfflineModeL();
   308   				iProfileEngine = CreateProfileEngineExtendedL();
       
   309   				iProfileEngine->SetActiveProfileL( 5);	
       
   310   				iProfileEngine->Release();
       
   311 	           }
       
   312 		      break;
   286 		      break;
   313 	   case 7:if(aStatus==ESmlSendingMappingsToServer)
   287 	   case 7:if(aStatus==ESmlSendingMappingsToServer)
   314 	           {
   288 	             OfflineModeL();
   315   				iProfileEngine = CreateProfileEngineExtendedL();
       
   316   				iProfileEngine->SetActiveProfileL( 5);	
       
   317   				iProfileEngine->Release();
       
   318 	           }
       
   319 		      break;
   289 		      break;
   320 		default:
   290 		default:
   321 		      break;
   291 		      break;
   322 		    
   292 		    
   323 	}
   293 	}
   330                       const TSyncMLDataSyncModifications& aServerModifications)
   300                       const TSyncMLDataSyncModifications& aServerModifications)
   331 {
   301 {
   332 	//Do Nothing
   302 	//Do Nothing
   333 }
   303 }
   334 
   304 
   335 
   305 void CSync::OfflineModeL()
   336 
   306 {
       
   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