profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp
branchRCL_3
changeset 25 7e0eff37aedb
parent 24 8ee96d21d9bf
--- a/profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp	Tue Aug 31 15:29:50 2010 +0300
+++ b/profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp	Wed Sep 01 12:20:44 2010 +0100
@@ -19,16 +19,14 @@
 
 // INCLUDE FILES
 #include "CProfileTonesImpl.h"
+#include <s32strm.h>
+#include <centralrepository.h>
 #include "ProfileEngUtils.h"
 #include "ProfileEnginePrivateCRKeys.h"
-
-#include <s32strm.h>
-#include <centralrepository.h>
 #include <hwrmvibrasdkcrkeys.h>
 
 #include <psmsettings.h>
 #include <psmsrvdomaincrkeys.h>
-#include <ProfileEngineInternalCRKeys.h>
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -141,40 +139,19 @@
             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngRingingType,
             aProfileId ), value ) );
     iProfileToneSettings.iRingingType = TProfileRingingType( value );
-    
-    //Since 10.1, check if silence mode
-    User::LeaveIfError(
-            aCenRep.Get( KProEngSilenceMode , value) );
-    if ( value )
-    	{
-		iProfileToneSettings.iRingingType = EProfileRingingTypeSilent;
-    	}
-    
     User::LeaveIfError(
             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngKeypadVolume,
             aProfileId ), value ) );
     iProfileToneSettings.iKeypadVolume = TProfileKeypadVolume( value );
- /* 
-  *   User::LeaveIfError(
+    User::LeaveIfError(
             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngRingingVolume,
             aProfileId ), iProfileToneSettings.iRingingVolume ) );
-     */
-    
-    //Since 10.1, Only master volume used.
-    User::LeaveIfError(
-            aCenRep.Get( KProEngMasterVolume , iProfileToneSettings.iRingingVolume ) );
-    
-    
-    /*
     User::LeaveIfError(
             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngVibra,
             aProfileId ), iProfileToneSettings.iVibratingAlert ) );
-    */
-    
-    //Since 10.1,Only master vibra used
     User::LeaveIfError(
-            aCenRep.Get( KProEngMasterVibra, iProfileToneSettings.iVibratingAlert ) );
-            
+          aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngEmailVibra,
+           aProfileId ), iProfileToneSettings.iEmailVibratingAlert ) );   
     User::LeaveIfError(
             aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngWarnAndGameTones,
             aProfileId ), iProfileToneSettings.iWarningAndGameTones ) );
@@ -190,6 +167,7 @@
     if ( iPowerSaveMode )
         {
         iProfileToneSettings.iVibratingAlert = iPsmConfigVibra;
+        iProfileToneSettings.iEmailVibratingAlert = iPsmConfigVibra;
         iProfileToneSettings.iKeypadVolume = 
                              TProfileKeypadVolume( iPsmConfigKeypadVolume );
         }
@@ -237,8 +215,11 @@
         User::LeaveIfError(
                 aCenRep.Set( ProfileEngUtils::ResolveKey( KProEngVibra,
                 aProfileId ), iProfileToneSettings.iVibratingAlert ) );        
-        }
-    
+        
+   User::LeaveIfError(
+             aCenRep.Set( ProfileEngUtils::ResolveKey( KProEngEmailVibra,
+             aProfileId ), iProfileToneSettings.iEmailVibratingAlert ) );   
+     }
     User::LeaveIfError(
             aCenRep.Set( ProfileEngUtils::ResolveKey( KProEngWarnAndGameTones,
             aProfileId ), iProfileToneSettings.iWarningAndGameTones ) );