videoplayback/hbvideoplaybackview/tsrc/testdetailsplaybackwindow/stub/inc/mpxvideoplaybackcontrolscontroller.h
changeset 36 8aed59de29f9
child 20 b9e04db066d4
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
       
     1 /*
       
     2 * Copyright (c) 2010 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 MPXVideoPlaybackControlsController
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:  2 %
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
       
    23 #define MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
       
    24 
       
    25 // INCLUDES
       
    26 #include <qobject>
       
    27 #include <mpxplaybackframeworkdefs.h>
       
    28 
       
    29 #include "mpxvideo_debug.h"
       
    30 #include "mpxcommonvideoplaybackview.hrh"
       
    31 #include "mpxvideoplaybackviewfiledetails.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class QMPXVideoPlaybackDocumentLoader;
       
    35 
       
    36 
       
    37 // DATA TYPES
       
    38 
       
    39 enum TMPXTimerAction
       
    40 {
       
    41     EMPXTimerCancel,
       
    42     EMPXTimerReset
       
    43 };
       
    44 
       
    45 enum TPlaybackViewMode
       
    46 {
       
    47     EFullScreenView,
       
    48     EDetailsView,
       
    49     EAudioOnlyView
       
    50 };
       
    51 
       
    52 // CLASS DECLARATION
       
    53 
       
    54 class QMPXVideoPlaybackControlsController : public QObject
       
    55 {
       
    56     Q_OBJECT
       
    57 
       
    58     public:
       
    59 
       
    60         /**
       
    61         * constructor.
       
    62         */
       
    63         QMPXVideoPlaybackControlsController( bool attachOperation );
       
    64 
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         virtual ~QMPXVideoPlaybackControlsController();
       
    69 
       
    70     public:
       
    71 
       
    72         /**
       
    73         * Command handling function.
       
    74         * Call HandleCommandL() of container
       
    75         */
       
    76         void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 );
       
    77 
       
    78         /**
       
    79         * Reset or cancel timers for the controls
       
    80         */
       
    81         void resetDisappearingTimers( TMPXTimerAction timerAction );
       
    82 
       
    83         /**
       
    84         * Return state
       
    85         */
       
    86         inline TMPXPlaybackState state();
       
    87 
       
    88         /**
       
    89         * Return file details
       
    90         */
       
    91         inline QMPXVideoPlaybackViewFileDetails* fileDetails();
       
    92 
       
    93         inline QMPXVideoPlaybackDocumentLoader* layoutLoader();
       
    94 
       
    95         TPlaybackViewMode viewMode();
       
    96 
       
    97         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
       
    98 
       
    99         bool isAttachOperation();
       
   100         
       
   101     private slots:
       
   102         void attachVideo();
       
   103                 
       
   104     public:
       
   105         QMPXVideoPlaybackViewFileDetails          *mFileDetails;
       
   106         QMPXVideoPlaybackDocumentLoader           *mLoader;
       
   107 
       
   108         TMPXPlaybackState                          mState;
       
   109         TPlaybackViewMode                          mViewMode;
       
   110         TMPXTimerAction                            mTimerAction;
       
   111         TMPXVideoPlaybackViewCommandIds            mCommand;
       
   112         int                                        mCommandValue;
       
   113         bool                                       mIsAttachOperation;
       
   114         bool                                       mAttachVideoDone;
       
   115 };
       
   116 
       
   117 // INLINE METHODS
       
   118 // -------------------------------------------------------------------------------------------------
       
   119 //   QMPXVideoPlaybackControlsController::state
       
   120 // -------------------------------------------------------------------------------------------------
       
   121 //
       
   122 inline
       
   123 TMPXPlaybackState QMPXVideoPlaybackControlsController::state()
       
   124 {
       
   125     return mState;
       
   126 }
       
   127 
       
   128 // -------------------------------------------------------------------------------------------------
       
   129 //   QMPXVideoPlaybackControlsController::fileDetails
       
   130 // -------------------------------------------------------------------------------------------------
       
   131 //
       
   132 inline
       
   133 QMPXVideoPlaybackViewFileDetails* QMPXVideoPlaybackControlsController::fileDetails()
       
   134 {
       
   135     return mFileDetails;
       
   136 }
       
   137 
       
   138 // -------------------------------------------------------------------------------------------------
       
   139 //   QMPXVideoPlaybackControlsController::layoutLoader
       
   140 // -------------------------------------------------------------------------------------------------
       
   141 //
       
   142 inline
       
   143 QMPXVideoPlaybackDocumentLoader* QMPXVideoPlaybackControlsController::layoutLoader()
       
   144 {
       
   145     return mLoader;
       
   146 }
       
   147 
       
   148 // -------------------------------------------------------------------------------------------------
       
   149 //   QMPXVideoPlaybackControlsController::viewMode
       
   150 // -------------------------------------------------------------------------------------------------
       
   151 //
       
   152 inline
       
   153 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode()
       
   154 {
       
   155     return mViewMode;
       
   156 }
       
   157 
       
   158 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   159 
       
   160 // End of File