videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolbar/stub/inc/mpxvideoplaybackcontrolscontroller.h
changeset 52 e3cecb93e76a
parent 47 45e72b57a2fd
child 59 a76e86df7ccd
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
     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 QMPXVideoPlaybackControlsController ;
       
    35 
       
    36 // DATA TYPES
       
    37 
       
    38 enum TMPXTimerAction
       
    39 {
       
    40     EMPXTimerCancel,
       
    41     EMPXTimerReset
       
    42 };
       
    43 
       
    44 enum TPlaybackViewMode
       
    45 {
       
    46     EFullScreenView,
       
    47     EDetailsView,
       
    48     EAudioOnlyView
       
    49 };
       
    50 
       
    51 // CLASS DECLARATION
       
    52 
       
    53 class QMPXVideoPlaybackControlsController : public QObject
       
    54 {
       
    55     Q_OBJECT
       
    56 
       
    57     public:
       
    58 
       
    59         /**
       
    60         * constructor.
       
    61         */
       
    62         QMPXVideoPlaybackControlsController();
       
    63 
       
    64         /**
       
    65         * Destructor.
       
    66         */
       
    67         virtual ~QMPXVideoPlaybackControlsController();
       
    68 
       
    69     public:
       
    70 
       
    71         /**
       
    72         * Command handling function.
       
    73         * Call HandleCommandL() of container
       
    74         */
       
    75         void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 );
       
    76 
       
    77         /**
       
    78         * Reset or cancel timers for the controls
       
    79         */
       
    80         void resetDisappearingTimers( TMPXTimerAction timerAction );
       
    81 
       
    82         /**
       
    83         * Return state
       
    84         */
       
    85         inline TMPXPlaybackState state();
       
    86 
       
    87         /**
       
    88         * Return file details
       
    89         */
       
    90         inline QMPXVideoPlaybackViewFileDetails* fileDetails();
       
    91 
       
    92         TPlaybackViewMode viewMode();
       
    93 
       
    94         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
       
    95 
       
    96     public:
       
    97         QMPXVideoPlaybackViewFileDetails          *mFileDetails;
       
    98 
       
    99         TMPXPlaybackState                          mState;
       
   100         TPlaybackViewMode                          mViewMode;
       
   101         TMPXTimerAction                            mTimerAction;
       
   102         TMPXVideoPlaybackViewCommandIds            mCommand;
       
   103         int                                        mCommandValue;
       
   104 };
       
   105 
       
   106 // INLINE METHODS
       
   107 // -------------------------------------------------------------------------------------------------
       
   108 //   QMPXVideoPlaybackControlsController::state
       
   109 // -------------------------------------------------------------------------------------------------
       
   110 //
       
   111 inline
       
   112 TMPXPlaybackState QMPXVideoPlaybackControlsController::state()
       
   113 {
       
   114     return mState;
       
   115 }
       
   116 
       
   117 // -------------------------------------------------------------------------------------------------
       
   118 //   QMPXVideoPlaybackControlsController::fileDetails
       
   119 // -------------------------------------------------------------------------------------------------
       
   120 //
       
   121 inline
       
   122 QMPXVideoPlaybackViewFileDetails* QMPXVideoPlaybackControlsController::fileDetails()
       
   123 {
       
   124     return mFileDetails;
       
   125 }
       
   126 
       
   127 // -------------------------------------------------------------------------------------------------
       
   128 //   QMPXVideoPlaybackControlsController::viewMode
       
   129 // -------------------------------------------------------------------------------------------------
       
   130 //
       
   131 inline
       
   132 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode()
       
   133 {
       
   134     return mViewMode;
       
   135 }
       
   136 
       
   137 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   138 
       
   139 // End of File