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