remotelock/RemoteLockEngine/Src/RemoteLock.cpp
branchRCL_3
changeset 50 03674e5abf46
parent 49 09b1ac925e3f
--- a/remotelock/RemoteLockEngine/Src/RemoteLock.cpp	Tue Aug 31 16:04:40 2010 +0300
+++ b/remotelock/RemoteLockEngine/Src/RemoteLock.cpp	Wed Sep 01 12:19:59 2010 +0100
@@ -33,7 +33,6 @@
 #include <pathinfo.h> 
 #endif //RD_MULTIPLE_DRIVE 
 #include <coreapplicationuisdomainpskeys.h>
-#include <CoreApplicationUIsSDKCRKeys.h>
 #include <charconv.h>
 #include <ProfileEngineSDKCRKeys.h>
 #include <Profile.hrh>
@@ -626,7 +625,7 @@
        if ( !iProfileSession )
            {
            RL_TRACE_PRINT(" [ rl.exe ] CheckSettingsL() create session "); 
-           iProfileSession = CRepository::NewL( KCRUidCoreApplicationUIs );	// previously it was	KCRUidProfileEngine
+           iProfileSession = CRepository::NewL( KCRUidProfileEngine ); 
            }
        if ( !iObserver )
            {
@@ -656,7 +655,7 @@
             if ( !iProfileSession )
                 {
                 RL_TRACE_PRINT(" [ rl.exe ] CheckSettingsL() create session "); 
-                iProfileSession = CRepository::NewL( KCRUidCoreApplicationUIs );	// previously it was	KCRUidProfileEngine
+                iProfileSession = CRepository::NewL( KCRUidProfileEngine ); 
                 }
             ProfileNotifyL( EFalse );
             delete iProfileSession;
@@ -1459,10 +1458,7 @@
     if ( aNotifyEnable )
         {
         
-        TInt err = iProfileSession->Get( KCoreAppUIsNetworkConnectionAllowed , iCurrentProfile );	// previously was KProEngActiveProfile
-        RL_TRACE_PRINT_NUM("[rl.exe] HandleNotifyGeneric() err = %d", err );
-    		RL_TRACE_PRINT_NUM("[rl.exe] HandleNotifyGeneric() iCurrentProfile = %d", iCurrentProfile );
-
+        TInt err = iProfileSession->Get( KProEngActiveProfile, iCurrentProfile );
         User::LeaveIfError( err );
         RL_TRACE_PRINT(" [ rl.exe ] ProfileNotifyL() startlisten");
         iProfileNotifyHandler->StartListeningL();  
@@ -1490,9 +1486,7 @@
     {
     RL_TRACE_PRINT(" [ rl.exe ] GetProfile() ");
     TInt err;
-    err = iProfileSession->Get( KCoreAppUIsNetworkConnectionAllowed , aProfile );	// previously was KProEngActiveProfile
-		RL_TRACE_PRINT_NUM("[rl.exe] HandleNotifyGeneric() err = %d", err );
-
+    err = iProfileSession->Get( KProEngActiveProfile, aProfile );
     RL_TRACE_PRINT(" [ rl.exe ] exit GetProfile() ");
     return ( err == KErrNone );
     }    
@@ -1511,9 +1505,8 @@
     
     TInt profile = 0; 
     GetProfile( profile ); 
-    RL_TRACE_PRINT_NUM("[rl.exe] HandleNotifyGeneric() profile = %d", profile );
-    RL_TRACE_PRINT_NUM("[rl.exe] HandleNotifyGeneric() iCurrentProfile = %d", iCurrentProfile );
-    if ( ( profile == ECoreAppUIsNetworkConnectionNotAllowed ) && ( iIsEnabled  ) && ( iCurrentProfile != ECoreAppUIsNetworkConnectionNotAllowed )) 
+    
+    if ( ( profile == EProfileOffLineId ) && ( iIsEnabled  ) && ( iCurrentProfile != EProfileOffLineId )) 
         {
         ActivateDeviceLock();  
         }