mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/lcstub/inc/lcvideoplayerstub.h
branchRCL_3
changeset 23 bc78a40cd63c
parent 22 73a1feb507fb
child 24 6c57ef9392d2
equal deleted inserted replaced
22:73a1feb507fb 23:bc78a40cd63c
     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: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef LCVIDEOPLAYERSTUB_H
       
    19 #define LCVIDEOPLAYERSTUB_H
       
    20 
       
    21 #include <e32base.h>    // CBase
       
    22 
       
    23 // USER
       
    24 #include "lcvideoplayer.h"
       
    25 #include "lcaudiocontrol.h"
       
    26 #include "lcwindow.h"
       
    27 #include "lccameracontrol.h"
       
    28 #include "lczoomcontrol.h"
       
    29 #include "lcbrightnesscontrol.h"
       
    30 
       
    31 class   MLcSourceFileControl; 
       
    32 class   MLcDestinationFileControl; 
       
    33 
       
    34 
       
    35 #include <QString>
       
    36 
       
    37 extern bool lcutStub_LcPlayer_expectCall( const QString& call, int callNdx = 0);
       
    38 extern void lcutStub_LcPlayer_reset();
       
    39 extern void lcutStub_LcPlayer_asyncCompletion( bool async );
       
    40 
       
    41 const char lcutStub_LcPlayer_NoCall[] = "NOCALL";
       
    42 const char lcutStub_LcPlayer_LcPlayL[] = "LcPlayer::LcPlayL";
       
    43 const char lcutStub_LcPlayer_LcPauseL[] = "LcPlayer::LcPauseL";
       
    44 const char lcutStub_LcPlayer_SetLcWindowRectL[] = "LcWindow::SetLcWindowRectL";
       
    45 const char lcutStub_LcPlayer_EnableLcWindowL[] = "LcPlayer::EnableLcWindowL";
       
    46 const char lcutStub_LcPlayer_DecreaseLcBrightnessL[] = "LcPlayer::DecreaseLcBrightnessL";
       
    47 const char lcutStub_LcPlayer_EnableLcLoudspeakerL[] = "LcPlayer::EnableLcLoudspeakerL";
       
    48 const char lcutStub_LcPlayer_LcZoomInL[] = "LcPlayer::LcZoomInL";
       
    49 const char lcutStub_LcPlayer_LcZoomOutL[] = "LcPlayer::LcZoomOutL";
       
    50 const char lcutStub_LcPlayer_MuteLcAudioL[] = "LcPlayer::MuteLcAudioL";
       
    51 const char lcutStub_LcPlayer_MuteLcMicL[] = "LcPlayer::MuteLcMicL";
       
    52 const char lcutStub_LcPlayer_SetLcBrightnessL[] = "LcPlayer::SetLcBrightnessL";
       
    53 const char lcutStub_LcPlayer_IncreaseLcBrightnessL[] = "LcPlayer::IncreaseLcBrightnessL";
       
    54 const char lcutStub_LcPlayer_SetLcZoomValueL[] = "LcPlayer::SetLcZoomValueL";
       
    55 const char lcutStub_LcPlayer_ToggleLcCameraL[] = "LcPlayer::ToggleLcCameraL";
       
    56 const char lcutStub_LcPlayer_SetLcWindowOrientationL[] = "LcWindow::SetLcWindowOrientationL";
       
    57 
       
    58 
       
    59 // CLASS DECLARATION
       
    60 /**
       
    61 *  
       
    62 */
       
    63 class CLcVideoPlayer :  public CBase,
       
    64                         public MLcVideoPlayer,
       
    65                         public MLcAudioControl,
       
    66                         public MLcWindow,
       
    67                         public MLcCameraControl,
       
    68                         public MLcZoomControl,
       
    69                         public MLcBrightnessControl
       
    70     {
       
    71     public:
       
    72         /**
       
    73         * Creates new CLcSession.
       
    74         *
       
    75         * @return CLcSession* New instanse of specified class
       
    76         */
       
    77         static CLcVideoPlayer* NewL();  
       
    78     
       
    79     public: 
       
    80     
       
    81         /**
       
    82         * Destructor
       
    83         */
       
    84         ~CLcVideoPlayer();
       
    85 
       
    86 
       
    87     public: // from MLcVideoPlayer
       
    88             
       
    89         TLcVideoPlayerState LcVideoPlayerState() const;
       
    90         
       
    91         TBool LcIsPlayingL();
       
    92         
       
    93         void LcPlayL(TLcVideoPlayerSource aSource=ECameraSource );
       
    94         
       
    95         void LcPauseL();
       
    96     
       
    97         MLcWindow* LcWindow();
       
    98 
       
    99         MLcCameraControl* LcCameraControl();
       
   100         
       
   101         MLcSourceFileControl* LcSourceFileControl();
       
   102             
       
   103         MLcDestinationFileControl* LcDestinationFileControl();
       
   104         
       
   105         MLcAudioControl* LcAudioControl();
       
   106     
       
   107         MLcZoomControl* LcZoomControl();
       
   108     
       
   109         MLcBrightnessControl* LcBrightnessControl();
       
   110         
       
   111 public: // from MLcWindow
       
   112         
       
   113         void EnableLcWindowL( TBool aEnable );
       
   114         
       
   115         TBool IsLcWindowEnabled();
       
   116         
       
   117         void SetLcWindowRectL( TRect aRect );
       
   118         
       
   119         TRect LcWindowRect();
       
   120         
       
   121         void SetLcWindowOrientationL( 
       
   122             TLcWindowOrientation aOrientation );
       
   123         
       
   124         TLcWindowOrientation LcWindowOrientationL(); 
       
   125         
       
   126 public: // from MLcAudioControl
       
   127         
       
   128         TBool IsLcAudioMutedL();
       
   129 
       
   130         void MuteLcAudioL( TBool aMute );       
       
   131 
       
   132         TBool IsLcMicMutedL();    
       
   133 
       
   134         void MuteLcMicL( TBool aMute );
       
   135         
       
   136         TBool IsLcLoudspeakerEnabled();
       
   137 
       
   138         void EnableLcLoudspeakerL( TBool aEnabled );
       
   139         
       
   140         TBool IsEnablingLcLoudspeakerAllowed();
       
   141         
       
   142         TInt LcVolumeL();
       
   143      
       
   144         void SetLcVolumeL( TInt aValue );    
       
   145     
       
   146         void IncreaseLcVolumeL();
       
   147         
       
   148         void DecreaseLcVolumeL();  
       
   149             
       
   150         
       
   151 public: //from MLcCameraControl
       
   152     
       
   153     TInt LcCameraCountL();
       
   154     TInt CurrentLcCameraIndex();
       
   155     void ToggleLcCameraL();
       
   156     
       
   157 public: //from MLcZoomControl
       
   158     
       
   159     TInt MinLcZoomL();
       
   160     TInt MaxLcZoomL();
       
   161     TInt LcZoomValueL();
       
   162     void SetLcZoomValueL( TInt aValue );
       
   163     void LcZoomInL();
       
   164     void LcZoomOutL();
       
   165     
       
   166 public: //from MLcBrightnessControl
       
   167         
       
   168     TInt MinLcBrightnessL();
       
   169     TInt MaxLcBrightnessL();
       
   170     TInt LcBrightnessL();
       
   171     void SetLcBrightnessL( TInt aValue );
       
   172     void IncreaseLcBrightnessL();
       
   173     void DecreaseLcBrightnessL();
       
   174     
       
   175     protected: // CONSTRUCTORS
       
   176 
       
   177         /**
       
   178         * Constructor
       
   179         *
       
   180         */
       
   181         CLcVideoPlayer( );
       
   182 
       
   183         /**
       
   184         * Second-phase constructor
       
   185         *
       
   186         */
       
   187         void ConstructL();
       
   188         
       
   189 
       
   190     public:
       
   191 
       
   192         /**
       
   193         * Drawing area rect.
       
   194         */
       
   195         TRect iRect;
       
   196         
       
   197         MLcWindow::TLcWindowOrientation iOrientation;
       
   198         
       
   199         TBool iWindowEnabled;
       
   200         
       
   201         TBool iMuted;
       
   202         
       
   203         TBool iMicMuted;
       
   204         
       
   205         TBool iLoudspeakerEnabled;
       
   206         
       
   207         TBool iEnablingLoudspeakerAllowed;
       
   208         
       
   209         TInt iVolume;
       
   210         
       
   211         MLcVideoPlayer::TLcVideoPlayerState iState;
       
   212         TBool iPlaying;
       
   213 
       
   214         
       
   215     };
       
   216     
       
   217 #endif //LCVIDEOPLAYERSTUB_H