videoplayerapp/lwplayer/src/lwplayerappui.cpp
branchRCL_3
changeset 10 ce5ada96ab30
parent 0 96612d01cf9f
equal deleted inserted replaced
6:7d91903f795f 10:ce5ada96ab30
    13 *
    13 *
    14 * Description:  Implementation of CLWPLayerAppUi
    14 * Description:  Implementation of CLWPLayerAppUi
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 7 %
    18 // Version : %version: 8 %
    19 
    19 
    20 
    20 
    21 #include <DocumentHandler.h>
    21 #include <DocumentHandler.h>
    22 #include <s32mem.h>
    22 #include <s32mem.h>
    23 #include <AiwGenericParam.h>
    23 #include <AiwGenericParam.h>
   206     {
   206     {
   207         fileName.Set( paramFileName->Value().AsDes() );
   207         fileName.Set( paramFileName->Value().AsDes() );
   208 
   208 
   209         MPX_DEBUG(_L("    filename = %S"), &fileName);
   209         MPX_DEBUG(_L("    filename = %S"), &fileName);
   210 
   210 
   211         if ( !iEmbeddedMPCreated )
   211         if ( ! iEmbeddedMPCreated )
   212         {
   212         {
   213             //
   213             //
   214             //  Launch the Media Player for ProgDL playback
   214             //  Launch the Media Player for ProgDL playback
   215             //  Ignore the errors since the Media Player is
   215             //  Ignore the errors since the Media Player is
   216             //  responsible for all error messages once launched.
   216             //  responsible for all error messages once launched.
   217             //
   217             //
   218             TRAPD( err, LaunchMediaPlayerL( fileName, genParList ) );
   218             MPX_TRAPD( err, LaunchMediaPlayerL( fileName, genParList ) );
   219 
   219 
   220             if ( err != KErrNone )
   220             if ( err != KErrNone )
   221             {
   221             {
   222                 ActivateClosePlayerActiveObject();
   222                 ActivateClosePlayerActiveObject();
   223             }
   223             }
   230 
   230 
   231 TInt
   231 TInt
   232 CLWPlayerAppUi::LaunchMediaPlayerL( const TDesC& afilename,
   232 CLWPlayerAppUi::LaunchMediaPlayerL( const TDesC& afilename,
   233                                     const CAiwGenericParamList* aparamList )
   233                                     const CAiwGenericParamList* aparamList )
   234 {
   234 {
   235     MPX_DEBUG(_L("CLWPlayerAppUi::LaunchMediaPlayerL(%S)"), &afilename);
   235     MPX_ENTER_EXIT(_L("CLWPlayerAppUi::LaunchMediaPlayerL()"),
   236 
   236                    _L("afilename = %S"), &afilename );
   237 
   237 
   238     //
   238     //
   239     //  The download manager has already performed recognition on the file
   239     //  The download manager has already performed recognition on the file
   240     //  using the cenrep keys.  The LW Player should always launch the MP in
   240     //  using the cenrep keys.  The LW Player should always launch the MP in
   241     //  embedded mode.  Using the MP UID to ensure that it is used.
   241     //  embedded mode.  Using the MP UID to ensure that it is used.
   248 
   248 
   249     //
   249     //
   250     //  Call the document handler to open the file
   250     //  Call the document handler to open the file
   251     //  It will leave if the filename is not present
   251     //  It will leave if the filename is not present
   252     //
   252     //
   253     TRAPD( err, handler.OpenTempFileL( afilename, file ));
   253     MPX_TRAPD( err, handler.OpenTempFileL( afilename, file ));
   254 
   254 
   255     if ( err == KErrNotFound )
   255     if ( err == KErrNotFound )
   256     {
   256     {
   257         HandleErrorL( err );
   257         HandleErrorL( err );
   258     }
   258     }
   262     }
   262     }
   263     else
   263     else
   264     {
   264     {
   265         CleanupClosePushL( file );
   265         CleanupClosePushL( file );
   266 
   266 
   267         TRAPD( err, handler.OpenFileEmbeddedL( file, datatype, *aparamList ) );
   267         MPX_TRAPD( err, handler.OpenFileEmbeddedL( file, datatype, *aparamList ) );
   268 
   268 
   269         //
   269         //
   270         //  ignore some document handler errors
   270         //  ignore some document handler errors
   271         //
   271         //
   272         if ( err == KErrServerTerminated )
   272         if ( err == KErrServerTerminated )