videoplayerapp/mpxvideoplayer/src/mpxvideoembeddedpdlhandler.cpp
branchRCL_3
changeset 9 5294c000a26d
parent 8 ce5ada96ab30
child 16 67eb01668b0e
equal deleted inserted replaced
8:ce5ada96ab30 9:5294c000a26d
    13 *
    13 *
    14 * Description:  Handles PDL commands passed in by other appilcations
    14 * Description:  Handles PDL commands passed in by other appilcations
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  12 %
    18 
       
    19 // Version : %version:  ou1cpsw#14 %
    19 
    20 
    20 
    21 
    21 #include <mpxcommand.h>
    22 #include <mpxcommand.h>
    22 #include <mpxcommandgeneraldefs.h>
    23 #include <mpxcommandgeneraldefs.h>
    23 #include <mpxmessagegeneraldefs.h>
    24 #include <mpxmessagegeneraldefs.h>
    96         //  Check if this is the same download that is loaded
    97         //  Check if this is the same download that is loaded
    97         //  If it is, issue a play command to resume playback
    98         //  If it is, issue a play command to resume playback
    98 
    99 
    99         if ( ( aDlId == iDownloadId ) && ( ! aFileName.Compare( *iDownloadFileName ) ) )
   100         if ( ( aDlId == iDownloadId ) && ( ! aFileName.Compare( *iDownloadFileName ) ) )
   100         {
   101         {
   101             iAppUiEngine->PlaybackUtility()->CommandL( EPbCmdPlay );
   102             iAppUiEngine->PlaybackUtilityL().CommandL( EPbCmdPlay );
   102         }
   103         }
   103         else
   104         else
   104         {
   105         {
   105             //
   106             //
   106             //  New download received, close old playback plugin
   107             //  New download received, close old playback plugin
   107             //
   108             //
   108             iAppUiEngine->ClosePlaybackPluginL();
   109             iAppUiEngine->ClosePlaybackPluginL();
   109             
   110 
   110             iAppUiEngine->SignalViewPdlReloading();
   111             iAppUiEngine->SignalViewPdlReloadingL();
   111 
   112 
   112             StartNewDownloadL( aDlId, aFileName );
   113             StartNewDownloadL( aDlId, aFileName );
   113         }
   114         }
   114     }
   115     }
   115     else
   116     else
   151     delete iDownloadFileName;
   152     delete iDownloadFileName;
   152     iDownloadFileName = NULL;
   153     iDownloadFileName = NULL;
   153     iDownloadFileName = aFileName.AllocL();
   154     iDownloadFileName = aFileName.AllocL();
   154 
   155 
   155     //
   156     //
   156     //  Create the Playback Utility
   157     //  Load the correct playback view
   157     //
   158     //
   158     iAppUiEngine->CreateEmbeddedPdlPlaybackUtilityMemberVariablesL();
   159     iAppUiEngine->PreLoadPdlPlaybackViewL();
   159 
   160 
   160     SendPdlCustomCommandL( EPbCmdStartPd, iDownloadId );
   161     SendPdlCustomCommandL( EPbCmdStartPd, iDownloadId );
   161 
   162 
   162     iAppUiEngine->InitializeFileL( *iDownloadFileName );
   163     iAppUiEngine->InitializeFileL( *iDownloadFileName );
   163 }
   164 }
   180     cmd->SetTObjectValueL<TMPXPlaybackPdCommand>( KMPXCommandPlaybackGeneralType, aCustomCmd );
   181     cmd->SetTObjectValueL<TMPXPlaybackPdCommand>( KMPXCommandPlaybackGeneralType, aCustomCmd );
   181     cmd->SetTObjectValueL<TInt>( KMPXCommandPlaybackPDTransactionID, aData );
   182     cmd->SetTObjectValueL<TInt>( KMPXCommandPlaybackPDTransactionID, aData );
   182     cmd->SetTextValueL( KMPXMediaVideoPlaybackFileName, *iDownloadFileName );
   183     cmd->SetTextValueL( KMPXMediaVideoPlaybackFileName, *iDownloadFileName );
   183     cmd->SetTObjectValueL<TInt>( KMPXMediaVideoMovePdlFile, iEmbeddedPdlCase );
   184     cmd->SetTObjectValueL<TInt>( KMPXMediaVideoMovePdlFile, iEmbeddedPdlCase );
   184 
   185 
   185     iAppUiEngine->PlaybackUtility()->CommandL( *cmd );
   186     iAppUiEngine->PlaybackUtilityL().CommandL( *cmd );
   186 
   187 
   187     CleanupStack::PopAndDestroy( cmd );
   188     CleanupStack::PopAndDestroy( cmd );
   188 }
   189 }
   189 
   190 
   190 // -------------------------------------------------------------------------------------------------
   191 // -------------------------------------------------------------------------------------------------