emailservices/emailserver/cmailhandlerplugin/src/emailsoundhandler.cpp
branchRCL_3
changeset 61 dcf0eedfc1a3
parent 60 d620048b4810
equal deleted inserted replaced
60:d620048b4810 61:dcf0eedfc1a3
   229     TBool mailVibraEnabled = vibraEnabled & profile->ProfileTones().ToneSettings().iEmailVibratingAlert;
   229     TBool mailVibraEnabled = vibraEnabled & profile->ProfileTones().ToneSettings().iEmailVibratingAlert;
   230 
   230 
   231     TInt preference = KAudioPrefNewSpecialMessage;
   231     TInt preference = KAudioPrefNewSpecialMessage;
   232     if ( !mailVibraEnabled )
   232     if ( !mailVibraEnabled )
   233         {
   233         {
   234         preference = EMdaPriorityPreferenceQuality;
   234         preference = KAudioPrefNewEmail; // Used in TB.92 only! In 10.X adaptation will manage vibra setting itself.
   235         }
   235         }
   236 
   236 
   237     if (IsBeepOnceSetL(*profile))
   237     if (IsBeepOnceSetL(*profile))
   238         {
   238         {
   239 
   239 
   253         if ( (fileToPlay.Compare(KProfileSilentTone) == 0) &&
   253         if ( (fileToPlay.Compare(KProfileSilentTone) == 0) &&
   254                 (!vibraEnabled) )
   254                 (!vibraEnabled) )
   255             {
   255             {
   256             // Play the silent tone with KAudioPrefNewSpecialMessage
   256             // Play the silent tone with KAudioPrefNewSpecialMessage
   257             // in order to avoid the distortion
   257             // in order to avoid the distortion
   258 			// KAudioPrefNewSpecialMessage does not play vibra if KProfileSilentTone is played
   258             // KAudioPrefNewSpecialMessage does not play vibra if KProfileSilentTone is played
   259             preference = KAudioPrefNewSpecialMessage;
   259             preference = KAudioPrefNewSpecialMessage;
   260             }
   260             }
   261         RFs fs;
   261         RFs fs;
   262         TInt err = fs.Connect();
   262         TInt err = fs.Connect();
   263 		CleanupClosePushL( fs );
   263         CleanupClosePushL( fs );
   264             
   264             
   265         if ( err == KErrNone )
   265         if ( err == KErrNone )
   266             {
   266             {
   267             TChar chr = fileToPlay[0];
   267             TChar chr = fileToPlay[0];
   268             TInt drive;
   268             TInt drive;
   281                 //if the file set in profile does not exist, we use default
   281                 //if the file set in profile does not exist, we use default
   282                 fileToPlay.Zero();
   282                 fileToPlay.Zero();
   283                 fileToPlay.Append( KDefaultEmailTone );
   283                 fileToPlay.Append( KDefaultEmailTone );
   284                 }
   284                 }
   285             
   285             
   286 		    CleanupStack::PopAndDestroy( &fs );
   286             CleanupStack::PopAndDestroy( &fs );
   287             }
   287             }
   288         
   288         
   289         iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL( 
   289         iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL( 
   290                 fileToPlay,
   290                 fileToPlay,
   291                 *this, 
   291                 *this,