videoplayerapp/videoplayerengine/src/videoplayerengine.cpp
changeset 59 a76e86df7ccd
parent 52 e3cecb93e76a
child 62 0e1e938beb1a
equal deleted inserted replaced
52:e3cecb93e76a 59:a76e86df7ccd
    13 *
    13 *
    14 * Description:  Implementation of VideoPlayerEngine
    14 * Description:  Implementation of VideoPlayerEngine
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#42 %
    18 // Version : %version: da1mmcf#43 %
    19 
    19 
    20 
    20 
    21 #include <QApplication>
    21 #include <QApplication>
    22 
    22 
    23 #include <hbinstance.h>
    23 #include <hbinstance.h>
    25 #include <xqplugininfo.h>
    25 #include <xqplugininfo.h>
    26 #include <xqserviceutil.h>
    26 #include <xqserviceutil.h>
    27 #include <hbview.h>
    27 #include <hbview.h>
    28 #include <hbapplication.h>
    28 #include <hbapplication.h>
    29 #include <hbactivitymanager.h>
    29 #include <hbactivitymanager.h>
    30 #include <hbdevicenotificationdialog.h>
    30 #include <hbnotificationdialog.h>
    31 
    31 
    32 #include "videoplayerengine.h"
    32 #include "videoplayerengine.h"
    33 #include "videoactivitystate.h"
    33 #include "videoactivitystate.h"
    34 #include "videoplaybackwrapper.h"
    34 #include "videoplaybackwrapper.h"
    35 #include "videoservices.h"
    35 #include "videoservices.h"
   321     {
   321     {
   322         case MpxHbVideoCommon::CollectionView:
   322         case MpxHbVideoCommon::CollectionView:
   323         {
   323         {
   324             if ( shouldExit() )
   324             if ( shouldExit() )
   325             {
   325             {
   326                 qApp->quit();
   326                 serviceQuit();
   327                 XQServiceUtil::toBackground( false );             
       
   328             }
   327             }
   329             else if ( shouldActivateCollectionView()  )
   328             else if ( shouldActivateCollectionView()  )
   330             {
   329             {
   331                 if ( ! mCollectionViewPlugin )
   330                 if ( ! mCollectionViewPlugin )
   332                 {
   331                 {
   705 {                    
   704 {                    
   706     MPX_DEBUG(_L("VideoPlayerEngine::handlePlaybackFailure()"));        
   705     MPX_DEBUG(_L("VideoPlayerEngine::handlePlaybackFailure()"));        
   707             
   706             
   708     if ( mIsPlayService )  
   707     if ( mIsPlayService )  
   709     { 
   708     { 
   710         HbDeviceNotificationDialog* dlg = new HbDeviceNotificationDialog(); 
   709         HbNotificationDialog* dlg = new HbNotificationDialog();
       
   710         
       
   711         connect( dlg, SIGNAL( aboutToClose() ), this, SLOT( serviceQuit() ) );
   711         
   712         
   712         switch ( errorCode )
   713         switch ( errorCode )
   713         {
   714         {
   714             case KErrNotSupported:
   715             case KErrNotSupported:
   715             case KErrUnknown:
   716             case KErrUnknown:
   737                 break;
   738                 break;
   738             }
   739             }
   739         }
   740         }
   740         
   741         
   741         dlg->show();                      
   742         dlg->show();                      
   742         
   743  
   743         
   744     }
   744         qApp->quit();
   745 }
   745         XQServiceUtil::toBackground( false );  
   746 
   746     }
   747 
   747 }
   748 // -------------------------------------------------------------------------------------------------
       
   749 // serviceQuit()
       
   750 // -------------------------------------------------------------------------------------------------
       
   751 //
       
   752 void VideoPlayerEngine::serviceQuit()
       
   753 {                    
       
   754     MPX_DEBUG(_L("VideoPlayerEngine::serviceQuit()"));     
       
   755     
       
   756     qApp->quit();
       
   757     XQServiceUtil::toBackground( false );
       
   758 }
       
   759 
       
   760 
   748 // End of file
   761 // End of file