diff -r 73a1feb507fb -r bc78a40cd63c mmsharing/mmshengine/inc/musengmceoutsession.h --- a/mmsharing/mmshengine/inc/musengmceoutsession.h Tue Aug 31 15:12:07 2010 +0300 +++ b/mmsharing/mmshengine/inc/musengmceoutsession.h Wed Sep 01 12:31:01 2010 +0100 @@ -23,8 +23,9 @@ #include "musengmcesession.h" #include "musunittesting.h" + // FORWARD DECLARATIONS -class MLcUiProvider; +class MMusEngOutSessionObserver; class CMceStreamBundle; // CLASS DECLARATION @@ -45,14 +46,54 @@ */ ~CMusEngMceOutSession(); - public: // From MLcSession - - const TDesC& RemoteDisplayName(); + + public: // NEW API FUNCTIONS + + /** + * Sends invite to specified address. Session establishment is done in + * pause mode meaning that no RTP will be sent to network as a + * consequence of established session. PlayL() can be called any time + * during session establishment or after that in order to allow + * RTP sending. + * @leave KErrAlreadyExists if session establishment is already + * in progress + */ + IMPORT_C void InviteL( const TDesC& aRecipient ); + + /** + * Cancels Invite. + * @pre Invite is sent + */ + IMPORT_C void CancelInviteL( ); - void EstablishLcSessionL(); - - void TerminateLcSessionL(); - + /** + * If codecs supported by recipient are known e.g. because of OPTIONS + * query, they can be communicated to engine via this function + * @param aVideoCodecs Comma separated list of supported codecs + */ + IMPORT_C void SetSupportedVideoCodecListL( const TDesC& aVideoCodecs ); + + + public: // VIRTUAL API + + /** + * Resumes previously paused session. Exact behavior depends on + * exact session type. + */ + virtual void PlayL() = 0; + + /** + * Pauses session. Exact behavior depends on exact session type. + */ + virtual void PauseL() = 0; + + /** + * Tells whether session is paused or not + * @pre Call of InviteL has been completed + */ + virtual TBool IsPlayingL() = 0; + + protected: // Must be implemented in derived class /** @@ -62,7 +103,6 @@ virtual void CompleteSessionStructureL( CMceStreamBundle& aLocalBundle ) = 0; - virtual void AddDisplayL( CMceMediaStream& aStream ); protected: // May be overridden in derived classes @@ -75,15 +115,7 @@ */ virtual void EstablishSessionL(); - TBool IsH264Supported() const; - /** - * - */ - virtual void CreateMceSessionStructureL( TBool aForceSdpBandwidth = - EFalse ); - - protected: // helper function inherited from CMusEngMceSession /** @@ -97,8 +129,7 @@ * session. This function overrides function in base class and may * be further overridden. Function calls also overridden version. */ - void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec, - TMceSourceType aSourceType ); + void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec ); /** * Sets Multimediasharing specific audio codec settings like audio and @@ -114,66 +145,60 @@ /** * Constructor */ - CMusEngMceOutSession(); + CMusEngMceOutSession( const TRect& aRect, + MMusEngSessionObserver& aSessionObserver, + MMusEngOutSessionObserver& aOutSessionObserver ); /** * Second-phase constructor */ - void ConstructL(); + void ConstructL( TUint aSipProfileId ); - - private: // from MMusSipProfileUser, overrides base class definition - - virtual void ProfileRegistered(); - - - private: - - void DoInviteL( const TDesC& aRecipient = KNullDesC ); - - HBufC* ResolveRecipientLC(); - - static TInt AsyncBrakeCompleted( TAny* aPtr ); - - static TInt RegistrationTimerExpired( TAny* aPtr ); + + private: - static TInt InvitationResponseTimerExpired( TAny* aPtr ); + /** + * + */ + void CreateMceSessionStructureL(); - void InitRecipientNotFoundHandling(); - - void HandleRecipientNotFound(); + /** + * Add privacy sip header if call privacy is switched on else otherwise. + */ + void AddPrivacyHeaderL( CDesC8Array& aHeaders ); - TBool DoSyncRetryL(); + + protected: // DATA - void SplitL( const TDesC& aDes, const TDesC& aChar, CDesCArray* aArray ); + /** + * Callback reference to outsession observer interface. + */ + MMusEngOutSessionObserver& iOutSessionObserver; - HBufC* ReadDescPropertyL( TUint aKey ); - - TBool IgnoreErrorNote(); + /** + * ETrue if operator specific behavior is expected + */ + TBool iPrivate; - HBufC* RemoteAddressL() const; + /** + * ETrue if private number is turn on + */ + TBool iPrivateNumber; - void InputRecipientL( TDes& aRecipientAddress ); protected: // DATA - HBufC* iRemoteDisplayName; - HBufC8* iRecipient; + /** + * Recipient of session to be constructed + */ + HBufC8* iRecipient; + HBufC8* iVideoCodecList; - TInt iTriedInvitations; - HBufC* iRemoteSipAddressProposal; - CDeltaTimer* iDeltaTimer; - TCallBack iAsyncBrakeCallBack; - TDeltaTimerEntry iAsyncBrakeEntry; - TCallBack iRegistrationCallBack; - TCallBack iInvitationResponseCallBack; - TDeltaTimerEntry iRegistrationEntry; - TDeltaTimerEntry iInvitationResponseEntry; - TBool iRegistrationPending; - TBool iAddressQueried; + private: MUS_UNITTEST ( UT_CMusEngOutSession ) + }; #endif //MUSHENGMCESESSION_H