videoplayerapp/inc/videoplayerengine.h
changeset 15 cf5481c2bc0b
child 17 69946d1824c4
equal deleted inserted replaced
2:dec420019252 15:cf5481c2bc0b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implementation of QVideoPlayerEngine
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: ou1cpsw#10 %
       
    19 
       
    20 #ifndef VIDEOPLAYERENGINE_H
       
    21 #define VIDEOPLAYERENGINE_H
       
    22 
       
    23 #include <qobject.h>
       
    24 #include <mpxviewpluginqt.h>
       
    25 
       
    26 #include "mpxhbvideocommondefs.h"
       
    27 #include "videoplayerappexport.h"
       
    28 
       
    29 //FORWARD CLASS DECLARATION
       
    30 
       
    31 class MpxViewPlugin;
       
    32 class VideoServices;
       
    33 class QMpxVideoPlaybackWrapper;
       
    34 
       
    35 /**
       
    36  *  QVideoPlayerEngine
       
    37  * 
       
    38  */
       
    39 class VIDEOPLAYERAPP_DLL_EXPORT QVideoPlayerEngine: public QObject
       
    40 {
       
    41     Q_OBJECT
       
    42 
       
    43     public:
       
    44         /**
       
    45          * Constructor
       
    46          */
       
    47         QVideoPlayerEngine(bool isService = false);
       
    48 
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52         virtual ~QVideoPlayerEngine();
       
    53     
       
    54     public:
       
    55         void initialize();
       
    56         void playMedia( QString filePath );
       
    57         void setEmbedded();
       
    58 
       
    59     public slots:
       
    60         void handleCommand( int commandCode );
       
    61 
       
    62     private slots:
       
    63         void handleQuit();
       
    64 
       
    65     private:
       
    66         void activateView( MpxHbVideoCommon::MpxHbVideoViewType viewType );
       
    67 
       
    68         void connectView();
       
    69         void disconnectView();
       
    70     
       
    71         void switchView();    
       
    72     
       
    73         void loadPlugin( MpxHbVideoCommon::MpxHbVideoViewType viewType );
       
    74         
       
    75         void doDelayedLoad();
       
    76 
       
    77     private:
       
    78         bool                      mIsService;
       
    79         bool                      mEmbedded;
       
    80         bool					  mDelayedLoadDone;
       
    81 
       
    82         MpxViewPlugin*            mCurrentViewPlugin;
       
    83         MpxViewPlugin*            mPlaybackViewPlugin; 
       
    84         MpxViewPlugin*            mCollectionViewPlugin; 
       
    85         MpxViewPlugin*            mFileDetailsViewPlugin;
       
    86         
       
    87 
       
    88         QMpxVideoPlaybackWrapper *mPlaybackWrapper;
       
    89 
       
    90         VideoServices*            mVideoServices;
       
    91 
       
    92 };
       
    93 
       
    94 #endif // VIDEOPLAYERENGINE_H
       
    95 
       
    96 // EOF