videoplayback/videoplaybackview/tsrc/testdetailsplaybackwindow/stub/inc/videoplaybackcontrolscontroller.h
changeset 52 e3cecb93e76a
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 VideoPlaybackControlsController
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:  4 %
       
    19 
       
    20 
       
    21 
       
    22 #ifndef VIDEOPLAYBACKCONTROLSCONTROLLER_H_
       
    23 #define VIDEOPLAYBACKCONTROLSCONTROLLER_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 VideoPlaybackDocumentLoader;
       
    35 
       
    36 
       
    37 // DATA TYPES
       
    38 
       
    39 enum TTimerAction
       
    40 {
       
    41     ETimerCancel,
       
    42     ETimerReset
       
    43 };
       
    44 
       
    45 enum TPlaybackViewMode
       
    46 {
       
    47     EFullScreenView,
       
    48     EDetailsView,
       
    49     EAudioOnlyView
       
    50 };
       
    51 
       
    52 // CLASS DECLARATION
       
    53 
       
    54 class VideoPlaybackControlsController : public QObject
       
    55 {
       
    56     Q_OBJECT
       
    57 
       
    58     public:
       
    59 
       
    60         /**
       
    61         * constructor.
       
    62         */
       
    63         VideoPlaybackControlsController( bool attachOperation );
       
    64 
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         virtual ~VideoPlaybackControlsController();
       
    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( TTimerAction timerAction );
       
    82 
       
    83         /**
       
    84         * Return state
       
    85         */
       
    86         inline TMPXPlaybackState state();
       
    87 
       
    88         /**
       
    89         * Return file details
       
    90         */
       
    91         inline VideoPlaybackViewFileDetails* fileDetails();
       
    92 
       
    93         inline VideoPlaybackDocumentLoader* 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         void sendVideo();
       
   104                 
       
   105     public:
       
   106         VideoPlaybackViewFileDetails    *mFileDetails;
       
   107         VideoPlaybackDocumentLoader     *mLoader;
       
   108 
       
   109         TMPXPlaybackState               mState;
       
   110         TPlaybackViewMode               mViewMode;
       
   111         TTimerAction                 mTimerAction;
       
   112         TMPXVideoPlaybackViewCommandIds mCommand;
       
   113         int                             mCommandValue;
       
   114         bool                            mIsAttachOperation;
       
   115         bool                            mAttachVideoDone;
       
   116         bool                            mSendVideoDone;
       
   117 };
       
   118 
       
   119 // INLINE METHODS
       
   120 // -------------------------------------------------------------------------------------------------
       
   121 //   VideoPlaybackControlsController::state
       
   122 // -------------------------------------------------------------------------------------------------
       
   123 //
       
   124 inline
       
   125 TMPXPlaybackState VideoPlaybackControlsController::state()
       
   126 {
       
   127     return mState;
       
   128 }
       
   129 
       
   130 // -------------------------------------------------------------------------------------------------
       
   131 //   VideoPlaybackControlsController::fileDetails
       
   132 // -------------------------------------------------------------------------------------------------
       
   133 //
       
   134 inline
       
   135 VideoPlaybackViewFileDetails* VideoPlaybackControlsController::fileDetails()
       
   136 {
       
   137     return mFileDetails;
       
   138 }
       
   139 
       
   140 // -------------------------------------------------------------------------------------------------
       
   141 //   VideoPlaybackControlsController::layoutLoader
       
   142 // -------------------------------------------------------------------------------------------------
       
   143 //
       
   144 inline
       
   145 VideoPlaybackDocumentLoader* VideoPlaybackControlsController::layoutLoader()
       
   146 {
       
   147     return mLoader;
       
   148 }
       
   149 
       
   150 // -------------------------------------------------------------------------------------------------
       
   151 //   VideoPlaybackControlsController::viewMode
       
   152 // -------------------------------------------------------------------------------------------------
       
   153 //
       
   154 inline
       
   155 TPlaybackViewMode VideoPlaybackControlsController::viewMode()
       
   156 {
       
   157     return mViewMode;
       
   158 }
       
   159 
       
   160 #endif /*VIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   161 
       
   162 // End of File