syncmlfw/ds/dsutils/ProfileUtil/testprofileutil/src/testsync.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
--- a/syncmlfw/ds/dsutils/ProfileUtil/testprofileutil/src/testsync.cpp	Tue Aug 31 16:04:06 2010 +0300
+++ b/syncmlfw/ds/dsutils/ProfileUtil/testprofileutil/src/testsync.cpp	Wed Sep 01 12:27:42 2010 +0100
@@ -267,25 +267,55 @@
 	switch(iInterruptStage)
 	{
 		case 1:if(aStatus==ESmlConnecting)
-	              OfflineModeL();
-	           break;
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }		  
+		      break;
 		case 2:if(aStatus==ESmlConnected)
-                  OfflineModeL();
-		       break;
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }
+		
+		      break;
 		case 3:if(aStatus==ESmlLoggingOn)
-		          OfflineModeL();
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }
 		      break;
 		case 4:if(aStatus==ESmlLoggedOn)
-		          OfflineModeL();
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }
 		      break;
 		case 5:if(aStatus==ESmlSendingModificationsToServer)
-		          OfflineModeL();
-		      break;		      
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }
+		      break;
+		      
 	    case 6:if(aStatus==ESmlReceivingModificationsFromServer)
-                  OfflineModeL();
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }
 		      break;
 	   case 7:if(aStatus==ESmlSendingMappingsToServer)
-	             OfflineModeL();
+	           {
+  				iProfileEngine = CreateProfileEngineExtendedL();
+  				iProfileEngine->SetActiveProfileL( 5);	
+  				iProfileEngine->Release();
+	           }
 		      break;
 		default:
 		      break;
@@ -302,15 +332,5 @@
 	//Do Nothing
 }
 
-void CSync::OfflineModeL()
-{
-    CRepository* repository = CRepository::NewL(KCRUidCoreApplicationUIs);
-    TInt err = repository->Set(KCoreAppUIsNetworkConnectionAllowed, 
-            ECoreAppUIsNetworkConnectionNotAllowed);
-    if(repository)
-           delete repository;
-    User::LeaveIfError(err);    
-  
-}