tsrc/musenginestub/inc/musenglivesession.h
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2005 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 
       
    19 #ifndef MUSHENGLIVESESSION_H
       
    20 #define MUSHENGLIVESESSION_H
       
    21 
       
    22 // USER
       
    23 #include "musengmceoutsession.h"
       
    24 #include "musunittesting.h"
       
    25 #include "mussettings.h"
       
    26 #include "musengcamerahandler.h"
       
    27 #include "lcvideoplayer.h"
       
    28 #include "lccameracontrol.h"
       
    29 #include "lcbrightnesscontrol.h"
       
    30 #include "lczoomcontrol.h"
       
    31 #include "lcfilecontrol.h"
       
    32 
       
    33 // SYSTEM
       
    34 #include <ecam.h>
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class MMusEngLiveSessionObserver;
       
    38 class MLcValueControl;
       
    39 
       
    40 
       
    41 class CMusEngLiveSession : 
       
    42     public CMusEngMceOutSession, 
       
    43     public MLcVideoPlayer,
       
    44     public MLcCameraControl,
       
    45     public MLcBrightnessControl,
       
    46     public MLcZoomControl,
       
    47     public MLcFileControl
       
    48     {
       
    49     
       
    50     public:
       
    51         /**
       
    52         * Creates new MultimediaSharing Live session.
       
    53         *
       
    54         * @param aFileName Media filename
       
    55         * @param aRect UI drawing area. It is allowed handle from engine
       
    56         * @param aSessionObserver Interface for session specific callbacks
       
    57         * @param aOutSessionObserver Interface for outsession specific callbacks
       
    58         * @param aLiveSessionObserver interface for live session specific
       
    59         *        callbacks
       
    60         * @return CMusEngLiveSession* New instanse of specified class
       
    61         */
       
    62         static CMusEngLiveSession* NewL( 
       
    63 							const TDesC& aFileName,
       
    64                             const TRect& aRect );
       
    65                             
       
    66         /**
       
    67         * Creates new MultimediaSharing Live session.
       
    68         *
       
    69         * @param aRect UI drawing area. It is allowed handle from engine
       
    70         * @param aSessionObserver Interface for session specific callbacks
       
    71         * @param aOutSessionObserver Interface for outsession specific callbacks
       
    72         * @param aLiveSessionObserver interface for live session specific
       
    73         *        callbacks
       
    74         * @return CMusEngLiveSession* New instanse of specified class
       
    75         */
       
    76         static CMusEngLiveSession* NewL( 
       
    77                             const TRect& aRect );
       
    78 
       
    79 
       
    80     public:
       
    81 
       
    82         /**
       
    83         * Destructor
       
    84         */
       
    85         ~CMusEngLiveSession();
       
    86 
       
    87 
       
    88     public: // from MLcSession
       
    89         
       
    90         void EstablishLcSessionL();
       
    91     
       
    92         MLcVideoPlayer* LocalVideoPlayer();
       
    93         
       
    94         const TDesC& RemoteDisplayName();
       
    95         
       
    96         
       
    97     public: // from MLcVideoPlayer
       
    98         
       
    99         TLcVideoPlayerState LcVideoPlayerState() const;
       
   100         
       
   101         TBool LcIsPlayingL();
       
   102         
       
   103         void LcPlayL();
       
   104         
       
   105         void LcPauseL();
       
   106     
       
   107         MLcWindow* LcWindow();
       
   108 
       
   109         MLcCameraControl* LcCameraControl();
       
   110         
       
   111         MLcFileControl* LcSourceFile();
       
   112         
       
   113         MLcFileControl* LcDestinationFile();
       
   114         
       
   115         MLcAudioControl* LcAudioControl();
       
   116     
       
   117         MLcZoomControl* LcZoomControl();
       
   118     
       
   119         MLcBrightnessControl* LcBrightnessControl();
       
   120 
       
   121         RPointerArray< MLcValueControl >& LcExtensionControls();    
       
   122 
       
   123     public: // from MLcCameraControl
       
   124         
       
   125         TInt LcCameraCountL();
       
   126 
       
   127         void ToggleLcCameraL();       
       
   128 
       
   129     public: // MLcBrightnessControl
       
   130         
       
   131         TInt MinLcBrightnessL();
       
   132 
       
   133         TInt MaxLcBrightnessL();
       
   134 
       
   135         TInt LcBrightnessL();
       
   136 
       
   137         void SetLcBrightnessL( TInt aValue );
       
   138         
       
   139         void IncreaseLcBrightnessL();
       
   140         
       
   141         void DecreaseLcBrightnessL();
       
   142         
       
   143     public: // from MLcZoomControl
       
   144         
       
   145         TInt MinLcZoomL();
       
   146 
       
   147         TInt MaxLcZoomL();
       
   148 
       
   149         TInt LcZoomValueL();
       
   150 
       
   151         void SetLcZoomValueL( TInt aValue );
       
   152         
       
   153         void LcZoomInL();
       
   154         
       
   155         void LcZoomOutL();        
       
   156         
       
   157     public: // from MLcFileControl
       
   158         
       
   159         void EnableLcFileL( TBool aEnable );
       
   160         
       
   161         TBool IsLcFileEnabled();
       
   162 
       
   163         void SetLcFileNameL( const TFileName& aFileName );
       
   164         
       
   165         TFileName& LcFileName();  
       
   166         
       
   167     protected:
       
   168 
       
   169         /**
       
   170         * Constructor
       
   171         */
       
   172         CMusEngLiveSession( const TRect& aRect, 
       
   173         					const TDesC& aRecordedFile = KNullDesC );
       
   174 
       
   175         /**
       
   176         * Second-phase constructor
       
   177         */
       
   178         void ConstructL();
       
   179 
       
   180     
       
   181 
       
   182     protected:
       
   183 
       
   184         /**
       
   185         * File name for recording. If KNullDesC no recording performed.
       
   186         */
       
   187         TFileName iRecordedFile;
       
   188         
       
   189         /** 
       
   190         * Dummy member variable to implement MLcVideoPlayer::LcExtensionControls
       
   191         */
       
   192         RPointerArray< MLcValueControl > iValueControls;    
       
   193         
       
   194         TMusEngCameraHandler iCameraHandler;
       
   195         
       
   196         /*
       
   197          * Remote Display Name
       
   198          */
       
   199         HBufC* iRemoteDisplayName;
       
   200         
       
   201         TInt iCurrentZoom;
       
   202         TInt iDefaultZoomFactor;
       
   203         TInt iCurrentBrighness;
       
   204         TInt iPlaying;
       
   205         TBool iFileEnabled;
       
   206         
       
   207     };
       
   208 
       
   209 #endif
       
   210