videoplayback/videoplaybackview/tsrc/testcontrolbar/stub/inc/videoplaybackcontrolscontroller.h
changeset 44 518105d52e45
equal deleted inserted replaced
42:17f382c040b1 44:518105d52e45
       
     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:   3 %
       
    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 "videoplaybackviewfiledetails.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class VideoPlaybackControlsController ;
       
    35 
       
    36 // DATA TYPES
       
    37 
       
    38 enum TTimerAction
       
    39 {
       
    40     ETimerCancel,
       
    41     ETimerReset
       
    42 };
       
    43 
       
    44 enum TPlaybackViewMode
       
    45 {
       
    46     EFullScreenView,
       
    47     EDetailsView,
       
    48     EAudioOnlyView
       
    49 };
       
    50 
       
    51 // CLASS DECLARATION
       
    52 
       
    53 class VideoPlaybackControlsController : public QObject
       
    54 {
       
    55     Q_OBJECT
       
    56 
       
    57     public:
       
    58 
       
    59         /**
       
    60         * constructor.
       
    61         */
       
    62         VideoPlaybackControlsController();
       
    63 
       
    64         /**
       
    65         * Destructor.
       
    66         */
       
    67         virtual ~VideoPlaybackControlsController();
       
    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( TTimerAction timerAction );
       
    81 
       
    82         /**
       
    83         * Return state
       
    84         */
       
    85         inline TMPXPlaybackState state();
       
    86 
       
    87         /**
       
    88         * Return file details
       
    89         */
       
    90         inline VideoPlaybackViewFileDetails* fileDetails();
       
    91 
       
    92         TPlaybackViewMode viewMode();
       
    93 
       
    94         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
       
    95 
       
    96     public:
       
    97         VideoPlaybackViewFileDetails          *mFileDetails;
       
    98 
       
    99         TMPXPlaybackState                      mState;
       
   100         TPlaybackViewMode                      mViewMode;
       
   101         TTimerAction                           mTimerAction;
       
   102         TMPXVideoPlaybackViewCommandIds        mCommand;
       
   103         int                                    mCommandValue;
       
   104 };
       
   105 
       
   106 // INLINE METHODS
       
   107 // -------------------------------------------------------------------------------------------------
       
   108 //   VideoPlaybackControlsController::state
       
   109 // -------------------------------------------------------------------------------------------------
       
   110 //
       
   111 inline
       
   112 TMPXPlaybackState VideoPlaybackControlsController::state()
       
   113 {
       
   114     return mState;
       
   115 }
       
   116 
       
   117 // -------------------------------------------------------------------------------------------------
       
   118 //   VideoPlaybackControlsController::fileDetails
       
   119 // -------------------------------------------------------------------------------------------------
       
   120 //
       
   121 inline
       
   122 VideoPlaybackViewFileDetails* VideoPlaybackControlsController::fileDetails()
       
   123 {
       
   124     return mFileDetails;
       
   125 }
       
   126 
       
   127 // -------------------------------------------------------------------------------------------------
       
   128 //   VideoPlaybackControlsController::viewMode
       
   129 // -------------------------------------------------------------------------------------------------
       
   130 //
       
   131 inline
       
   132 TPlaybackViewMode VideoPlaybackControlsController::viewMode()
       
   133 {
       
   134     return mViewMode;
       
   135 }
       
   136 
       
   137 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   138 
       
   139 // End of File