videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp
branchRCL_3
changeset 70 375929f879c2
parent 64 3eb824b18d67
equal deleted inserted replaced
64:3eb824b18d67 70:375929f879c2
    14 * Description:   Implementation of Video base playback view
    14 * Description:   Implementation of Video base playback view
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 88 %
    19 // Version : %version: 86 %
    20 
    20 
    21 
    21 
    22 //  Include Files
    22 //  Include Files
    23 
    23 
    24 #include <aknViewAppUi.h>
    24 #include <aknViewAppUi.h>
   964             HandleDrmErrorsL( aError );
   964             HandleDrmErrorsL( aError );
   965             break;
   965             break;
   966         }
   966         }
   967         case KMPXVideoCallOngoingError:
   967         case KMPXVideoCallOngoingError:
   968         {
   968         {
   969             DisplayInfoMessageL( R_MPX_VIDEO_CALL_ONGOING, ETrue );
   969             DisplayInfoMessageL( R_MPX_VIDEO_CALL_ONGOING );
   970             break;
   970             break;
   971         }
   971         }
   972         default:
   972         default:
   973         {
   973         {
   974             //
   974             //
  1548 // -------------------------------------------------------------------------------------------------
  1548 // -------------------------------------------------------------------------------------------------
  1549 //
  1549 //
  1550 void CMPXVideoBasePlaybackView::DoClosePlayerL()
  1550 void CMPXVideoBasePlaybackView::DoClosePlayerL()
  1551 {
  1551 {
  1552     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::DoClosePlayerL()"));
  1552     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::DoClosePlayerL()"));
  1553 
  1553     AppUi()->HandleCommandL( EAknSoftkeyBack );
  1554     if ( iExitPlayer )
       
  1555     {
       
  1556         AppUi()->HandleCommandL( EAknCmdExit );
       
  1557     }
       
  1558     else
       
  1559     {
       
  1560         AppUi()->HandleCommandL( EAknSoftkeyBack );
       
  1561     }
       
  1562 }
  1554 }
  1563 
  1555 
  1564 // -------------------------------------------------------------------------------------------------
  1556 // -------------------------------------------------------------------------------------------------
  1565 //   CMPXVideoBasePlaybackView::IssuePlayCommandL
  1557 //   CMPXVideoBasePlaybackView::IssuePlayCommandL
  1566 // -------------------------------------------------------------------------------------------------
  1558 // -------------------------------------------------------------------------------------------------
  1866 //
  1858 //
  1867 void CMPXVideoBasePlaybackView::HandleDrmErrorsL( TInt aError )
  1859 void CMPXVideoBasePlaybackView::HandleDrmErrorsL( TInt aError )
  1868 {
  1860 {
  1869     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleDrmErrorsL()"));
  1861     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleDrmErrorsL()"));
  1870 
  1862 
  1871     TInt drmUiError = KErrNone;
       
  1872 
       
  1873     //
  1863     //
  1874     //  If we receive an error when we are initialized, let the DRM UI Handler
  1864     //  If we receive an error when we are initialized, let the DRM UI Handler
  1875     //  process the error.  If we have been playing, display the error message
  1865     //  process the error.  If we have been playing, display the error message
  1876     //  and close the playback
  1866     //  and close the playback
  1877     //
  1867     //
  1891         if ( err == KErrNone && openError == KErrNone )
  1881         if ( err == KErrNone && openError == KErrNone )
  1892         {
  1882         {
  1893             DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
  1883             DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
  1894             CleanupStack::PushL( drmUiHandling );
  1884             CleanupStack::PushL( drmUiHandling );
  1895 
  1885 
  1896             MPX_TRAP( drmUiError,
  1886             drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle,
  1897                       drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle,
  1887                                                            ContentAccess::EPlay,
  1898                                                                      ContentAccess::EPlay,
  1888                                                            aError,
  1899                                                                      aError,
  1889                                                            NULL );
  1900                                                                      NULL ) );
       
  1901 
  1890 
  1902             CleanupStack::PopAndDestroy( drmUiHandling );
  1891             CleanupStack::PopAndDestroy( drmUiHandling );
  1903         }
  1892         }
  1904 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  1893 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  1905         else if ( err == KErrNone && openError == KErrTooBig )
  1894         else if ( err == KErrNone && openError == KErrTooBig )
  1912             if ( err == KErrNone && openError == KErrNone )
  1901             if ( err == KErrNone && openError == KErrNone )
  1913             {
  1902             {
  1914                 DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
  1903                 DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
  1915                 CleanupStack::PushL( drmUiHandling );
  1904                 CleanupStack::PushL( drmUiHandling );
  1916 
  1905 
  1917                 MPX_TRAP( drmUiError,
  1906                 drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle64,
  1918                           drmUiHandling->GetErrorHandler().HandleErrorL( fileHandle64,
  1907                                                                ContentAccess::EPlay,
  1919                                                                          ContentAccess::EPlay,
  1908                                                                aError,
  1920                                                                          aError,
  1909                                                                NULL );
  1921                                                                          NULL ) );
       
  1922 
       
  1923                 CleanupStack::PopAndDestroy( drmUiHandling );
  1910                 CleanupStack::PopAndDestroy( drmUiHandling );
  1924             }
  1911             }
  1925             else
  1912             else
  1926             {
  1913             {
  1927                 DisplayErrorMessageL( R_MPX_DRM_RIGHTS_MISSING  );
  1914                 DisplayErrorMessageL( R_MPX_DRM_RIGHTS_MISSING  );
  1936         }
  1923         }
  1937 
  1924 
  1938         CleanupStack::PopAndDestroy();  // fileHandle
  1925         CleanupStack::PopAndDestroy();  // fileHandle
  1939     }
  1926     }
  1940 
  1927 
  1941     if ( KErrNone == drmUiError )
  1928     HandleClosePlaybackViewL();
  1942     {
       
  1943         HandleClosePlaybackViewL();
       
  1944     }
       
  1945     else if ( KLeaveExit == drmUiError )
       
  1946     {
       
  1947         iExitPlayer = ETrue;
       
  1948         ActivateClosePlayerActiveObject();
       
  1949     }
       
  1950     else
       
  1951     {
       
  1952         User::Leave( drmUiError );
       
  1953     }
       
  1954 }
  1929 }
  1955 
  1930 
  1956 // -------------------------------------------------------------------------------------------------
  1931 // -------------------------------------------------------------------------------------------------
  1957 //   CMPXVideoBasePlaybackView::IsMultiItemPlaylist()
  1932 //   CMPXVideoBasePlaybackView::IsMultiItemPlaylist()
  1958 // -------------------------------------------------------------------------------------------------
  1933 // -------------------------------------------------------------------------------------------------