videoplayback/inc/videobaseplaybackview.h
branchRCL_3
changeset 22 839377eedc2b
equal deleted inserted replaced
21:315810614048 22:839377eedc2b
       
     1 /*
       
     2 * Copyright (c) 2009 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:  MPX Video base playback view
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:  da1mmcf#21 %
       
    19 
       
    20 
       
    21 
       
    22 // This file defines the API for .dll
       
    23 
       
    24 #ifndef __VIDEOBASEPLAYBACKVIEW_H__
       
    25 #define __VIDEOBASEPLAYBACKVIEW_H__
       
    26 
       
    27 //  Include Files
       
    28 #include <hbview.h>
       
    29 
       
    30 //  Constants
       
    31 
       
    32 //  Forward Declarations
       
    33 class QTimer;
       
    34 class RWindow;
       
    35 class CMPXVideoViewWrapper;
       
    36 
       
    37 
       
    38 //  Class Definitions
       
    39 
       
    40 class VideoBasePlaybackView : public HbView
       
    41 {
       
    42     Q_OBJECT
       
    43 
       
    44     public:
       
    45         VideoBasePlaybackView();
       
    46         virtual ~VideoBasePlaybackView();
       
    47 
       
    48     signals:
       
    49         void activatePreviousView();
       
    50         void tappedOnScreen();
       
    51         void pannedToRight();
       
    52         void pannedToLeft();
       
    53 
       
    54     public slots:
       
    55         virtual void closePlaybackView();
       
    56 
       
    57     protected slots:
       
    58         void handleClosePopupDialog();
       
    59         void handleAppBackground();
       
    60         void handleAppForeground();
       
    61 
       
    62     public:
       
    63 
       
    64         virtual void retrievePdlInformation();
       
    65 
       
    66         virtual void handleActivateView();
       
    67 
       
    68         virtual void handleDeactivateView();
       
    69 
       
    70         virtual void handlePluginError( int aError );
       
    71 
       
    72         /*
       
    73          *  Handle transition to the stopped state
       
    74          */
       
    75         virtual void handleStoppedState() = 0;
       
    76 
       
    77         virtual void doClosePlayer();
       
    78 
       
    79         //
       
    80         //  Function the derived classes must implement
       
    81         //
       
    82         virtual void handleSoftkeyBack() = 0;
       
    83 
       
    84         /*
       
    85          *  Handle Download State Change
       
    86          *  @param  aState  new state of the download
       
    87          */
       
    88         virtual void handlePdlStateChange( int aState ) = 0;
       
    89 
       
    90         virtual void handleBufferingState();
       
    91 
       
    92         virtual void issuePlayCommand();
       
    93 
       
    94         void initializeVideoPlaybackView();
       
    95 
       
    96         void showDialog( const QString& string, bool closeView = true );
       
    97 
       
    98         virtual void handleClosePlaybackView();
       
    99 
       
   100         RWindow *getWindow();
       
   101 
       
   102         bool eventFilter( QObject *object, QEvent *event );
       
   103 
       
   104         void gestureEvent( QGestureEvent* event );
       
   105 
       
   106     private:
       
   107 
       
   108         void saveActivityData();
       
   109 
       
   110     protected: // data
       
   111         CMPXVideoViewWrapper                *mVideoMpxWrapper;
       
   112 
       
   113         QTimer                              *mTimerForClosingView;
       
   114 
       
   115         bool                                 mActivated;
       
   116         bool                                 mSyncClose;
       
   117         int                                  mLastPlayPosition;
       
   118         bool                                 mStayPaused;
       
   119 
       
   120     public:
       
   121         friend class CMPXVideoViewWrapper;
       
   122 };
       
   123 
       
   124 #endif  // __VIDEOBASEPLAYBACKVIEW_H__
       
   125 
       
   126 // EOF