mmsharing/mmshengine/inc/musengmcesession.h
branchRCL_3
changeset 22 73a1feb507fb
parent 16 ce86b6d44a6d
child 23 bc78a40cd63c
equal deleted inserted replaced
21:33a5d2bbf6fc 22:73a1feb507fb
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #ifndef MUSHENGMCESESSION_H
    19 #ifndef MUSENGMCESESSION_H
    20 #define MUSHENGMCESESSION_H
    20 #define MUSENGMCESESSION_H
    21 
    21 
    22 // USER
    22 // USER
    23 #include "musengsession.h"
       
    24 #include "musengsessiondurationtimerobserver.h"
    23 #include "musengsessiondurationtimerobserver.h"
    25 #include "musunittesting.h"
    24 #include "musunittesting.h"
    26 #include "mussipprofileuser.h"
    25 #include "mussipprofileuser.h"
       
    26 #include "musengdisplayhandler.h"
       
    27 #include "musengaudioroutingobserver.h"
    27 
    28 
    28 // SYSTEM
    29 // SYSTEM
       
    30 #include <lcsession.h>
       
    31 #include <lcaudiocontrol.h>
    29 #include <mcesessionobserver.h>
    32 #include <mcesessionobserver.h>
    30 #include <mceinsessionobserver.h>
    33 #include <mceinsessionobserver.h>
    31 #include <mcestreamobserver.h>
    34 #include <mcestreamobserver.h>
    32 #include <mcertpobserver.h>
    35 #include <mcertpobserver.h>
    33 #include <mcetransactiondatacontainer.h>
    36 #include <mcetransactiondatacontainer.h>
    34 
    37 #include <mcemediasource.h>
       
    38 
       
    39 // FORWARD DECLARATIONS
    35 class CMceManager;
    40 class CMceManager;
    36 class CMceSession;
    41 class CMceSession;
    37 class CMceVideoStream;
    42 class CMceVideoStream;
    38 class CMceAudioStream;
    43 class CMceAudioStream;
    39 class CMceVideoCodec;
    44 class CMceVideoCodec;
    40 class CMceAudioCodec;
    45 class CMceAudioCodec;
    41 class CMusEngSessionDurationTimer;
    46 class CMusEngSessionDurationTimer;
    42 class MMusEngSessionObserver;
       
    43 class CMusSipProfileHandler;
    47 class CMusSipProfileHandler;
       
    48 class CMusEngTelephoneUtils;
       
    49 class MMusEngAudioRoutingObserver;
       
    50 class MLcSessionObserver;
    44 
    51 
    45 // CONSTANTS
    52 // CONSTANTS
    46 
    53 
    47 _LIT8( KMusEngAcceptContactHeader, 
    54 _LIT8( KMusEngAcceptContactHeader, 
    48        "Accept-Contact: *;+g.3gpp.cs-voice; explicit" );
    55        "Accept-Contact: *;+g.3gpp.cs-voice; explicit" );
    49 _LIT8( KMusAcceptHeader, 
    56 _LIT8( KMusAcceptHeader, 
    50        "Accept: application/sdp" );
    57        "Accept: application/sdp" );
    51 _LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs\r\n" );
    58 _LIT8( KMusEngSessionSdpLineXApplication, "a=X-application:com.nokia.rtvs\r\n" );
    52 _LIT8( KMusEngSessionSdpLineApplication , "a=application:com.gsma.rts\r\n" );
    59 _LIT8( KMusEngSessionSdpLineApplication , "a=application:com.gsma.rts\r\n" );
    53 _LIT8( KMusEngSessionSdpLineType, "a=type:videolive\r\n" );
    60 _LIT8( KMusEngSessionSdpLineType, "a=type:videolive\r\n" );
    54 _LIT8( KMusEngSessionSdpLineBandwidthLine  , "b=AS" );
    61 _LIT8( KMusEngSessionSdpLineBandwidthLine  , "b=AS:" );
    55 _LIT8( KMusEngSessionSdpLineBandwidthField  , "b=AS:85\r\n" );
    62 _LIT8( KMusEngSessionSdpLineBandwidthField  , "b=AS:85\r\n" );
       
    63 _LIT8( KMusEngSessionSdpLineTiasLine  , "b=TIAS:" );
    56 _LIT8( KMusPPreferredIdentity, "P-Preferred-Identity" );
    64 _LIT8( KMusPPreferredIdentity, "P-Preferred-Identity" );
    57 _LIT8( KMusPrivacyHeader, "Privacy" );
    65 _LIT8( KMusEngNewLine  , "\r\n" );
    58 _LIT8( KMusAnonymousHeader, "\"Anonymous\" <sip:anonymous@anonymous.invalid>" );
    66 
    59 
    67 const TInt KMusTiasMultiplier = 1000;
    60 const TInt KMusEngMaxVolume = 10;
    68 const TUint8 KMusEngRtpKeepAliveTimer = 5;
    61 const TInt KMusEngMinVolume = 0;
    69 const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96;
       
    70 const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97;
       
    71 const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98;
       
    72 
       
    73 // Value for uninitialized rect
       
    74 const TInt KMusEngRectNotInit = 1000;
    62 
    75 
    63 // CLASS DECLARATION
    76 // CLASS DECLARATION
    64 
    77 
    65 /**
    78 /**
    66 * Base class for Multimedia Sharing Engine MCE sessions, inherited by
    79 * Base class for Multimedia Sharing Engine MCE sessions, inherited by
    70 * MCE Sessions to user interface. Also splits observers messy events
    83 * MCE Sessions to user interface. Also splits observers messy events
    71 * to simplified function calls.
    84 * to simplified function calls.
    72 *
    85 *
    73 * @lib musengine.lib
    86 * @lib musengine.lib
    74 */
    87 */
    75 class CMusEngMceSession : public CMusEngSession,
    88 class CMusEngMceSession : public CBase,
       
    89                           public MLcSession,
       
    90                           public MLcAudioControl,
    76                           public MMceSessionObserver,
    91                           public MMceSessionObserver,
    77                           public MMceInSessionObserver,
    92                           public MMceInSessionObserver,
    78                           public MMceStreamObserver,
    93                           public MMceStreamObserver,
    79                           public MMceRtpObserver,
    94                           public MMceRtpObserver,
    80                           public MMusEngSessionDurationTimerObserver,
    95                           public MMusEngSessionDurationTimerObserver,
    81                           public MMusSipProfileUser
    96                           public MMusSipProfileUser,
       
    97                           public MMusEngDisplayHandler,
       
    98                           public MMusEngAudioRoutingObserver
    82     {
    99     {
    83     
       
    84     public: 
       
    85     
       
    86         /*
       
    87         * Defines possible rotations 
       
    88         */
       
    89         enum TDisplayOrientation
       
    90             {
       
    91             EPortrait, // Normal
       
    92             ELandscape // 90 degree's clockwise rotation
       
    93             };
       
    94         
       
    95     public:
   100     public:
    96 
   101 
    97         /**
   102         /**
    98         * Destructor
   103         * Destructor
    99         */
   104         */
   100         ~CMusEngMceSession();
   105         ~CMusEngMceSession();
   101 
   106 
   102 
   107         
   103     public: // API FUNCTIONS
   108     public: //  from MMusEngDisplayHandler
   104 
   109 
   105         /**
   110         /**
   106         * Terminates session. 
   111         * Returns currently assigned drawing area
   107         *
   112         *
   108         * @pre Session is established
   113         * @return TRect This session drawing area rectangle
   109         * @post Session is ready to be deleted
   114         */
   110         * @leave KErrNotReady if precondition is not fullfilled
   115         TRect Rect() const;
   111         */
   116         
   112         IMPORT_C void TerminateL();
   117         /**
   113 
   118         * Sets new drawing area
   114         /**
   119         *
   115         * Get session time return estabilished session time
   120         * @param TRect This session new drawing area rectangle
   116         *
   121         */
   117         * @return TTime returns time if connection established else < 0
   122         void SetRectL( const TRect& aRect );
   118         */
   123         
   119         IMPORT_C TTimeIntervalSeconds GetSessionTime() const;
   124         /**
   120 
   125         * Sets secondary rect (e.g. viewfinder in twoway session)
   121         /**
   126         * @param TRect This session new secondary drawing area rectangle
   122         * Returns current connection state
   127         */
   123         *
   128         void SetSecondaryRectL( const TRect& aSecondaryRect );
   124         * @return TBool returns current connection state
   129         
   125         */
   130         /**
   126         IMPORT_C TBool ConnectionActive() const;
   131         * Gets secondary rect.
   127 
   132         * @return TRect This session secondary drawing area rectangle
   128         /**
   133         */
   129         * Returns presence or absence of audio in session.
   134         virtual TRect SecondaryRect() const;
   130         *
   135             
   131         * @pre Session is ongoing
       
   132         * @return ETrue if session contains audio.
       
   133         * @leave KErrNotReady if precondition is not fullfilled
       
   134         */
       
   135         IMPORT_C TBool ContainsAudioL();
       
   136         
       
   137         /**
       
   138         * Returns state of local playback meaning if playback is muted or not.
       
   139         *
       
   140         * @pre Session is ongoing
       
   141         * @return ETrue if session does not contain audio or contained 
       
   142         *         audio is muted.
       
   143         * @leave KErrNotReady if precondition is not fullfilled
       
   144         */
       
   145         IMPORT_C TBool IsMutedL();
       
   146 
       
   147         /**
   136         /**
   148         * Returns current display orientation.
   137         * Returns current display orientation.
   149         *
   138         *
   150         * @pre Session is ongoing
   139         * @pre Session is ongoing
   151         * @return Current display orientation 
   140         * @return Current display orientation 
   152         * @leave KErrNotReady if precondition is not fullfilled
   141         * @leave KErrNotReady if precondition is not fullfilled
   153         */
   142         */
   154         IMPORT_C TDisplayOrientation OrientationL();
   143         TDisplayOrientation OrientationL();
   155         
   144         
   156         /**
   145         /**
   157         * Sets display orientation.
   146         * Sets display orientation.
   158         *
   147         *
   159         * @pre Session is ongoing
   148         * @pre Session is ongoing
   160         * @return Sets display orientation 
   149         * @return Sets display orientation 
   161         * @leave KErrNotReady if precondition is not fullfilled
   150         * @leave KErrNotReady if precondition is not fullfilled
   162         */
   151         */
   163         IMPORT_C void SetOrientationL( TDisplayOrientation aOrientation );
   152         void SetOrientationL( TDisplayOrientation aOrientation );
   164         
       
   165         /**
       
   166         * Returns state of the screen device.
       
   167         * 
       
   168         * @pre Session is ongoing
       
   169         */
       
   170         IMPORT_C TBool IsDisplayEnabledL();
       
   171 
       
   172     public: // VIRTUAL API
       
   173 
       
   174         // No virtual api
       
   175 
       
   176 
       
   177     public: //  from CMusEngSession  
       
   178 
       
   179         /**
       
   180         * Increases volume level by one
       
   181         *
       
   182         * @pre Session is ongoing
       
   183         */
       
   184         IMPORT_C void VolumeUpL();
       
   185 
       
   186         /**
       
   187         * Decreases volume level by one
       
   188         *
       
   189         * @pre Session is ongoing
       
   190         */
       
   191         IMPORT_C void VolumeDownL();
       
   192         
       
   193         /**
       
   194         * Set volume value
       
   195         * @pre Session is ongoing
       
   196         * @param aVal the value of volume 
       
   197         */
       
   198         IMPORT_C void SetVolumeL( TInt aVal );
       
   199 
   153 
   200         /**
   154         /**
   201         * Permission to draw on screen device.
   155         * Permission to draw on screen device.
   202         * 
   156         * 
   203         * @pre Session is ongoing
   157         * @pre Session is ongoing
   204         */
   158         */
   205         IMPORT_C void EnableDisplayL( TBool aEnable );
   159         void EnableDisplayL( TBool aEnable );
   206 
   160         
   207         /**
   161         /**
   208         * Implements virtual from CMusEngSession
   162         * Implements virtual from MMusEngDisplayHandler
   209         *
   163         *
   210         * @pre Session is ongoing
   164         * @pre Session is ongoing
   211         */
   165         */
   212         IMPORT_C void MuteL();
   166         TBool IsDisplayEnabled();
   213 
   167         
   214         /**
   168         /**
   215         * Implements virtual from CMusEngSession
   169         * Implements virtual from MMusEngDisplayHandler
   216         *
   170         *
   217         * @pre Session is ongoing
   171         * @pre Session is ongoing
   218         */
   172         */
   219         IMPORT_C void UnmuteL();
   173         TBool IsDisplayActive();
   220         
   174 
   221         void RefreshOrientationL();
   175         
   222         
   176     public: // From MMusEngAudioRoutingObserver
   223 
   177         
       
   178         void AudioRoutingChanged();        
       
   179         
       
   180         
       
   181     public: // From MLcSession
       
   182         
       
   183         virtual TLcSessionState LcSessionState() const;
       
   184         
       
   185         void SetLcSessionObserver( MLcSessionObserver* aObserver );
       
   186 
       
   187         void SetLcUiProvider( MLcUiProvider* aUiProvider );        
       
   188         
       
   189         virtual MLcVideoPlayer* RemoteVideoPlayer();
       
   190     
       
   191         virtual MLcVideoPlayer* LocalVideoPlayer();       
       
   192        
       
   193         virtual const TDesC& LocalDisplayName();
       
   194     
       
   195         virtual const TDesC& RemoteDisplayName();
       
   196 
       
   197         TInt SetParameter( TInt aId, TInt aValue );
       
   198 
       
   199         TInt ParameterValue( TInt aId );    
       
   200         
       
   201         TBool IsBackgroundStartup();
       
   202         
       
   203         TInt SetForegroundStatus( TBool aIsForeground );
       
   204         
       
   205         const TDesC& RemoteDetails();
       
   206         
       
   207         void UpdateLcSessionL();
       
   208         
       
   209         TBool SendDialTone( TChar aKey);
       
   210         
       
   211         
       
   212     public: // From MLcAudioControl
       
   213         
       
   214         TBool IsLcAudioMutedL();
       
   215 
       
   216         void MuteLcAudioL( TBool aMute );       
       
   217 
       
   218         TBool IsLcMicMutedL();    
       
   219 
       
   220         void MuteLcMicL( TBool aMute );
       
   221         
       
   222         TBool IsEnablingLcLoudspeakerAllowed();
       
   223 
       
   224         void EnableLcLoudspeakerL( TBool aEnabled );
       
   225         
       
   226         TBool IsLcLoudspeakerEnabled();
       
   227 
       
   228         TInt LcVolumeL();
       
   229      
       
   230         void SetLcVolumeL( TInt aValue );    
       
   231     
       
   232         void IncreaseLcVolumeL();
       
   233         
       
   234         void DecreaseLcVolumeL();        
       
   235 
       
   236     public:
       
   237         
       
   238         MLcSessionObserver* LcSessionObserver();
       
   239         
       
   240         MLcUiProvider* LcUiProvider();
       
   241         
   224     protected: // CONSTRUCTORS
   242     protected: // CONSTRUCTORS
   225 
   243 
   226         /**
   244         /**
   227         * Constructor
   245         * Constructor
   228         *
   246         *
   229         */
   247         */
   230         CMusEngMceSession( const TRect& aRect,
   248         CMusEngMceSession();
   231                            MMusEngSessionObserver& aSessionObserver );
       
   232 
   249 
   233         /**
   250         /**
   234         * Second-phase constructor
   251         * Second-phase constructor
   235         *
       
   236         */
   252         */
   237         void ConstructL();
   253         void ConstructL();
   238         
   254         
   239 
   255 
   240     protected: // VIRTUAL HELPER FUNCTIONS
   256     protected: // VIRTUAL HELPER FUNCTIONS
   256         /**
   272         /**
   257         * Sets Multimediasharing specific video codec settings. This functions 
   273         * Sets Multimediasharing specific video codec settings. This functions 
   258         * gets called for every video codec in session. To be overridden in 
   274         * gets called for every video codec in session. To be overridden in 
   259         * sibling classes if needed.
   275         * sibling classes if needed.
   260         */ 
   276         */ 
   261         virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec );
   277         virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec,
       
   278                                         TMceSourceType aSourceType );
   262         
   279         
   263         /**
   280         /**
   264         * Sets Multimediasharing specific audio codec settings like audio MMF 
   281         * Sets Multimediasharing specific audio codec settings like audio MMF 
   265         * priority and preference. This functions gets called for every audio 
   282         * priority and preference. This functions gets called for every audio 
   266         * codec in session. To be overridden in sibling classes if needed.
   283         * codec in session. To be overridden in sibling classes if needed.
   272         * Additionally selects just the one with best quality from selected mode.
   289         * Additionally selects just the one with best quality from selected mode.
   273         * @param aVideoStream
   290         * @param aVideoStream
   274         */
   291         */
   275         virtual void DoCodecSelectionL( CMceVideoStream& aVideoStream );
   292         virtual void DoCodecSelectionL( CMceVideoStream& aVideoStream );
   276         
   293         
       
   294         virtual void RectChangedL();
   277         
   295         
   278     protected: // HELPER FUNCTIONS
   296     protected: // HELPER FUNCTIONS
   279 
   297 
   280         /**
   298         void InformObserverAboutSessionStateChange();
   281         *
   299         
   282         */
   300         void InformObserverAboutSessionUpdate();
   283         void RectChangedL();
   301         
       
   302         void InformObserverAboutSessionFailure( TInt aReason );
       
   303         
       
   304         void InformObserverAboutPlayerStateChange( MLcVideoPlayer* aPlayer );
       
   305         
       
   306         void InformObserverAboutPlayerUpdate( MLcVideoPlayer* aPlayer );
       
   307         
       
   308         void InformObserverAboutPlayerFailure( 
       
   309             MLcVideoPlayer* aPlayer, 
       
   310             TInt aReason );
       
   311         
       
   312         void InformUiProviderAboutReceivingStart();
       
   313         
       
   314         MLcUiProvider& LcUiProviderL();
   284   
   315   
   285         /**
   316         /**
   286         * Sets session specific SDP lines to a session.
   317         * Sets session specific SDP lines to a session.
   287         */
   318         */
   288         void SetSessionSdpLinesL( CMceSession& aSession, 
   319         void SetSessionSdpLinesL( CMceSession& aSession, 
   321         * Calls CMceInSession::RejectL() inside TRAP_IGNORE
   352         * Calls CMceInSession::RejectL() inside TRAP_IGNORE
   322         */
   353         */
   323         void Reject( CMceInSession& aSession,
   354         void Reject( CMceInSession& aSession,
   324                      const TDesC8& aReason = KNullDesC8(),
   355                      const TDesC8& aReason = KNullDesC8(),
   325                      TUint32 aCode = 0 );
   356                      TUint32 aCode = 0 );
   326 
   357         
   327     protected:  // from CMusEngSession
   358         void SaveContactL( const TDesC8& aAddress );
   328 	
   359             
   329         /**
       
   330         *
       
   331         */
       
   332         void VolumeChanged( TInt aVolume, TBool aAudioRouteChanged );
       
   333              
       
   334     
       
   335     protected: // from MMceInSessionObserver
   360     protected: // from MMceInSessionObserver
   336     
   361     
   337         /**
   362         /**
   338         * Incoming session invitation. The CMceInSession is given to the
   363         * Incoming session invitation. The CMceInSession is given to the
   339         * application as a callback. This default implementation rejects
   364         * application as a callback. This default implementation rejects
   483         * @param aSsrc removed SSRC identifier
   508         * @param aSsrc removed SSRC identifier
   484         */	
   509         */	
   485         void SsrcRemoved( CMceMediaStream& aStream,
   510         void SsrcRemoved( CMceMediaStream& aStream,
   486                           CMceRtpSource& aSource,
   511                           CMceRtpSource& aSource,
   487                           TUint aSsrc );       
   512                           TUint aSsrc );       
   488                           
   513     
   489 	private: // from MMusSipProfileUser
   514         
   490         
   515     private: // from MMusSipProfileUser
   491         TBool IsRoamingBetweenAPsAllowed();
   516         
   492       			
   517         virtual TBool IsRoamingBetweenAPsAllowed();
       
   518         
       
   519         virtual void ProfileRegistered();
       
   520         
       
   521         
   493     private: // HELPER FUNCTIONS
   522     private: // HELPER FUNCTIONS
       
   523 
       
   524         /**
       
   525         * Adds b=AS and b=TIAS lines to the array
       
   526         */
       
   527         void AddSdpBandwidthAttributesL( CDesC8Array& aSdpLinesArray,
       
   528                                          TInt aBandwidthAs );
       
   529 
       
   530         /**
       
   531         * Checks whether AS or TIAS bandwidth attributes present in the array 
       
   532         */
       
   533         TBool IsBandwidthAttributeSet( MDesC8Array* aSdpLinesArray );
       
   534 
   494 
   535 
   495         /**
   536         /**
   496         * Callback
   537         * Callback
   497         */
   538         */
   498         void UpdateTimerEvent();
   539         void UpdateTimerEvent();
   516         
   557         
   517         void DoBitrateBasedRemovalL( CMceVideoStream& aVideoStream, 
   558         void DoBitrateBasedRemovalL( CMceVideoStream& aVideoStream, 
   518                                      const CMceVideoCodec& aBestBitrateVideoCodec );
   559                                      const CMceVideoCodec& aBestBitrateVideoCodec );
   519                                      
   560                                      
   520         void DoCodecModeBasedRemovalL( CMceVideoStream& aVideoStream );
   561         void DoCodecModeBasedRemovalL( CMceVideoStream& aVideoStream );
   521         /**
   562   
   522          * This function currently used to remove the AVC codec support based on
   563         /**
   523          * cenrep encoder device uid value.
   564         * Get session time return estabilished session time
       
   565         * @return TTime returns time if connection established else < 0
       
   566         */
       
   567         TTimeIntervalSeconds GetSessionTime() const;        
       
   568         
       
   569     protected:
       
   570         
       
   571         /**
       
   572         * Reads from CenRep and sets encoding device for a codec.
       
   573         */
       
   574         void SetEncodingDeviceL( CMceVideoCodec& aVideoCodec );
       
   575 
       
   576         /**
       
   577         * Sets configuration key for a codec
       
   578         */
       
   579         void SetCodecConfigKeyL( CMceVideoCodec& aVideoCodec );
       
   580     
       
   581         /**
       
   582         * Reads proper configuration key for a codec. NULL if not available.
       
   583         * Ownership is transferred.
       
   584         */
       
   585         HBufC8* ReadCodecConfigKeyL( const CMceVideoCodec& aVideoCodec ) const;
       
   586         
       
   587         /**
       
   588         * Constructs and stores to cenrep a concatenation of all AVC config keys.
       
   589         */
       
   590         void StoreEncoderConfigInfoL() const;
       
   591         
       
   592         /**
       
   593         * Returns config key id for the provided codec. Ownership is transferred
       
   594         */
       
   595         const TPtrC8 ConfigKeyIdL( const CMceVideoCodec& aVideoCodec ) const;
       
   596 
       
   597             
       
   598     protected: // Data
       
   599 
       
   600         /**
       
   601         * Drawing area rect.
       
   602         */
       
   603         TRect iRect;
       
   604 
       
   605         /**
       
   606         * Telephone utilities.
       
   607         */
       
   608         CMusEngTelephoneUtils* iTelephoneUtils;        
       
   609         
       
   610         /**
       
   611          * UID used to identify application, needed to create MCE manager
   524          */
   612          */
   525         void DoCodecConfigurationBasedRemovalL( CMceVideoStream& aVideoStream );
   613         TUid iMceManagerUid;
   526 
       
   527 
       
   528     protected: // MEMBERS
       
   529 
       
   530         /**
       
   531         * Callback reference to session observer interface.
       
   532         */
       
   533         MMusEngSessionObserver& iSessionObserver;
       
   534         
   614         
   535         /**
   615         /**
   536         * Class for connecting to MCE server.
   616         * Class for connecting to MCE server.
   537         * This class provides the connection to the MCE server and
   617         * This class provides the connection to the MCE server and
   538         * provides functions
   618         * provides functions
   557         /**
   637         /**
   558         * ETrue if operator specific behavior is expected
   638         * ETrue if operator specific behavior is expected
   559         */
   639         */
   560         TBool iOperatorVariant;
   640         TBool iOperatorVariant;
   561 
   641 
   562 		/**
   642         /**
   563         * The handler for the SIP profile related to this session
   643         * The handler for the SIP profile related to this session
   564         */
   644         */
   565         CMusSipProfileHandler* iSipProfileHandler;
   645         CMusSipProfileHandler* iSipProfileHandler;
   566 
   646 
   567     private:
   647         /**
   568 
   648         * Session state for MLcSession 
       
   649         */
       
   650         MLcSession::TLcSessionState iLcSessionState;       
       
   651         
       
   652         /**
       
   653         * If true, configuration key of current AVC codec must be written to
       
   654         * CenRep after session establishment.
       
   655         */
       
   656         TBool iStoreEncoderConfigInfo;
       
   657         
       
   658         /**
       
   659         * Remote details 
       
   660         */
       
   661         HBufC* iRemoteDetails;
       
   662         
       
   663     private: // New functions
       
   664         
       
   665         void StreamStreaming( CMceMediaStream& aStream );
       
   666                 
       
   667     private: // Data
       
   668 
       
   669         /**
       
   670         * The session observer, if present.
       
   671         */
       
   672         MLcSessionObserver* iLcSessionObserver;
       
   673 
       
   674         /**
       
   675         * The UI provider, if present.
       
   676         */        
       
   677         MLcUiProvider* iLcUiProvider;        
       
   678         
   569         /**
   679         /**
   570         * It is assumed, that user has only one instance of this class.
   680         * It is assumed, that user has only one instance of this class.
   571         * The same instance is passed between MCE and user, but the data
   681         * The same instance is passed between MCE and user, but the data
   572         * inside of this container is just updated for each event.
   682         * inside of this container is just updated for each event.
   573         */
   683         */
   576         /**
   686         /**
   577         * Session time. Acts simultaneously as RTCP inactivity timer.
   687         * Session time. Acts simultaneously as RTCP inactivity timer.
   578         */
   688         */
   579         TTime iStartTime;
   689         TTime iStartTime;
   580 
   690 
   581         CMusEngSessionDurationTimer*   iUpdateTimer;
   691         CMusEngSessionDurationTimer* iUpdateTimer;
   582         
   692         
   583         /**
   693         /**
   584         * Value indicating seconds gone since last received RTCP sender or 
   694         * Value indicating seconds gone since last received RTCP sender or 
   585         * receiver report. Value 20 indicates RTCP inactivity timeout.  
   695         * receiver report. Value 20 indicates RTCP inactivity timeout.  
   586         */
   696         */
   589         /**
   699         /**
   590         * Value indicating if speaker is explicitly muted instead of
   700         * Value indicating if speaker is explicitly muted instead of
   591         * muted as part of disabling bundled display sink 
   701         * muted as part of disabling bundled display sink 
   592         */
   702         */
   593         TBool iExplicitlyMuted;
   703         TBool iExplicitlyMuted;
   594 
   704         
   595 
   705         /**
       
   706         * Value indicates whether session was started in background mode.
       
   707         * (see IsBackgroundStartup()). Once application comes to foreground, 
       
   708         * iBackground is set to EFalse
       
   709         */
       
   710         TBool iBackground;
       
   711         
   596     MUS_UNITTEST( UT_CMusEngSession )
   712     MUS_UNITTEST( UT_CMusEngSession )
   597     MUS_UNITTEST( UT_CMusEngMceSession )
   713     MUS_UNITTEST( UT_CMusEngMceSession )
   598     MUS_UNITTEST( UT_CMusEngReceiveSession )
   714     MUS_UNITTEST( UT_CMusEngReceiveSession )
       
   715     MUS_UNITTEST( UT_CMusEngSessionManager )
   599     };
   716     };
   600     
   717     
   601 #endif //MUSHENGMCESESSION_H
   718 #endif // MUSENGMCESESSION_H