videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/inc/mpxvideoplaybackcontrolscontroller.h
changeset 35 3738fe97f027
child 41 229f037ce963
equal deleted inserted replaced
34:bbb98528c666 35:3738fe97f027
       
     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:   1 %
       
    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 class QMPXVideoPlaybackControlsController ;
       
    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();
       
    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     public:
       
   100         QMPXVideoPlaybackViewFileDetails          *mFileDetails;
       
   101         QMPXVideoPlaybackDocumentLoader           *mLoader;
       
   102 
       
   103         TMPXPlaybackState                          mState;
       
   104         TPlaybackViewMode                          mViewMode;
       
   105         TMPXTimerAction                            mTimerAction;
       
   106         TMPXVideoPlaybackViewCommandIds            mCommand;
       
   107         int                                        mCommandValue;
       
   108 };
       
   109 
       
   110 // INLINE METHODS
       
   111 // -------------------------------------------------------------------------------------------------
       
   112 //   QMPXVideoPlaybackControlsController::state
       
   113 // -------------------------------------------------------------------------------------------------
       
   114 //
       
   115 inline
       
   116 TMPXPlaybackState QMPXVideoPlaybackControlsController::state()
       
   117 {
       
   118     return mState;
       
   119 }
       
   120 
       
   121 // -------------------------------------------------------------------------------------------------
       
   122 //   QMPXVideoPlaybackControlsController::fileDetails
       
   123 // -------------------------------------------------------------------------------------------------
       
   124 //
       
   125 inline
       
   126 QMPXVideoPlaybackViewFileDetails* QMPXVideoPlaybackControlsController::fileDetails()
       
   127 {
       
   128     return mFileDetails;
       
   129 }
       
   130 
       
   131 // -------------------------------------------------------------------------------------------------
       
   132 //   QMPXVideoPlaybackControlsController::layoutLoader
       
   133 // -------------------------------------------------------------------------------------------------
       
   134 //
       
   135 inline
       
   136 QMPXVideoPlaybackDocumentLoader* QMPXVideoPlaybackControlsController::layoutLoader()
       
   137 {
       
   138     return mLoader;
       
   139 }
       
   140 
       
   141 // -------------------------------------------------------------------------------------------------
       
   142 //   QMPXVideoPlaybackControlsController::viewMode
       
   143 // -------------------------------------------------------------------------------------------------
       
   144 //
       
   145 inline
       
   146 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode()
       
   147 {
       
   148     return mViewMode;
       
   149 }
       
   150 
       
   151 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   152 
       
   153 // End of File