--- a/mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h Tue Aug 31 15:12:07 2010 +0300
+++ b/mmsharing/mmshengine/tsrc/ut_engine/inc/musengstubs.h Wed Sep 01 12:31:01 2010 +0100
@@ -20,18 +20,17 @@
#ifndef UT_MUSSTUBS_H
#define UT_MUSSTUBS_H
+
+#include "musengsessionobserver.h"
+#include "musengoutsessionobserver.h"
+#include "musenglivesessionobserver.h"
+#include "musengclipsessionobserver.h"
+#include "musengreceivesessionobserver.h"
#include "musengsessiondurationtimerobserver.h"
#include "musengaudioroutingobserver.h"
-#include "musengdisplayhandler.h"
-#include "mussipprofileuser.h"
-#include "muspropertyobserver.h"
+#include "musengvolumechangeobserver.h"
-#include <lcsessionobserver.h>
-#include <lcuiprovider.h>
-#include <lcwindow.h>
-#include <lcaudiocontrol.h>
#include <e32base.h>
-#include <ecom.h>
// DUMMY CLASSES
@@ -68,26 +67,91 @@
*/
class CMusEngObserverStub : public CBase,
public MMusEngSessionDurationTimerObserver,
+ public MMusEngSessionObserver,
+ public MMusEngOutSessionObserver,
+ public MMusEngLiveSessionObserver,
+ public MMusEngClipSessionObserver,
+ public MMusEngReceiveSessionObserver,
public MMusEngAudioRoutingObserver,
- public MMusSipProfileUser
+ public MMusEngVolumeChangeObserver
{
- public: // Constructors and destructor
+
+ public:
CMusEngObserverStub();
+
~CMusEngObserverStub();
+
+ // From MMusEngSessionDurationTimerObserver
+
+ void UpdateTimerEvent();
+
+ // From MMusEngSessionObserver
+
+ void SessionEstablished();
+ void SessionTerminated();
+ void SessionConnectionLost();
+ void SessionFailed();
+ void StreamIdle();
+ void StreamStreaming();
+ void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds );
+ void InactivityTimeout();
- public: // From MMusEngSessionDurationTimerObserver
-
- void UpdateTimerEvent();
+
+ // From MMusEngOutSessionObserver
+
+ void SessionRejected();
+ void SessionBadRequest(); // 400
+ void SessionUnauthorized(); // 401
+ void SessionPaymentRequired(); // 402
+ void SessionRecipientNotFound(); // 404
+ void SessionProxyAuthenticationRequired(); // 407
+ void SessionRequestTimeOut(); // 408
+ void SessionUnsupportedMediaType(); // 415
+ void SessionBusyHere(); // 486
+ void SessionRequestCancelled(); // 487
+ void SessionTemporarilyNotAvailable(); // 480
+
+ // From MMusEngLiveSessionObserver
- public: // From MMusEngAudioRoutingObserver
+ void DiskFull();
+ void OrientationRefreshEnded();
+
+ // From MMusEngClipSessionObserver
+
+ void EndOfClip();
- void AudioRoutingChanged();
+ void TranscodingNeeded(TBool aDueUnknowCapas);
+
+ void TranscodingProgressed( TInt aPercentage );
+
+ void TranscodingCompletedInit();
+
+ void TranscodingCompletedFinalize();
+
+ void TranscodingFailed();
- public: // From MMusSipProfileUser
-
- TBool IsRoamingBetweenAPsAllowed();
- void ProfileRegistered();
+ void RewindFromEndL();
+
+
+ // From MMusEngReceiveSessionObserver
+
+ void IncomingSessionPreNotification();
+
+ void IncomingSession( const TDesC& aOriginator,
+ const TDesC& aOriginatorIdentity );
+
+ void StreamBuffering();
+
+
+ // From MMusEngAudioRoutingObserver
+
+ void AudioRoutingChanged( TBool aShowNote );
+
+ TBool AudioRouteChangeAllowed() const;
+
+ // From MMusEngVolumeChangeObserver
+ void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged );
public: // Helper
@@ -106,238 +170,50 @@
public: // Data
TBool iUpdateTimerEventCalled;
- TBool iAudioRoutingChangedCalled;
- TBool iRoamingBetweenAPsAllowed;
- TBool iProfileRegisteredCalled;
- };
-
-class TMusEngDisplayHandlerStub : public MMusEngDisplayHandler
- {
-public:
-
- TMusEngDisplayHandlerStub();
-
- void Reset();
-
-public: // From MMusEngDisplayHandler
-
- TRect Rect() const;
-
- void SetRectL( const TRect& aRect );
-
- void SetSecondaryRectL( const TRect& aSecondaryRect );
-
- TRect SecondaryRect() const;
-
- void EnableDisplayL( TBool aEnable );
-
- TBool IsDisplayEnabled();
-
- TDisplayOrientation OrientationL();
-
- void SetOrientationL( TDisplayOrientation aOrientation );
-
- TBool IsDisplayActive();
-
-public:
-
- TRect iRect;
- TRect iSecondaryRect;
- TBool iIsEnabled;
- TDisplayOrientation iOrientation;
- TBool iIsActive;
- };
-
-class CLcSessionObserverStub : public CBase, public MLcSessionObserver
- {
- public: // Constructors and destructor
-
- CLcSessionObserverStub();
- ~CLcSessionObserverStub();
- public: // From MLcSessionObserver
-
- void StateChanged( MLcSession& aSession );
-
- void StateChanged( MLcVideoPlayer& aPlayer );
-
- void Updated( MLcSession& aSession );
-
- void Updated( MLcVideoPlayer& aPlayer );
-
- void Failed(
- MLcSession& aSession,
- TInt aError );
-
- void Failed(
- MLcVideoPlayer& aPlayer,
- TInt aError );
-
- void SessionTimeChanged(
- MLcSession& aSession,
- const TTimeIntervalSeconds& aSeconds );
-
- public: // New functions
-
- void Reset();
- TBool IsReseted();
-
- public: // Data
-
- enum TCalledFunction
- {
- EUnknown,
- ESessionStateChanged,
- EPlayerStateChanged,
- ESessionUpdated,
- EPlayerUpdated,
- ESessionFailed,
- EPlayerFailed,
- ESessionTimeChanged
- };
-
- TInt iCalledFunction;
- MLcSession* iCurrentSession;
- MLcVideoPlayer* iCurrentPlayer;
- TInt iSessionTime;
- TInt iError;
- };
-
-
-class CLcUiProviderStub : public CBase, public MLcUiProvider
- {
- public: // Constructors and destructor
-
- CLcUiProviderStub();
- ~CLcUiProviderStub();
-
- public: // From MLcUiProvider
-
- TBool SelectRecipient(
- MDesCArray& aRecipientAddresses,
- TDes& aSelectedRecipientAddress );
-
- TBool InputRecipient( TDes& aRecipientAddress );
-
- void HandleForegroundStatus( TBool aForeground );
+ TBool iSessionEstablishedCalled;
+ TBool iSessionTerminatedCalled;
+ TBool iSessionConnectionLostCalled;
+ TBool iSessionFailedCalled;
+ TBool iStreamIdleCalled;
+ TBool iStreamStreamingCalled;
+ TBool iSessionTimeChangedCalled;
+ TBool iInactivityTimeoutCalled;
- void BlockUi( TBool aBlocked );
-
- public: // New functions
-
- void Reset();
-
- public: // Data
-
- enum TCalledFunction
- {
- EUnknown,
- ESelectRecipient,
- EInputRecipient,
- EHandleForegroundStatus
- };
-
- TInt iForeground;
- TInt iCalledFunction;
- TPtrC iRecipient;
- TBool iSimulatedReturnValue;
- };
-
-
-class TLcWindowStub : public MLcWindow
- {
- public: // Constructor
- TLcWindowStub();
-
- public: // From MLcWindow
- void EnableLcWindowL( TBool aEnable );
- TBool IsLcWindowEnabled();
- void SetLcWindowRectL( TRect aRect );
- TRect LcWindowRect();
- void SetLcWindowOrientationL( TLcWindowOrientation aOrientation );
- TLcWindowOrientation LcWindowOrientationL();
-
- public: // New functions
-
- void Reset();
+ TBool iSessionRejectedCalled;
+ TBool iSessionBadRequestCalled;
+ TBool iSessionUnauthorizedCalled;
+ TBool iSessionPaymentRequiredCalled;
+ TBool iSessionRecipientNotFoundCalled;
+ TBool iSessionProxyAuthenticationRequiredCalled;
+ TBool iSessionRequestTimeOutCalled;
+ TBool iSessionUnsupportedMediaTypeCalled;
+ TBool iSessionBusyHereCalled;
+ TBool iSessionRequestCancelledCalled;
+ TBool iDiskFullCalled;
+
+ TBool iEndOfClipCalled;
+ TBool iRewindFromEnd;
+ TBool iTranscodingNeededCalled;
+ TBool iTranscodingCompletedInitCalled;
+ TBool iTranscodingCompletedFinalizeCalled;
+ TBool iTranscodingFailedCalled;
+
+ TBool iIncomingSessionPreNotificationCalled;
+ TBool iIncomingSessionCalled;
+ TBool iStreamBufferingCalled;
- private: // Data
- TBool iEnabled;
- TRect iRect;
- TLcWindowOrientation iOrientation;
- };
-
-
-class TLcAudioControlStub : public MLcAudioControl
- {
- public: // Constructor
- TLcAudioControlStub();
-
- public:
- TBool IsLcAudioMutedL();
- void MuteLcAudioL( TBool aMute );
- TBool IsLcMicMutedL();
- void MuteLcMicL( TBool aMute );
- TBool IsEnablingLcLoudspeakerAllowed();
- void EnableLcLoudspeakerL( TBool aEnabled );
- TBool IsLcLoudspeakerEnabled();
- TInt LcVolumeL();
- void SetLcVolumeL( TInt aValue );
- void IncreaseLcVolumeL();
- void DecreaseLcVolumeL();
-
- public: // New functions
+ TBool iAudioRoutingChangedCalled;
+ TBool iShowNote;
+ TBool iAudioRouteChangeAllowed;
- void Reset();
+ TInt iTranscodingProgressedPercentage;
+ TBool iSessionTemporarilyNotAvailable;
+ HBufC* iIncomingSessionOriginator;
- private: // Data
- TBool iAudioMuted;
- TBool iMicMuted;
- TBool iEnablingLoudspeakerAllowed;
- TBool iLoudspeakerEnabled;
TInt iVolume;
- };
-
-class TMusPropertyObserverStub : public MMusPropertyObserver
- {
- public:
-
- enum TMusPropertyObserverFunction
- {
- ENone, // default value
- EPropertyChanged,
- EHandlePropertyError
- };
-
-
- TMusPropertyObserverStub()
- {
- iCalledFunction = ENone;
- iKey = 0;
- iValue = 0;
- iReason = 0;
- }
-
- void PropertyChanged( const TUint aKey, const TInt aValue )
- {
- iCalledFunction = EPropertyChanged;
- iKey = aKey;
- iValue = aValue;
- }
-
-
- void HandlePropertyError( const TInt aReason )
- {
- iCalledFunction = EHandlePropertyError;
- iReason = aReason;
- }
-
- public: // data
-
- TMusPropertyObserverFunction iCalledFunction;
- TInt iKey;
- TInt iValue;
- TInt iReason;
+ TBool iDueUnknowCapas;
+ TBool iOrientationRefreshEndedCalled;
};