videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackdocumentloader/stub/inc/mpxvideoplaybackcontrolscontroller.h
changeset 15 cf5481c2bc0b
equal deleted inserted replaced
2:dec420019252 15:cf5481c2bc0b
       
     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 "mpxhelixplaybackplugindefs.h"
       
    31 #include "mpxcommonvideoplaybackview.hrh"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 
       
    35 // DATA TYPES
       
    36 
       
    37 enum TMPXTimerAction
       
    38 {
       
    39     EMPXTimerCancel,
       
    40     EMPXTimerReset
       
    41 };
       
    42 
       
    43 enum TPlaybackViewMode
       
    44 {
       
    45     EFullScreenView,
       
    46     EDetailsView,
       
    47     EAudioOnlyView
       
    48 };
       
    49 
       
    50 const QString KMPXPLAYBACKVIEW_XML = ":/hbvideoplaybackview/hbvideoplaybackview.docml";
       
    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         TPlaybackViewMode viewMode();
       
    89 
       
    90         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
       
    91 
       
    92     public:
       
    93 
       
    94         TMPXPlaybackState                          mState;
       
    95         TPlaybackViewMode                          mViewMode;
       
    96         TMPXTimerAction                            mTimerAction;
       
    97         TMPXVideoPlaybackViewCommandIds            mCommand;
       
    98         int                                        mCommandValue;
       
    99 };
       
   100 
       
   101 // INLINE METHODS
       
   102 // -------------------------------------------------------------------------------------------------
       
   103 //   QMPXVideoPlaybackControlsController::state
       
   104 // -------------------------------------------------------------------------------------------------
       
   105 //
       
   106 inline
       
   107 TMPXPlaybackState QMPXVideoPlaybackControlsController::state()
       
   108 {
       
   109     return mState;
       
   110 }
       
   111 
       
   112 // -------------------------------------------------------------------------------------------------
       
   113 //   QMPXVideoPlaybackControlsController::viewMode
       
   114 // -------------------------------------------------------------------------------------------------
       
   115 //
       
   116 inline
       
   117 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode()
       
   118 {
       
   119     return mViewMode;
       
   120 }
       
   121 
       
   122 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   123 
       
   124 // End of File