diff -r 33a5d2bbf6fc -r 73a1feb507fb tsrc/musenginestub/inc/musenglivesession.h --- a/tsrc/musenginestub/inc/musenglivesession.h Thu Aug 19 09:51:39 2010 +0300 +++ b/tsrc/musenginestub/inc/musenglivesession.h Tue Aug 31 15:12:07 2010 +0300 @@ -21,182 +21,189 @@ // USER #include "musengmceoutsession.h" +#include "musunittesting.h" +#include "mussettings.h" +#include "musengcamerahandler.h" +#include "lcvideoplayer.h" +#include "lccameracontrol.h" +#include "lcbrightnesscontrol.h" +#include "lczoomcontrol.h" +#include "lcfilecontrol.h" // SYSTEM #include // FORWARD DECLARATIONS class MMusEngLiveSessionObserver; +class MLcValueControl; -class CMusEngLiveSession : public CMusEngMceOutSession +class CMusEngLiveSession : + public CMusEngMceOutSession, + public MLcVideoPlayer, + public MLcCameraControl, + public MLcBrightnessControl, + public MLcZoomControl, + public MLcFileControl { - + public: - /** * Creates new MultimediaSharing Live session. * - * @since S60 v3.2 * @param aFileName Media filename * @param aRect UI drawing area. It is allowed handle from engine - * @param aSessionObserver Session specific callbacks - * @param aSipProfileId SIP profile to be used, 0 is default profile + * @param aSessionObserver Interface for session specific callbacks + * @param aOutSessionObserver Interface for outsession specific callbacks + * @param aLiveSessionObserver interface for live session specific + * callbacks * @return CMusEngLiveSession* New instanse of specified class */ - IMPORT_C static CMusEngLiveSession* NewL( - const TDesC& aFileName, - const TRect& aRect, - MMusEngLiveSessionObserver* aSessionObserver, - TUint aSipProfileId = 0); - + static CMusEngLiveSession* NewL( + const TDesC& aFileName, + const TRect& aRect ); + /** * Creates new MultimediaSharing Live session. * - * @since S60 v3.2 * @param aRect UI drawing area. It is allowed handle from engine - * @param aSessionObserver Session specific callbacks - * @param aSipProfileId SIP profile to be used, 0 is default profile + * @param aSessionObserver Interface for session specific callbacks + * @param aOutSessionObserver Interface for outsession specific callbacks + * @param aLiveSessionObserver interface for live session specific + * callbacks * @return CMusEngLiveSession* New instanse of specified class */ - IMPORT_C static CMusEngLiveSession* NewL( - const TRect& aRect, - MMusEngLiveSessionObserver* aSessionObserver, - TUint aSipProfileId = 0 ); + static CMusEngLiveSession* NewL( + const TRect& aRect ); + public: /** * Destructor - * - * @since S60 v3.2 */ ~CMusEngLiveSession(); - - public: // NEW API FUNCTIONS live session specific - - /** - * Sets callback interface pointer - * - * @since S60 v3.2 - * @param aSessionObserver Pointer to class which implements interface - */ - IMPORT_C void SetSessionObserver( - MMusEngLiveSessionObserver* aSessionObserver ); + public: // from MLcSession + + void EstablishLcSessionL(); + + MLcVideoPlayer* LocalVideoPlayer(); + + const TDesC& RemoteDisplayName(); + + + public: // from MLcVideoPlayer + + TLcVideoPlayerState LcVideoPlayerState() const; + + TBool LcIsPlayingL(); + + void LcPlayL(); + + void LcPauseL(); + + MLcWindow* LcWindow(); - /** - * Gets current zoom factor - * - * @pre Session is established - * @leave KErrNotReady if precondition not fullfilled - * @since S60 v3.2 - */ - IMPORT_C TInt CurrentZoomL() const; + MLcCameraControl* LcCameraControl(); + + MLcFileControl* LcSourceFile(); + + MLcFileControl* LcDestinationFile(); + + MLcAudioControl* LcAudioControl(); + + MLcZoomControl* LcZoomControl(); + + MLcBrightnessControl* LcBrightnessControl(); - /** - * Gets maximum zoom factor - * - * @pre Session is established - * @leave KErrNotReady if precondition not fullfilled - * @since S60 v3.2 - */ - IMPORT_C TInt MaxZoomL() const; + RPointerArray< MLcValueControl >& LcExtensionControls(); - IMPORT_C TInt MinZoomL() const; - - /** - * Increases zoom factor by one. - * - * @pre Session is established - * @leave KErrNotReady if precondition not fullfilled - * @since S60 v3.2 - */ - IMPORT_C void ZoomInL(); + public: // from MLcCameraControl + + TInt LcCameraCountL(); - /** - * Decreases zoom factor by one. - * - * @pre Session is established - * @leave KErrNotReady if precondition not fullfilled - * @since S60 v3.2 - */ - IMPORT_C void ZoomOutL(); + void ToggleLcCameraL(); + + public: // MLcBrightnessControl + + TInt MinLcBrightnessL(); + + TInt MaxLcBrightnessL(); + + TInt LcBrightnessL(); - /** - * Sets zoom factor to default. - * - * @pre Session is established - * @leave KErrNotReady if precondition not fullfilled - * @since S60 v3.2 - */ - IMPORT_C void ZoomDefaultL(); - - public: // implementation of virtual API from CMusEngMceOutSession + void SetLcBrightnessL( TInt aValue ); + + void IncreaseLcBrightnessL(); + + void DecreaseLcBrightnessL(); + + public: // from MLcZoomControl + + TInt MinLcZoomL(); - /** - * Resumes previously paused session. - * Continues using viewfinder and enables streaming video. - * - * @since S60 v3.2 - */ - IMPORT_C void PlayL(); + TInt MaxLcZoomL(); + + TInt LcZoomValueL(); - /** - * Pauses session. - * Holds display and disables streaming video to network. - * - * @since S60 v3.2 - */ - IMPORT_C void PauseL(); - + void SetLcZoomValueL( TInt aValue ); + + void LcZoomInL(); + + void LcZoomOutL(); + + public: // from MLcFileControl + + void EnableLcFileL( TBool aEnable ); + + TBool IsLcFileEnabled(); - protected: // inherited from CMusEngMceOutSession - - /** - * - * @since S60 v3.2 - */ - void CompleteSessionStructureL(); - - - private: + void SetLcFileNameL( const TFileName& aFileName ); + + TFileName& LcFileName(); + + protected: /** * Constructor - - * @since S60 v3.2 */ - CMusEngLiveSession( MMusEngLiveSessionObserver* aSessionObserver, - const TRect& aRect, - TUint aSipProfileId = 0 ); + CMusEngLiveSession( const TRect& aRect, + const TDesC& aRecordedFile = KNullDesC ); /** * Second-phase constructor - * - * @since S60 v3.2 */ void ConstructL(); + - public: + protected: /** - * - * @since S60 v3.2 + * File name for recording. If KNullDesC no recording performed. + */ + TFileName iRecordedFile; + + /** + * Dummy member variable to implement MLcVideoPlayer::LcExtensionControls */ - //TCameraInfo iCameraInfo; - - /** - * - * @since S60 v3.2 - */ + RPointerArray< MLcValueControl > iValueControls; + + TMusEngCameraHandler iCameraHandler; + + /* + * Remote Display Name + */ + HBufC* iRemoteDisplayName; + + TInt iCurrentZoom; TInt iDefaultZoomFactor; + TInt iCurrentBrighness; TInt iPlaying; - TInt iCurrentZoom; - - + TBool iFileEnabled; + }; #endif