--- a/multimediacommscontroller/mmcccontroller/src/mccscreen.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommscontroller/mmcccontroller/src/mccscreen.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -787,7 +787,19 @@
}
else if ( VfStartPossible() )
{
- __CONTROLLER( "CMccScreenDirect::StartL, starting" )
+ __CONTROLLER( "CMccScreenDirect::StartL, starting, draw with alpha" )
+
+ TRect vfRect( TPoint( 0, 0 ), iArea );
+ iGraphicsContext->Activate( *iRw );
+ iRw->Invalidate( vfRect );
+ iRw->BeginRedraw( vfRect );
+ iGraphicsContext->CancelClippingRect();
+ iGraphicsContext->SetBrushStyle( CGraphicsContext::ESolidBrush );
+ iGraphicsContext->SetBrushColor( TRgb( 255, 255, 255, 0 ) );
+ iGraphicsContext->DrawRect( vfRect );
+ iRw->EndRedraw();
+ iGraphicsContext->Deactivate();
+ iRwSession.Flush();
StartDirectViewFinderL();
}
--- a/multimediacommsengine/mmceshared/src/mcecomsession.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecomsession.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -1075,6 +1075,10 @@
copy->iServiceType = aSession.iServiceType;
copy->iAnswerType = aSession.iAnswerType;
copy->iRemoteSecPreconditionsRequired = aSession.iRemoteSecPreconditionsRequired;
+ if( copy->iSecureMediaSession )
+ {
+ copy->iSecureMediaSession->iLSReadyToBind = EFalse;
+ }
TInt index = 0;
for( index = 0; index < copy->Streams().Count(); index++ )
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediamanager.h Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediamanager.h Sun Mar 14 13:11:20 2010 +0000
@@ -633,6 +633,9 @@
* @param aSource
*/
void UpdateConfigKeyL( const CMceComMediaSource& aSource );
+ void UpDateStreamStateL(CMceComSession& currentSession,
+ CMceComSession& forkSession );
+ void ForceEnableSinkState(CMceComSession& aSession );
private: //
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesdpsession.h Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesdpsession.h Sun Mar 14 13:11:20 2010 +0000
@@ -201,6 +201,7 @@
CSIPDialogAssocBase* Context();
TBool ContextSwitchRequested();
+ void UpdateSecureStreamL( CMceComSession& aSession );
public: //update handling
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesecuredesstream.h Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesecuredesstream.h Sun Mar 14 13:11:20 2010 +0000
@@ -210,6 +210,7 @@
* @return void
*/
void CopyStreamCryptoL( CMceSecureDesStream& aCopyFrom );
+ void ForceUpdateStreamL();
private:
/**
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesecuremediasession.h Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesecuremediasession.h Sun Mar 14 13:11:20 2010 +0000
@@ -173,6 +173,8 @@
void RemoveSecureCrypto();
+ void ForceUpdateSecureStreamL( CMceComMediaStream& aStream,
+ CSdpMediaField& aMediaLine );
private:
/**
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediamanager.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediamanager.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -4780,5 +4780,80 @@
MCEMM_DEBUG("CMceMediaManager::DoConfigKeyUpdateL(), Exit ");
}
+// ---------------------------------------------------------
+// CMceMediaManager::UpDateStreamStateL
+// ---------------------------------------------------------
+//
+void CMceMediaManager::UpDateStreamStateL(CMceComSession& currentSession,
+ CMceComSession& forkSession )
+ {
+ MCEMM_DEBUG("CMceMediaManager::UpDateStreamState, Entry ");
+ CMceSrvStream* stream = NULL;
+ RPointerArray<CMceSrvStream> currentStreams;
+ TMceSrvStreamIterator sendStreams( currentSession.MccStreams(),
+ TMceSrvStreamIterator::ESend );
+ while( sendStreams.Next( stream, CMceSrvStream::EStopped,
+ TMceSrvStreamIterator::ExactReverseMatch ) )
+ {
+ if ( stream->State() != CMceSrvStream::EInactive &&
+ stream->Codec().iIsNegotiated )
+ {
+ currentStreams.Append( stream );
+ }
+ }
+ TMceSrvStreamIterator forkSendStreams( forkSession.MccStreams(),
+ TMceSrvStreamIterator::ESend );
+ while( forkSendStreams.Next( stream, CMceSrvStream::EStopped,
+ TMceSrvStreamIterator::ExactReverseMatch ) )
+ {
+ if ( stream->State() != CMceSrvStream::EInactive &&
+ stream->Codec().iIsNegotiated )
+ {
+ CMccCodecInformation* codec =
+ iMccInterface->CodecL( stream->SessionId(),
+ stream->LinkId(),
+ stream->Id() );
+ CleanupStack::PushL( codec );
+ stream->Codec().MccPopulateL( *codec, *stream, EMceRoleOfferer );
+ User::LeaveIfError( iMccInterface->SetCodec( stream->SessionId(),
+ stream->LinkId(), stream->Id(), *codec ) );
+ CleanupStack::PopAndDestroy( codec );
+ TBool IsMatch = EFalse;
+ for( TInt count = 0; count < currentStreams.Count() && !IsMatch; count++ )
+ {
+ if( currentStreams[count]->Codec().iSdpName ==
+ stream->Codec().iSdpName )
+ {
+ IsMatch = ETrue;
+ }
+ }
+ if( !IsMatch )
+ {
+ SetPendingState( *stream, 0, CMceSrvStream::EPaused );
+ }
+ }
+ }
+ MCEMM_DEBUG("CMceMediaManager::UpDateStreamState, Exit ");
+ }
+// ---------------------------------------------------------
+// CMceMediaManager::ForceEnableSinkState
+// ---------------------------------------------------------
+//
+void CMceMediaManager::ForceEnableSinkState(CMceComSession& aSession )
+ {
+ CMceSrvStream* stream = NULL;
+ TBool IsSet = EFalse;
+ TMceSrvStreamIterator sendStreams( aSession.MccStreams(), TMceSrvStreamIterator::ESend );
+ while( !IsSet && sendStreams.Next( stream, CMceSrvStream::EStopped,
+ TMceSrvStreamIterator::ExactReverseMatch ) )
+ {
+ if ( stream->State() != CMceSrvStream::EInactive &&
+ stream->Codec().iIsNegotiated )
+ {
+ SetPendingState( *stream, stream->Sink().Id(), CMceSrvStream::EPaused );
+ IsSet = ETrue;
+ }
+ }
+ }
// End of File
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -1539,9 +1539,11 @@
newMaster->iContext;
newMaster->iRequestedContext = NULL;
oldMaster->iRequestedContext = NULL;
-
+ if( aForkedSession )
+ {
newMaster->MediaSession()->Merge( *oldMaster->MediaSession(),
KMceDeepMergeYes );
+ }
MCEMM_DEBUG("context switch performed")
}
@@ -1722,3 +1724,22 @@
return count;
}
+void CMceSdpSession::UpdateSecureStreamL( CMceComSession& aSession )
+ {
+ MCEMM_DEBUG("CMceSdpSession::UpdateSecureStream() : Entry ")
+ RPointerArray< CSdpMediaField >& mediaLines = iSdpRemoteMediaFields;
+ RPointerArray <CMceComMediaStream>& streams = aSession.Streams();
+ CSdpMediaField* mediaLine = NULL;
+ CMceComMediaStream* aStream = NULL;
+ for ( TInt index = 0; index < mediaLines.Count(); index++ )
+ {
+ mediaLine = mediaLines[ index ];
+ aStream = MediaSlotInUse( index, streams );
+ if( aSession.SecureSession() && aStream )
+ {
+ aStream = aStream->OfferStream();
+ aSession.SecureSession()->ForceUpdateSecureStreamL(*aStream, *mediaLine );
+ }
+ }
+ MCEMM_DEBUG("CMceSdpSession::UpdateSecureStream() : Exit ")
+ }
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesecuredesstream.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesecuredesstream.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -1898,4 +1898,20 @@
}
MCEMM_DEBUG( "CMceSecureDesStream::SetCryptoByClientL, exit " )
}
+//-----------------------------------------------------------------------------
+// CMceSecureDesStream::ForceUpdateStreamL ()
+//
+// -----------------------------------------------------------------------------
+//
+void CMceSecureDesStream::ForceUpdateStreamL()
+ {
+ MCEMM_DEBUG( "CMceSecureDesStream::ForceUpdateStream, entry " )
+ UpdateCryptoContextL( iCryptoIn );
+ UpdateCryptoContextL( iCryptoOut );
+ if ( iWaitingBinding )
+ {
+ iSecureSession.BindStreamCrypto();
+ }
+ MCEMM_DEBUG( "CMceSecureDesStream::ForceUpdateStream, exit " )
+ }
// End of File
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesecuremediasession.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesecuremediasession.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -619,4 +619,32 @@
iSession.iIsSecureSession = EFalse;
}
}
+// -----------------------------------------------------------------------------
+// CMceSecureMediaSession::ForceUpdateSecureStreamL
+//
+// -----------------------------------------------------------------------------
+//
+void CMceSecureMediaSession::ForceUpdateSecureStreamL(CMceComMediaStream& aStream,
+ CSdpMediaField& aMediaLine )
+ {
+ MCEMM_DEBUG("CMceSecureMediaSession::ForceUpdateSecureStreamL(), Entry ");
+ User::LeaveIfNull( &aStream );
+ User::LeaveIfNull( &aMediaLine );
+ CMceSecureDesStream* secStream=NULL;
+ TInt secStreamCount = iMceSecureDesStreams.Count();
+ for (TInt j=0; j<secStreamCount; j++)
+ {
+ CMceSecureDesStream* secDesStream = iMceSecureDesStreams[j];
+ if (IfStreamMatchMedia( aStream, *secDesStream, aMediaLine))
+ {
+ j=secStreamCount;
+ secStream = secDesStream;
+ }
+ }
+ if( secStream )
+ {
+ secStream->ForceUpdateStreamL();
+ }
+ MCEMM_DEBUG("CMceSecureMediaSession::ForceUpdateSecureStreamL(), Exit ");
+ }
// End of File
--- a/multimediacommsengine/mmcesrv/mmceserver/inc/mcesipsession.h Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmceserver/inc/mcesipsession.h Sun Mar 14 13:11:20 2010 +0000
@@ -729,6 +729,8 @@
TInt ForkedDialogsCount();
+ void ForceUpdateStreamL();
+ void ResetCurrentDialog();
protected:
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcenatstatedecodeanswer.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcenatstatedecodeanswer.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -142,9 +142,15 @@
aEvent.Session().SetOffer( aEvent.Document() );
aEvent.NatActions().SetOffered( KMceNatOfferSdp );
aEvent.NatActions().SdpCleanup( previous, session.Offer() );
- aEvent.NatActions().StateChangedL( aEvent, KMceNatStateConnected );
+ if( EMceProvisionalResponse == aEvent.Code() )
+ {
+ aEvent.NatActions().StateChangedL( aEvent, KMceNatStateWait );
+ }
+ else
+ {
+ aEvent.NatActions().StateChangedL( aEvent, KMceNatStateConnected );
+ }
}
-
// End of File
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcesipsession.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcesipsession.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -225,6 +225,13 @@
CMceComSession* body = iBodyBucket[ 0 ];
if ( &body->SdpSession() )
{
+ if( body->SdpSession().Context() == Dialog() )
+ {
+ //fork situation
+ CMceComSession* tmpBody = body;
+ body = iBody;
+ iBody = tmpBody;
+ }
body->SdpSession().AttachContext( NULL );
}
CMceComSession::Delete( body, Manager().MediaManager() );
@@ -1268,7 +1275,8 @@
}
else
{
- if ( Response().Type() == SIPStrings::StringF( SipStrConsts::EInvite ) )
+ if ( Response().Type() == SIPStrings::StringF( SipStrConsts::EInvite ) ||
+ Response().Type() == SIPStrings::StringF( SipStrConsts::EPrack ) )
{
// If one of the forked dialogs generated 200 OK response
// for a session that is not in established state,
@@ -2612,4 +2620,33 @@
{
return iForkedDialogs.Count();
}
+// -----------------------------------------------------------------------------
+// CMceSipSession::ForceUpdateStreamL
+// -----------------------------------------------------------------------------
+//
+void CMceSipSession::ForceUpdateStreamL()
+ {
+ MCESRV_DEBUG("CMceSipSession::ForceUpdateStream, Entry");
+ if( iBody->SdpSession().Context() == Dialog() )
+ {
+ Manager().MediaManager().ForceEnableSinkState( ActiveBody() );
+ }
+ else
+ {
+ ActiveBody().SdpSession().UpdateSecureStreamL( ActiveBody() );
+ Manager().MediaManager().UpDateStreamStateL( *iBody, ActiveBody() );
+ }
+ MCESRV_DEBUG("CMceSipSession::ForceUpdateStream, Exit");
+ }
+// -----------------------------------------------------------------------------
+// CMceSipSession::ResetCurrentDialog
+// -----------------------------------------------------------------------------
+//
+void CMceSipSession::ResetCurrentDialog()
+ {
+ if( iBodyBucket.Count() == 0 )
+ {
+ iCurrentDialog = iDialog;
+ }
+ }
// End of File
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -34,6 +34,9 @@
#include "mcenatmacros.h"
#include "mcesdpsession.h"
#include "mcesrvlogs.h"
+#include "mcemediastate.h"
+#include "mcemediadefs.h"
+#include "mcemediamanager.h"
// -----------------------------------------------------------------------------
// CMceStateOffering::CMceStateOffering
@@ -271,7 +274,15 @@
if ( MceSip::ResponseCode( session.Response() ) == KMceSipSessionProgress &&
session.ForkedDialogsCount() )
{
+ if( session.ActiveBody().NegotiationState().Id() == KMceMediaNegotiated ||
+ session.ActiveBody().NegotiationState().Id() == KMceOfferingMedia )
+ {
IsFork = ETrue;
+ }
+ else
+ {
+ session.ResetCurrentDialog();
+ }
}
if ( session.Actions().NeedToProcessL( aEvent ) || IsFork )
{
@@ -484,6 +495,13 @@
{
if ( !MCE_NEED_TO_RECEIVE( session ) )
{
+ if ( session.ActiveBody().SecureSession())
+ {
+ if( session.ForkedDialogsCount() )
+ {
+ session.ForceUpdateStreamL();
+ }
+ }
status = session.Actions().UpdateL();
// SDP answer was received before
// go to established state
--- a/multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMceNatStateDecodeAnswer.cpp Mon Mar 08 21:43:55 2010 +0000
+++ b/multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMceNatStateDecodeAnswer.cpp Sun Mar 14 13:11:20 2010 +0000
@@ -213,6 +213,14 @@
*iNatSession, EMceInvite );
EUNIT_ASSERT_LEAVE( iState->TransitionHandler().ExitL( event2 ));
+ // NAT EMceNatHandleSIP Handled
+ iNatSession->iNatDisabled = EFalse;
+ iNatSession->iEntryPoint = CMceNatSipSession::ENatEntryHandleSIPEvent;
+ eventcode = EMceNatHandleSIP;
+ iNatSession->NextState( KMceStateOffering );
+ TMceNatStateTransitionEvent event3( NULL, *iNatSession,eventcode,
+ *iNatSession, EMceProvisionalResponse );
+ EUNIT_ASSERT_LEAVE( iState->TransitionHandler().ExitL( event3 ));
}