--- a/tsrc/musenginestub/inc/musengmcesession.h Thu Aug 19 09:51:39 2010 +0300
+++ b/tsrc/musenginestub/inc/musengmcesession.h Tue Aug 31 15:12:07 2010 +0300
@@ -21,28 +21,10 @@
// USER
#include "musengsession.h"
-#include "musengsessiondurationtimerobserver.h"
-
-// SYSTEM
-/*
-#include <mcesessionobserver.h>
-#include <mcestreamobserver.h>
-#include <mcertpobserver.h>
-#include <mcetransactiondatacontainer.h>
-*/
+#include "lcsession.h"
+#include "lcwindow.h"
+#include "lcaudiocontrol.h"
-/*
-class CMceManager;
-class CMceSession;
-*/
-class CMusEngSessionDurationTimer;
-
-
-// CONSTANTS
-
-_LIT8( KMusEngAcceptContactHeader,
- "Accept-Contact: *;+g.3gpp.cs-voice; explicit" );
-_LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs" );
// CLASS DECLARATION
@@ -52,252 +34,112 @@
*
* CMusEngMceSession encapsulates CMCESession and simplifies use of
* MCE Sessions to user interface. Also splits observers messy events
-* simplified commands like a SessionDisconnected.
+* to simplified function calls.
*
* @lib musengine.lib
-* @since S60 v3.2
*/
class CMusEngMceSession : public CMusEngSession,
- public MMusEngSessionDurationTimerObserver
+ public MLcSession,
+ public MLcWindow,
+ public MLcAudioControl
{
-
- public:
-
+
+ public:
+
/**
* Destructor
- *
- * @since S60 v3.2
*/
~CMusEngMceSession();
- public: // API FUNCTIONS
-
- /**
- * Terminates session.
- * @pre Session is established
- * @post Session is ready to be deleted
- * @leave KErrNotReady if precondition is not fullfilled
- * @since S60 v3.2
- */
- IMPORT_C void TerminateL();
-
- /**
- * Releases all this session internal observers. This function is needed
- * before we could get session store out of this session.
- * TODO: Is this function really needed? At least at the moment it is
- * not called from UI. -HR 21.8.
- *
- * @since S60 v3.2
- */
- IMPORT_C void ReleaseInternalObservers();
+ public: // from MLcSession
+
+ TLcSessionState LcSessionState() const;
+
+ virtual void EstablishLcSessionL();
+
+ void TerminateLcSessionL();
+
+ virtual MLcVideoPlayer* RemoteVideoPlayer();
+
+ virtual MLcVideoPlayer* LocalVideoPlayer();
+
+ virtual const TDesC& LocalDisplayName();
+
+ virtual const TDesC& RemoteDisplayName();
- /**
- * Get session time return estabilished session time
- *
- * @since S60 v3.2
- * @return TTime returns time if connection established else < 0
- */
- IMPORT_C TTimeIntervalSeconds GetSessionTime() const;
+ TInt SetParameter( TInt aId, TInt aValue );
- /**
- * Returns current connection state
- *
- * @since S60 v3.2
- * @return TBool returns current connection state
- */
- IMPORT_C TBool ConnectionActive() const;
-
-
- public: // VIRTUAL API
-
- // No virtual api
-
+ TInt ParameterValue( TInt aId );
+
+ void UpdateLcSessionL();
- public: // from CMusEngSession
-
- /**
- * Increases volume level by one
- *
- * @pre Session is ongoing
- * @since S60 v3.2
- */
- IMPORT_C void VolumeUpL();
-
- /**
- * Decreases volume level by one
- *
- * @pre Session is ongoing
- * @since S60 v3.2
- */
- IMPORT_C void VolumeDownL();
+
+ public: // from MLcWindow
+
+ void EnableLcWindowL( TBool aEnable );
+
+ TBool IsLcWindowEnabled();
+
+ void SetLcWindowRectL( TRect aRect );
+
+ TRect LcWindowRect();
+
+ void SetLcWindowOrientationL(
+ TLcWindowOrientation aOrientation );
+
+ TLcWindowOrientation LcWindowOrientationL();
+
+ public: // from MLcAudioControl
+
+ TBool IsLcAudioMutedL();
- /**
- * Permission to draw on screen device.
- *
- * @pre Session is ongoing
- * @since S60 v3.2
- */
- IMPORT_C void EnableDisplayL( TBool aEnable );
+ void MuteLcAudioL( TBool aMute );
+
+ TBool IsLcMicMutedL();
+
+ void MuteLcMicL( TBool aMute );
+
+ TBool IsLcLoudspeakerEnabled();
- /**
- * Implements virtual from CMusEngSession
- *
- * @pre Session is ongoing
- * @since S60 v3.2
- */
- IMPORT_C void MuteL();
-
- /**
- * Implements virtual from CMusEngSession
- *
- * @pre Session is ongoing
- * @since S60 v3.2
- */
- IMPORT_C void UnmuteL();
-
-
+ void EnableLcLoudspeakerL( TBool aEnabled );
+
+ TBool IsEnablingLcLoudspeakerAllowed();
+
+ TInt LcVolumeL();
+
+ void SetLcVolumeL( TInt aValue );
+
+ void IncreaseLcVolumeL();
+
+ void DecreaseLcVolumeL();
+
protected: // CONSTRUCTORS
/**
* Constructor
*
- * @since S60 v3.2
*/
CMusEngMceSession( const TRect& aRect );
/**
* Second-phase constructor
*
- * @since S60 v3.2
*/
void ConstructL();
-
-
- protected: // HELPER FUNCTIONS
-
- /**
- *
- * @since S60 v3.2
- */
- void RectChangedL();
-
- /**
- * Sets session specific SDP line to a session
- *
- * @since S60 v3.2
- */
- //void SetSessionSdpLinesL( CMceSession& aSession );
-
-
- protected: // internal API
-
- /**
- *
- * @since S60 v3.2
- */
- virtual TBool IsRtpcInactivityTimoutSupported();
-
-
- private: // HELPER FUNCTIONS
+
- /**
- * Start counting session time
- *
- * @since S60 v3.2
- */
- void InitializeSessionTimer();
-
- /**
- * Callback
- *
- * @since S60 v3.2
- */
- void UpdateTimerEvent();
-
- /**
- *
- *
- * @since S60 v3.2
- */
- void DoMuteL( TBool aMute );
-
- /**
- * Increases or decreases current volume of all speakers in session
- * structure by one.
- * @pre Current volume of all the speakers is less than MaxVolumeL()
- * and at least 1.
- */
- void ChangeVolumeByOneL( TBool aIncreaseVolume );
-
-
- private: // Helpers
+ private:
- /**
- * Helper function to avoid three different traps.
- * Should be replaced when MCE supports different kind of method
- * detecting end of clip.
- *
- * @since S60 v3.2
- */
- void CheckClipEndL();
-
-
- public: // MEMBERS
-
- /**
- * Class for connecting to MCE server.
- * This class provides the connection to the MCE server and
- * provides functions
- * for setting observers for asynchronous events.
- * The user should create only one instance of this class.
- *
- * @since S60 v3.2
- */
- //CMceManager* iManager;
-
- /**
- * Base class for MCE sessions, inherited by both CMCEInSession and
- * CMCEOutSession. * CMCESession represents peer-to-peer connection
- * made with remote terminal. This connection is also known as dialog
- * and it is set up using SIP INVITE method. The characteristics of the
- * session are defined by user of this class by attaching media streams
- * into the session. After the session has been succesfully established,
- * it can be later updated and must be finally terminated. If for any
- * reason instance of this class is deleted while in established state,
- * session is automatically terminated by MCE server.
- *
- * @since S60 v3.2
- */
- //CMceSession* iSession;
-
-
- public:
-
- /**
- * It is assumed, that user has only one instance of this class.
- * The same instance is passed between MCE and user, but the data
- * inside of this container is just updated for each event.
- *
- * @since S60 v3.2
- */
- //TMceTransactionDataContainer iTransactionDataContainer;
-
- /**
- * Session time. Acts simultaneously as RTCP inactivity timer.
- *
- * @since S60 v3.2
- */
- TTime iStartTime;
-
- CMusEngSessionDurationTimer* iUpdateTimer;
-
- /**
- * Value indicating seconds gone since last received RTCP sender or
- * receiver report. Value 20 indicates RTCP inactivity timeout.
- */
- TInt iSecondsFromLastRtcpReport;
- TInt iDisplayEnabled;
+ MLcWindow::TLcWindowOrientation iOrientation;
+ TBool iMuted;
+ TBool iMicMuted;
+ TBool iLoudspeakerEnabled;
+ TBool iEnablingLoudspeakerAllowed;
+ TInt iVolume;
+ TRect iRect;
+ TBool iWindowEnabled;
};
+
#endif //MUSHENGMCESESSION_H