videoplayback/hbvideoplaybackview/viewsrc/hbvideobaseplaybackview.cpp
changeset 36 8aed59de29f9
parent 35 3738fe97f027
child 37 4eb2df7f7cbe
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    13 *
    13 *
    14 * Description:   Implementation of Video base playback view
    14 * Description:   Implementation of Video base playback view
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#32 %
    18 // Version : %version: da1mmcf#34 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 //  Include Files
    22 //  Include Files
    23 
    23 
   120     //
   120     //
   121     TRAP_IGNORE( mVideoMpxWrapper->RequestMediaL() ); 
   121     TRAP_IGNORE( mVideoMpxWrapper->RequestMediaL() ); 
   122     
   122     
   123     menu()->close();
   123     menu()->close();
   124 
   124 
   125     hideItems( Hb::AllItems );
   125     hideItems( Hb::ToolBarItem );
   126 
   126 
   127     //
   127     //
   128     // Landscape orientation
   128     // Landscape orientation
   129     //
   129     //
   130     hbInstance->allMainWindows()[0]->setOrientation( Qt::Horizontal );  
   130     hbInstance->allMainWindows()[0]->setOrientation( Qt::Horizontal );  
   157     //
   157     //
   158     // go back to device orientation
   158     // go back to device orientation
   159     //
   159     //
   160     //hbInstance->allMainWindows()[0]->unsetOrientation();
   160     //hbInstance->allMainWindows()[0]->unsetOrientation();
   161 
   161 
   162     showItems( Hb::AllItems );
   162     showItems( Hb::ToolBarItem );
   163 }
   163 }
   164 
   164 
   165 // -------------------------------------------------------------------------------------------------
   165 // -------------------------------------------------------------------------------------------------
   166 //   HbVideoBasePlaybackView::handleClosePlaybackView()
   166 //   HbVideoBasePlaybackView::handleClosePlaybackView()
   167 // -------------------------------------------------------------------------------------------------
   167 // -------------------------------------------------------------------------------------------------
   169 void HbVideoBasePlaybackView::handleClosePlaybackView()
   169 void HbVideoBasePlaybackView::handleClosePlaybackView()
   170 {
   170 {
   171     MPX_DEBUG(
   171     MPX_DEBUG(
   172       _L("HbVideoBasePlaybackView::handleClosePlaybackView()") );
   172       _L("HbVideoBasePlaybackView::handleClosePlaybackView()") );
   173 
   173 
   174     if ( mVideoMpxWrapper->IsMultiItemPlaylist() )
   174     if ( mVideoMpxWrapper && mVideoMpxWrapper->IsMultiItemPlaylist() )
   175     {
   175     {
   176         TRAP_IGNORE( mVideoMpxWrapper->HandleCommandL( EMPXPbvCmdNextListItem ) );
   176         TRAP_IGNORE( mVideoMpxWrapper->HandleCommandL( EMPXPbvCmdNextListItem ) );
   177     }
   177     }
   178     else
   178     else
   179     {
   179     {
   199         }
   199         }
   200         case KErrMMDRMNotAuthorized:
   200         case KErrMMDRMNotAuthorized:
   201         case KErrCANoRights:
   201         case KErrCANoRights:
   202         case KErrCANoPermission:
   202         case KErrCANoPermission:
   203         {
   203         {
   204             const QString qString = "License has expired or it is missing";
   204             showDialog( hbTrId( "txt_videos_info_license_has_expired_or_it_is_missi" ) );
   205             showDialog( qString );
       
   206             break;
   205             break;
   207         }
   206         }
   208         case KMPXVideoCallOngoingError:
   207         case KMPXVideoCallOngoingError:
   209         {
   208         {
   210             const QString qString = "Video playback is not allowed during video call";
   209             showDialog( hbTrId( "txt_videos_info_video_playback_is_not_allowed_duri" ), false );
   211             showDialog( qString, false );
       
   212             break;
   210             break;
   213         }
   211         }
   214         case KMPXVideoTvOutPlaybackNotAllowed:
   212         case KMPXVideoTvOutPlaybackNotAllowed:
   215         {
   213         {
   216             const QString qString = "Protected clip, can not be played through TV-Out";
   214             showDialog( hbTrId( "txt_videos_info_protected_clip_can_not_be_played" ), false );
   217             showDialog( qString, false );
       
   218             break;
   215             break;
   219         }
   216         }
   220         case KMPXVideoTvOutPlaybackNotAllowedClose:
   217         case KMPXVideoTvOutPlaybackNotAllowedClose:
   221         {
   218         {
   222             const QString qString = "Protected clip, can not be played through TV-Out";
   219             showDialog( hbTrId( "txt_videos_info_protected_clip_can_not_be_played" ) );
   223             showDialog( qString );
       
   224             break;
   220             break;
   225         }
   221         }
   226         default:
   222         default:
   227         {
   223         {
   228             TRAP_IGNORE(  
   224             TRAP_IGNORE(