mmsharing/mmshui/src/musuieventcontroller.cpp
branchRCL_3
changeset 11 ff8a573c0e2e
parent 0 f0cf47e981f9
child 16 71306c87785a
equal deleted inserted replaced
10:04980be5c5fe 11:ff8a573c0e2e
   329     
   329     
   330 // -----------------------------------------------------------------------------
   330 // -----------------------------------------------------------------------------
   331 //
   331 //
   332 // -----------------------------------------------------------------------------
   332 // -----------------------------------------------------------------------------
   333 //
   333 //
       
   334 void CMusUiEventController::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged )
       
   335     {
       
   336     // Set Volume:
       
   337     //If volume changed due to audio route change, we want to update volume
       
   338     //popup control only if it is already visible
       
   339     TBool onlyIfVisible = aAudioRouteChanged;
       
   340     TRAP_IGNORE( iSharingObserver.ActivateVolumeControlL(aVolume, onlyIfVisible) );
       
   341     }
       
   342 // -----------------------------------------------------------------------------
       
   343 //
       
   344 // -----------------------------------------------------------------------------
       
   345 //
   334 void CMusUiEventController::SetRect(const TRect& aRect)
   346 void CMusUiEventController::SetRect(const TRect& aRect)
   335     {
   347     {
   336     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::SetRect" );
   348     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::SetRect" );
   337     
   349     
   338     if ( EngineSession() )
   350     if ( EngineSession() )
   687                         CAknAppUiBase::TAppUiOrientation aOrientation )
   699                         CAknAppUiBase::TAppUiOrientation aOrientation )
   688     {
   700     {
   689     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::ChangeOrientationL" );
   701     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::ChangeOrientationL" );
   690     iEventObserver.SwitchOrientationL( aOrientation );
   702     iEventObserver.SwitchOrientationL( aOrientation );
   691     MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::ChangeOrientationL" );
   703     MUS_LOG( "mus: [MUSUI ]  <- CMusUiEventController::ChangeOrientationL" );
       
   704     }
       
   705 
       
   706 // -----------------------------------------------------------------------------
       
   707 //
       
   708 // -----------------------------------------------------------------------------
       
   709 //
       
   710 TBool CMusUiEventController::IsDisplayEnabledL()
       
   711     {
       
   712     MUS_LOG( "mus: [MUSUI ]  -> CMusUiEventController::IsDisplayEnabledL" );
       
   713     TBool ret = EFalse;
       
   714     if ( EngineSession() )
       
   715         {
       
   716         ret = EngineSession()->IsDisplayEnabledL();
       
   717         }
       
   718     MUS_LOG1( "mus: [MUSUI ]  <- CMusUiEventController::IsDisplayEnabledL, %d", ret );
       
   719     return ret;   
   692     }
   720     }
   693 
   721 
   694 
   722 
   695 // -----------------------------------------------------------------------------
   723 // -----------------------------------------------------------------------------
   696 //
   724 //
   870         case EMusuiCmdViewVolumeUp:
   898         case EMusuiCmdViewVolumeUp:
   871             {
   899             {
   872             // Set Volume:
   900             // Set Volume:
   873             __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
   901             __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
   874             EngineSession()->VolumeUpL();
   902             EngineSession()->VolumeUpL();
   875             // Update the status pane:
   903             // Status pane update will be done later. When we get 
   876             iSharingObserver.ActivateVolumeControlL( 
   904 			// VolumeChanged() callback
   877                                             EngineSession()->VolumeL() );
       
   878             break;
   905             break;
   879             }
   906             }
   880         case EMusuiCmdViewVolumeDown:
   907         case EMusuiCmdViewVolumeDown:
   881             {
   908             {
   882             // Set Volume:
   909             // Set Volume:
   883             __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
   910             __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
   884             EngineSession()->VolumeDownL();
   911             EngineSession()->VolumeDownL();
   885             // Update the status pane:
   912             // Status pane update will be done later. When we get 
   886             iSharingObserver.ActivateVolumeControlL( 
   913 			// VolumeChanged() callback
   887                                             EngineSession()->VolumeL() );
       
   888             break;
   914             break;
   889             }
   915             }
   890         case EMusuiCmdViewVolumeChanged:
   916         case EMusuiCmdViewVolumeChanged:
   891             {
   917             {
   892             __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );
   918             __ASSERT_ALWAYS( EngineSession(), User::Leave( KErrNotReady ) );