musichomescreen_multiview/musicplayeractionhandlerplugin/src/musicplayeractionhandler.cpp
branchRCL_3
changeset 18 c54d95799c80
parent 15 171e07ac910f
equal deleted inserted replaced
17:c8156a91d13c 18:c54d95799c80
    24 #include <mpxparameter.h>               // CMPXParameter
    24 #include <mpxparameter.h>               // CMPXParameter
    25 #include <mpxplaybackutility.h>         // MMPXPlaybackUtility
    25 #include <mpxplaybackutility.h>         // MMPXPlaybackUtility
    26 #include <mpxconstants.h>               // KAppUidMusicPlayerX
    26 #include <mpxconstants.h>               // KAppUidMusicPlayerX
    27 #include <mpxmusicplayerviewplugin.hrh> // KMPXPluginTypePlaybackUid
    27 #include <mpxmusicplayerviewplugin.hrh> // KMPXPluginTypePlaybackUid
    28 #include <AknTaskList.h>                // CAknTaskList
    28 #include <AknTaskList.h>                // CAknTaskList
       
    29 #include <gfxtranseffect/gfxtranseffect.h>
       
    30 #include <akntranseffect.h>
    29 
    31 
    30 #include <mpxcommandgeneraldefs.h>
    32 #include <mpxcommandgeneraldefs.h>
    31 #include <mpxcommonuihelper.h>
    33 #include <mpxcommonuihelper.h>
    32 #include <mpxcollectionhelperfactory.h>
    34 #include <mpxcollectionhelperfactory.h>
    33 #include "musicplayeractionhandler.h"
    35 #include "musicplayeractionhandler.h"
   214     buffer->Compress();
   216     buffer->Compress();
   215     CleanupStack::PopAndDestroy( &writeStream );
   217     CleanupStack::PopAndDestroy( &writeStream );
   216     if ( task.Exists() )
   218     if ( task.Exists() )
   217         {
   219         {
   218 //        task.SendMessage( KAppUidMusicPlayerX, buffer->Ptr( 0 ));
   220 //        task.SendMessage( KAppUidMusicPlayerX, buffer->Ptr( 0 ));
       
   221         BeginFullScreenTransEffect( KAppUidMusicPlayerX );    
   219         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   222         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   220                     buffer->Ptr( 0 ) );
   223                     buffer->Ptr( 0 ) );
   221         }
   224         }
   222     else        //Application needs to be launched. The first view is library view.
   225     else        //Application needs to be launched. The first view is library view.
   223         {
   226         {
   274     buffer->Compress();
   277     buffer->Compress();
   275     CleanupStack::PopAndDestroy( &writeStream );
   278     CleanupStack::PopAndDestroy( &writeStream );
   276     if ( task.Exists() )
   279     if ( task.Exists() )
   277         {
   280         {
   278 //        task.SendMessage( KAppUidMusicPlayerX, buffer->Ptr( 0 ));
   281 //        task.SendMessage( KAppUidMusicPlayerX, buffer->Ptr( 0 ));
       
   282         BeginFullScreenTransEffect( KAppUidMusicPlayerX );
   279         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   283         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   280                     buffer->Ptr( 0 ) );
   284                     buffer->Ptr( 0 ) );
   281         }
   285         }
   282     else        //Application needs to be launched. The first view is library view.
   286     else        //Application needs to be launched. The first view is library view.
   283         {
   287         {
   323     writeStream.CommitL();
   327     writeStream.CommitL();
   324     buffer->Compress();
   328     buffer->Compress();
   325     CleanupStack::PopAndDestroy( &writeStream );
   329     CleanupStack::PopAndDestroy( &writeStream );
   326     if ( task.Exists() )
   330     if ( task.Exists() )
   327         {
   331         {
       
   332         BeginFullScreenTransEffect( KAppUidMusicPlayerX );    
   328         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   333         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   329                     buffer->Ptr( 0 ) );
   334                     buffer->Ptr( 0 ) );
   330         
   335         
   331         
   336         
   332         }
   337         }
   378     writeStream.CommitL();
   383     writeStream.CommitL();
   379     buffer->Compress();
   384     buffer->Compress();
   380     CleanupStack::PopAndDestroy( &writeStream );
   385     CleanupStack::PopAndDestroy( &writeStream );
   381     if ( task.Exists() )
   386     if ( task.Exists() )
   382         {
   387         {
       
   388         BeginFullScreenTransEffect( KAppUidMusicPlayerX );    
   383         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   389         wsSession.SendMessageToWindowGroup( task.WgId(), KAppUidMusicPlayerX,
   384                     buffer->Ptr( 0 ) );
   390                     buffer->Ptr( 0 ) );
   385         if (!aMinimized)
   391         if (!aMinimized)
   386             {
   392             {
   387             task.BringToForeground();
   393             task.BringToForeground();
   543 
   549 
   544     iPlaybackUtility->CommandL( *cmd );
   550     iPlaybackUtility->CommandL( *cmd );
   545     CleanupStack::PopAndDestroy( cmd );
   551     CleanupStack::PopAndDestroy( cmd );
   546     MPX_DEBUG1("<--CMusicPlayerActionHandler::SetPlaybackCommandL()");
   552     MPX_DEBUG1("<--CMusicPlayerActionHandler::SetPlaybackCommandL()");
   547     }
   553     }
       
   554 
       
   555 // ---------------------------------------------------------------------------
       
   556 // Sets a transition effect, to be called before bringing an application to foreground
       
   557 // ---------------------------------------------------------------------------
       
   558 //
       
   559 void CMusicPlayerActionHandler::BeginFullScreenTransEffect( const TUid& aNext )
       
   560     {
       
   561     MPX_DEBUG1("-->CMusicPlayerActionHandler::BeginFullScreenTransEffect()");
       
   562     GfxTransEffect::BeginFullScreen( 
       
   563         AknTransEffect::EApplicationStart,
       
   564         TRect(), 
       
   565         AknTransEffect::EParameterType, 
       
   566         AknTransEffect::GfxTransParam( aNext,
       
   567         AknTransEffect::TParameter::EActivateExplicitContinue ));  
       
   568     MPX_DEBUG1("<--CMusicPlayerActionHandler::BeginFullScreenTransEffect()");
       
   569     }
   548 //  End of File
   570 //  End of File
   549 
   571