phoneapp/phoneringingtoneplayer/src/cphoneringingtonecontroller.cpp
changeset 78 baacf668fe89
parent 76 cfea66083b62
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include <telephonyvariant.hrh>
       
    20 #include "cphoneringingtonecontroller.h"
       
    21 #include "phonelogger.h"
       
    22 #include "cphoneringingtone.h"
       
    23 #include "tphonecmdparamringtone.h"
       
    24 #include "cphonecenrepproxy.h"
       
    25 #include "cphoneringingtoneplayer.h"
       
    26 #include "cphonettsplayer.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 
       
    31 // ============================ MEMBER FUNCTIONS ===============================
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CPhoneRingingToneController::NewL
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 EXPORT_C CPhoneRingingToneController* CPhoneRingingToneController::NewL()
       
    38     {
       
    39     CPhoneRingingToneController* self = 
       
    40         new ( ELeave ) CPhoneRingingToneController();
       
    41     
       
    42     CleanupStack::PushL( self );
       
    43     self->ConstructL();
       
    44     CleanupStack::Pop( self );
       
    45 
       
    46     return self;
       
    47     }
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // CPhoneRingingToneController::CPhoneRingingToneController
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 CPhoneRingingToneController::CPhoneRingingToneController()
       
    54     {
       
    55     }
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CPhoneRingingToneController::ConstructL
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 void CPhoneRingingToneController::ConstructL()
       
    62     {
       
    63     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::ConstructL()" );
       
    64     //iMediatorSender = CPhoneMediatorSender::NewL();
       
    65     //iMediatorSender->AttachCoverUiObserverL( this );
       
    66     
       
    67     iRingingtonePlayer = CPhoneRingingtonePlayer::NewL(); 
       
    68 
       
    69     // Check video player configuration.
       
    70     iArbitraryVideoScaling = 
       
    71     CPhoneCenRepProxy::Instance()->IsTelephonyFeatureSupported( 
       
    72             KTelephonyLVFlagArbitraryVideoScaling );
       
    73 
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CPhoneRingingToneController::~CPhoneRingingToneController
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 CPhoneRingingToneController::~CPhoneRingingToneController()
       
    81     {
       
    82     /*if ( iMediatorSender )
       
    83         {
       
    84         iMediatorSender->DetachCoverUiObserver( this );
       
    85         }*/
       
    86 
       
    87     //delete iMediatorSender;
       
    88     //iMediatorSender = NULL
       
    89     
       
    90     
       
    91     delete iAudioVideoRingingTone;
       
    92     iAudioVideoRingingTone = NULL;
       
    93     delete iTTSPlayer;
       
    94     iTTSPlayer = NULL;
       
    95     delete iRingingtonePlayer;
       
    96     iRingingtonePlayer = NULL;
       
    97     }
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // CPhoneRingingToneController::PlayRingToneL
       
   101 // -----------------------------------------------------------------------------
       
   102 //
       
   103 EXPORT_C void CPhoneRingingToneController::PlayRingToneL( 
       
   104                                          TPhoneCommandParam* aCommandParam )
       
   105     {
       
   106     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::PlayRingToneL()" );
       
   107 
       
   108     if ( aCommandParam->ParamId() == TPhoneCommandParam::EPhoneParamIdRingTone )
       
   109         {
       
   110         TPhoneCmdParamRingTone* ringToneParam = 
       
   111             static_cast<TPhoneCmdParamRingTone*>( aCommandParam );
       
   112 
       
   113         const TInt volume = ringToneParam->Volume();
       
   114         TProfileRingingType ringingType = 
       
   115         static_cast<TProfileRingingType>( ringToneParam->RingingType() );
       
   116         
       
   117         if ( !iAudioVideoRingingTone )
       
   118             {
       
   119             iAudioVideoRingingTone = CPhoneRingingTone::NewL(
       
   120                 ringToneParam->RingTone() );
       
   121             }
       
   122 
       
   123         // Store pofile based parameters.
       
   124         iAudioVideoRingingTone->SetFileName( ringToneParam->RingTone() );
       
   125         iAudioVideoRingingTone->SetVolume( volume );
       
   126         iAudioVideoRingingTone->SetRingingType ( ringingType );
       
   127         iAudioVideoRingingTone->SetTtsToneToBePlayed(
       
   128                 ringToneParam->TextToSay().Length()? ETrue : EFalse);
       
   129 
       
   130         
       
   131         // Caller contact text and image and image has
       
   132         // higher priority than video ringing tone set for caller.
       
   133         if ( iAudioVideoRingingTone->IsVideoRingingTone() )
       
   134             {
       
   135             if ( ringToneParam->IsCallerImage() )
       
   136                 {
       
   137                 // Play only audio from video ringingtone
       
   138                 PlayAudioRingTone(
       
   139                         volume,
       
   140                         ringingType );
       
   141                 }
       
   142             else
       
   143                 {
       
   144                 // Play video ring tone
       
   145                 const TBool ringToneIsPersonal = ringToneParam->Type() ==
       
   146                     EPhoneRingTonePersonal;
       
   147                 PlayVideoRingingTone( 
       
   148                     *iAudioVideoRingingTone, 
       
   149                     volume, 
       
   150                     ringingType,
       
   151                     ringToneIsPersonal );
       
   152                 }
       
   153             }
       
   154         else
       
   155             {
       
   156             // Play text to speech, if available
       
   157             if ( ringToneParam->TextToSay().Length() )
       
   158                 {
       
   159                 if (iTTSPlayer) 
       
   160                     {
       
   161                     delete iTTSPlayer;
       
   162                     iTTSPlayer = NULL;
       
   163                     }
       
   164                 iTTSPlayer = CPhoneTTSPlayer::NewL(iRingingtonePlayer); 
       
   165                 iTTSPlayer->AddTtsPlaybackIfNeeded();
       
   166                 iTTSPlayer->PlayTtsTone(
       
   167                     ringToneParam->TextToSay(),
       
   168                     iAudioVideoRingingTone );
       
   169                 }
       
   170             // Play audio ring tone
       
   171             PlayAudioRingTone( 
       
   172                 volume, 
       
   173                 ringingType );
       
   174             }
       
   175         }
       
   176     }
       
   177 
       
   178 // -----------------------------------------------------------------------------
       
   179 // CPhoneRingingToneController::PlayAudioRingTone
       
   180 // -----------------------------------------------------------------------------
       
   181 //
       
   182 void CPhoneRingingToneController::PlayAudioRingTone( 
       
   183     TInt aVolume, 
       
   184     TProfileRingingType aRingingType )
       
   185     {
       
   186     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::PlayAudioRingTone()" );
       
   187     __PHONELOG2( 
       
   188         EBasic,
       
   189         EPhoneControl, 
       
   190         "CPhoneRingingToneController::PlayAudioRingTone - aVolume(%d), aRingingType(%d)",
       
   191         aVolume,
       
   192         aRingingType );
       
   193  
       
   194     if ( !iAudioVideoRingingTone ||
       
   195          !iAudioVideoRingingTone->CheckAndHandleToneSizeLimit() )
       
   196         {
       
   197         iRingingtonePlayer->PlayDefaultTone( aVolume, aRingingType );
       
   198         }
       
   199     else if ( aRingingType == EProfileRingingTypeSilent )
       
   200         {
       
   201         iRingingtonePlayer->PlaySilentTone();
       
   202         }
       
   203     else if ( aRingingType == EProfileRingingTypeBeepOnce )
       
   204         {
       
   205         iRingingtonePlayer->PlayBeepOnce( aVolume );
       
   206         }
       
   207     else
       
   208         {
       
   209         iRingingtonePlayer->PlayProfileBasedTone(iAudioVideoRingingTone);
       
   210         }
       
   211     }
       
   212 
       
   213 // -----------------------------------------------------------------------------
       
   214 // CPhoneRingingToneController::MuteRingingToneOnAnswer
       
   215 // -----------------------------------------------------------------------------
       
   216 //
       
   217 EXPORT_C void CPhoneRingingToneController::MuteRingingToneOnAnswer()
       
   218     {
       
   219     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::MuteRingingToneOnAnswer()" );
       
   220     
       
   221   /*  if ( iVideoPlayer && iTonePlayingStatus == EVideoTonePlaying ||
       
   222          iTonePlayingStatus == EPersonalVideoTonePlaying )
       
   223         {
       
   224         // Mute the video audio
       
   225         iVideoPlayer->MuteVideoRingTone();
       
   226         iTonePlayingStatus = ESilentVideoTonePlaying;
       
   227         iVolume = 0;
       
   228         }
       
   229     else
       
   230         {*/
       
   231         DoMuteRingingTone();
       
   232         //}
       
   233     }
       
   234 
       
   235 // -----------------------------------------------------------------------------
       
   236 // CPhoneRingingToneController::MuteRingingTone
       
   237 // -----------------------------------------------------------------------------
       
   238 //
       
   239 EXPORT_C void CPhoneRingingToneController::MuteRingingTone()
       
   240     {
       
   241     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::MuteRingingTone()" );
       
   242     
       
   243  /*   if ( iVideoPlayer && iTonePlayingStatus == EVideoTonePlaying ||
       
   244          iTonePlayingStatus == EPersonalVideoTonePlaying )
       
   245         {
       
   246         // Mute the video audio
       
   247         iVideoPlayer->MuteVideoRingTone();
       
   248         iTonePlayingStatus = ESilentVideoTonePlaying;
       
   249         iVolume = 0;
       
   250         }
       
   251     else
       
   252         {*/
       
   253         StopPlaying();
       
   254         //}
       
   255     }
       
   256 
       
   257 // -----------------------------------------------------------------------------
       
   258 // CPhoneRingingToneController::StopPlaying
       
   259 // -----------------------------------------------------------------------------
       
   260 //
       
   261 EXPORT_C void CPhoneRingingToneController::StopPlaying()
       
   262     {
       
   263     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::StopPlaying()" );
       
   264     if ( iTTSPlayer )
       
   265         {
       
   266         iTTSPlayer->StopPlaying();
       
   267         delete iTTSPlayer;
       
   268         iTTSPlayer = NULL;
       
   269         }
       
   270     iRingingtonePlayer->StopPlaying();
       
   271     }
       
   272 
       
   273 // -----------------------------------------------------------------------------
       
   274 // CPhoneRingingToneController::DoMuteRingingTone
       
   275 // -----------------------------------------------------------------------------
       
   276 //
       
   277 void CPhoneRingingToneController::DoMuteRingingTone()
       
   278     {
       
   279     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::DoMuteRingingTone()" );
       
   280     
       
   281   /*  switch( iTonePlayingStatus )
       
   282         {
       
   283         case EVideoTonePlaying: // video ringing tone, fall through
       
   284         case EPersonalVideoTonePlaying: // fall through
       
   285         case ESilentVideoTonePlaying:
       
   286             if ( iVideoPlayer )
       
   287                 {
       
   288                 iVideoPlayer->MuteVideoRingTone();
       
   289                 return;                 
       
   290                 }
       
   291             break;
       
   292             
       
   293         default:
       
   294             break;
       
   295         }*/
       
   296     
       
   297     iRingingtonePlayer->MuteActiveAudioPlayer();
       
   298     }
       
   299 
       
   300 // -----------------------------------------------------------------------------
       
   301 // CPhoneRingingToneController::ConvertVideoRingingType
       
   302 // -----------------------------------------------------------------------------
       
   303 //
       
   304 MPhoneVideoPlayer::TPlayMode CPhoneRingingToneController::ConvertVideoRingingType(
       
   305     TProfileRingingType aRingingType )
       
   306     {
       
   307     MPhoneVideoPlayer::TPlayMode playMode;
       
   308         
       
   309     switch ( aRingingType )
       
   310         {
       
   311         case EProfileRingingTypeAscending:
       
   312             playMode = MPhoneVideoPlayer::EPlayAscending;
       
   313             break;
       
   314         case EProfileRingingTypeRingingOnce:
       
   315             playMode = MPhoneVideoPlayer::EPlayOnce;
       
   316             break;
       
   317         case EProfileRingingTypeRinging:
       
   318         default:
       
   319             playMode = MPhoneVideoPlayer::EPlayInLoop;
       
   320             break;
       
   321         }
       
   322     
       
   323     return playMode;
       
   324     }
       
   325 
       
   326 // -----------------------------------------------------------------------------
       
   327 // CPhoneRingingToneController::SetVideoPlayer
       
   328 // -----------------------------------------------------------------------------
       
   329 //
       
   330 void CPhoneRingingToneController::SetVideoPlayer( 
       
   331     MPhoneVideoPlayer* aVideoPlayer )
       
   332     {
       
   333     iVideoPlayer = aVideoPlayer;    
       
   334     }
       
   335 
       
   336 // -----------------------------------------------------------------------------
       
   337 // CPhoneRingingToneController::PlayVideoRingingTone
       
   338 // -----------------------------------------------------------------------------
       
   339 //
       
   340 void CPhoneRingingToneController::PlayVideoRingingTone( 
       
   341     const CPhoneRingingTone& /*aRingingTone*/, 
       
   342     TInt /*aVolume*/, 
       
   343     TProfileRingingType /*aRingingType*/,
       
   344     TBool /*aPersonalTone*/ )
       
   345     {
       
   346     /*
       
   347     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::PlayVideoRingingTone()" );
       
   348     
       
   349     __ASSERT_DEBUG( iVideoPlayer, Panic( EPhoneViewGeneralError ) );
       
   350     
       
   351     iVolume = aVolume;
       
   352     iRingingType = aRingingType;
       
   353     TBool startTimer( ETrue );
       
   354     
       
   355      // Extended security check
       
   356     if ( ExtendedSecurity() )
       
   357         {
       
   358         if ( !aRingingTone.IsFileInRom() &&
       
   359              !aRingingTone.IsFileDrmProtected() )
       
   360             {
       
   361             __PHONELOG( EBasic, 
       
   362                         EPhoneControl, 
       
   363                         "CPhoneRingingToneController::HandleVideoPlayerError - PermissionDenied" );
       
   364             iRingingtonePlayer->PlayDefaultTone( iVolume, iRingingType );
       
   365             return;
       
   366             }
       
   367         __PHONELOG( EBasic, 
       
   368                     EPhoneControl, 
       
   369                     "CPhoneRingingToneController::HandleVideoPlayerError - ExtSecChk ok" );            
       
   370             }
       
   371          
       
   372     // If flip is closed then show video on Cover UI
       
   373     TBool videoPlaySentToCoverUi( EFalse );
       
   374     TInt leaveCode( KErrNone );
       
   375     if ( FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ) )
       
   376         {
       
   377         const TInt flipOpen = CPhonePubSubProxy::Instance()->Value(
       
   378             KPSUidUikon, KUikFlipStatus );
       
   379         if( !flipOpen ) 
       
   380             {
       
   381             TRAP( leaveCode, videoPlaySentToCoverUi = CoverUIPlayVideoRingingToneL( 
       
   382                 aRingingTone ) );
       
   383             }
       
   384         }
       
   385     // Play ringing tone here if video play sending did leave or
       
   386     // video playing wasn't delegated to Cover UI   
       
   387     if( !leaveCode && videoPlaySentToCoverUi )
       
   388         {
       
   389         iTimer->After( KPhoneMaxRingingWaiting, this );
       
   390         return;
       
   391         }
       
   392  
       
   393     __PHONELOG( EBasic, EPhoneControl, "CPhoneRingingToneController::PlayVideoRingingTone - play" );
       
   394     switch( aRingingType )
       
   395         {
       
   396         case EProfileRingingTypeSilent:
       
   397             iVideoPlayer->PlayVideoRingTone( 
       
   398                 aRingingTone.FileName(),
       
   399                 ConvertVideoRingingType( aRingingType ),
       
   400                 0,
       
   401                 iArbitraryVideoScaling,
       
   402                 this );
       
   403             iRingingtonePlayer->PlaySilentTone();
       
   404             iVolume = 0; // for repeat
       
   405             startTimer = EFalse; // no need for fallback
       
   406             break;
       
   407         
       
   408         case EProfileRingingTypeBeepOnce:
       
   409             iVideoPlayer->PlayVideoRingTone( 
       
   410                 aRingingTone.FileName(),
       
   411                 ConvertVideoRingingType( aRingingType ),
       
   412                 0,
       
   413                 iArbitraryVideoScaling,
       
   414                 this );
       
   415             iRingingtonePlayer->BeepOnce( aVolume );
       
   416             iVolume = 0; // for repeat
       
   417             startTimer = EFalse; // no need for fallback
       
   418             break;
       
   419         default:
       
   420             iVideoPlayer->PlayVideoRingTone( 
       
   421                 aRingingTone.FileName(),
       
   422                 ConvertVideoRingingType( aRingingType ),
       
   423                 iVolume,
       
   424                 iArbitraryVideoScaling,
       
   425                 this );
       
   426             break;                
       
   427         }
       
   428 
       
   429     if ( aPersonalTone )
       
   430         {
       
   431         iTonePlayingStatus = EPersonalVideoTonePlaying;
       
   432         }
       
   433     else
       
   434         {
       
   435         iTonePlayingStatus = EVideoTonePlaying;
       
   436         }
       
   437 
       
   438     if ( startTimer && !iTimer->IsActive() )
       
   439         {
       
   440         // Start timer to guard video opening
       
   441         iTimer->After( KPhoneMaxRingingWaiting, this );
       
   442         }
       
   443     */
       
   444     }
       
   445 
       
   446 // -----------------------------------------------------------------------------
       
   447 // CPhoneRingingToneController::HandleVideoPlayerError
       
   448 // -----------------------------------------------------------------------------
       
   449 //
       
   450 void CPhoneRingingToneController::HandleVideoPlayerError( 
       
   451     TPhoneVideoPlayerErrorEvent /*aEvent*/,
       
   452     TInt /*aError*/ )
       
   453     {
       
   454    /* __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::HandleVideoPlayerError()" );
       
   455 
       
   456     if ( aError )
       
   457         {
       
   458         __PHONELOG1( EBasic, 
       
   459                      EPhoneControl, 
       
   460                      "CPhoneRingingToneController::HandleVideoPlayerError - error (%d)",
       
   461                      aError );        
       
   462         }
       
   463   
       
   464     // cancel guarding timer
       
   465     iTimer->Cancel();
       
   466 
       
   467     // to remove video window
       
   468     iVideoPlayer->CancelVideoRingTone();
       
   469 
       
   470     if ( iTonePlayingStatus == EPersonalVideoTonePlaying )
       
   471         {
       
   472         // Play default tone (active profile tone).
       
   473         if ( iAudioVideoRingingTone &&
       
   474              !iAudioVideoRingingTone->IsVideoRingingTone() )
       
   475             {
       
   476             PlayAudioRingTone( iVolume, iRingingType );
       
   477             }
       
   478         else // audio/video tone is video
       
   479             {
       
   480             PlayDefaultVideoAsync();
       
   481             }
       
   482         }
       
   483     else
       
   484         {
       
   485         // Play backup tone
       
   486         iRingingtonePlayer->PlayDefaultTone( iVolume, iRingingType );
       
   487         }
       
   488 */
       
   489     }
       
   490 
       
   491 // -----------------------------------------------------------------------------
       
   492 // CPhoneRingingToneController::HandleVideoPlayerInitComplete
       
   493 // -----------------------------------------------------------------------------
       
   494 //
       
   495 void CPhoneRingingToneController::HandleVideoPlayerInitComplete()
       
   496     {
       
   497     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::HandleVideoPlayerInitComplete()" );
       
   498     
       
   499     // cancel guarding timer
       
   500     //iTimer->Cancel();
       
   501     
       
   502     }
       
   503 
       
   504 // -----------------------------------------------------------------------------
       
   505 // CPhoneRingingToneController::HandleVideoPlayerPlayingComplete
       
   506 // -----------------------------------------------------------------------------
       
   507 //
       
   508 void CPhoneRingingToneController::HandleVideoPlayerPlayingComplete()
       
   509     {
       
   510     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::HandleVideoPlayerPlayingComplete()" );
       
   511     }
       
   512 
       
   513 // -----------------------------------------------------------------------------
       
   514 // CPhoneRingingToneController::PlayDefaultVideoAsync
       
   515 // -----------------------------------------------------------------------------
       
   516 //
       
   517 void CPhoneRingingToneController::PlayDefaultVideoAsync()
       
   518     {
       
   519   /*  __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::PlayDefaultVideoAsync()" );    
       
   520      
       
   521     Cancel();
       
   522 
       
   523     iState = EPlayingDefaultVideo; 
       
   524 
       
   525     TRequestStatus* status = &iStatus;
       
   526     User::RequestComplete( status, KErrNone );
       
   527     SetActive();*/
       
   528     }
       
   529 
       
   530 // -----------------------------------------------------------------------------
       
   531 // CPhoneRingingToneController::ExtendedSecurity
       
   532 // -----------------------------------------------------------------------------
       
   533 //    
       
   534 TBool CPhoneRingingToneController::ExtendedSecurity() const
       
   535     {
       
   536     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::ExtendedSecurity()" );
       
   537     return EFalse;
       
   538     //return iExtSecNeeded;        
       
   539     }
       
   540 
       
   541 // -----------------------------------------------------------------------------
       
   542 // CPhoneRingingToneController::CoverUIPlayVideoRingingToneL
       
   543 // -----------------------------------------------------------------------------
       
   544 //   
       
   545 TBool CPhoneRingingToneController::CoverUIPlayVideoRingingToneL( 
       
   546     const CPhoneRingingTone& aRingingTone )
       
   547     {
       
   548     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::CoverUIPlayVideoRingingToneL()" );
       
   549 
       
   550     TBool showVideo( EFalse );
       
   551 
       
   552     RBuf8 data;
       
   553     CleanupClosePushL( data );
       
   554     data.CreateL( aRingingTone.FileName().Length() );
       
   555     data.Copy( aRingingTone.FileName() );
       
   556     /*TInt err = iMediatorSender->IssueCommand( 
       
   557         EPhoneCmdCoverUiShowMultimediaRingingTone, 
       
   558         data );
       
   559     if ( err == KErrNone )
       
   560         {
       
   561         showVideo = ETrue;
       
   562         iActiveCoverUICommand = ETrue;
       
   563         }*/
       
   564     CleanupStack::PopAndDestroy(); //data 
       
   565 
       
   566     return showVideo;
       
   567     }
       
   568 
       
   569 // -----------------------------------------------------------------------------
       
   570 // CPhoneRingingToneController::ShowMultimediaRingingToneResponseL
       
   571 // -----------------------------------------------------------------------------
       
   572 //   
       
   573 void CPhoneRingingToneController::ShowMultimediaRingingToneResponseL( 
       
   574     TInt aStatus )
       
   575     {
       
   576     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneRingingToneController::ShowMultimediaRingingToneResponseL()" );
       
   577 
       
   578     //iTimer->Cancel();
       
   579     if( aStatus != KErrNone && iActiveCoverUICommand )
       
   580         {
       
   581         iRingingtonePlayer->PlayDefaultTone( iVolume, iRingingType );           
       
   582         }
       
   583     iActiveCoverUICommand = EFalse;
       
   584     }
       
   585 
       
   586 
       
   587     
       
   588 //  End of File