diff -r 8bda91a87a00 -r 8ee96d21d9bf profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp --- a/profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp Thu Aug 19 10:12:30 2010 +0300 +++ b/profilesservices/ProfileEngine/EngSrc/CProfileTonesImpl.cpp Tue Aug 31 15:29:50 2010 +0300 @@ -19,14 +19,16 @@ // INCLUDE FILES #include "CProfileTonesImpl.h" +#include "ProfileEngUtils.h" +#include "ProfileEnginePrivateCRKeys.h" + #include #include -#include "ProfileEngUtils.h" -#include "ProfileEnginePrivateCRKeys.h" #include #include #include +#include // ============================ MEMBER FUNCTIONS =============================== @@ -139,19 +141,40 @@ 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( ProfileEngUtils::ResolveKey( KProEngEmailVibra, - aProfileId ), iProfileToneSettings.iEmailVibratingAlert ) ); + aCenRep.Get( KProEngMasterVibra, iProfileToneSettings.iVibratingAlert ) ); + User::LeaveIfError( aCenRep.Get( ProfileEngUtils::ResolveKey( KProEngWarnAndGameTones, aProfileId ), iProfileToneSettings.iWarningAndGameTones ) ); @@ -167,7 +190,6 @@ if ( iPowerSaveMode ) { iProfileToneSettings.iVibratingAlert = iPsmConfigVibra; - iProfileToneSettings.iEmailVibratingAlert = iPsmConfigVibra; iProfileToneSettings.iKeypadVolume = TProfileKeypadVolume( iPsmConfigKeypadVolume ); } @@ -215,11 +237,8 @@ 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 ) );