# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1282115268 -10800 # Node ID 7cdef8deefa0ed3541bd910124efb6c1b9465464 # Parent a858c2cf6a45d56ccfab11fa26a8252348868705 Revision: 201031 Kit: 201033 diff -r a858c2cf6a45 -r 7cdef8deefa0 group/bld.inf --- a/group/bld.inf Tue Jul 06 14:39:54 2010 +0300 +++ b/group/bld.inf Wed Aug 18 10:07:48 2010 +0300 @@ -23,5 +23,6 @@ #include "../realtimenetprots/rtp/group/bld.inf" #include "../realtimenetprots/sipfw/Group/bld.inf" #include "../sipplugins/group/bld.inf" +#include "../sipproviderplugins/sipprovider/group/bld.inf" diff -r a858c2cf6a45 -r 7cdef8deefa0 ipappprotocols_plat/rtprtcp_api/inc/rtpapi.h --- a/ipappprotocols_plat/rtprtcp_api/inc/rtpapi.h Tue Jul 06 14:39:54 2010 +0300 +++ b/ipappprotocols_plat/rtprtcp_api/inc/rtpapi.h Wed Aug 18 10:07:48 2010 +0300 @@ -334,7 +334,15 @@ const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, TRequestStatus& aStatus ); - + + /** + * Send an RTP data packet, with a given CSRC list. + * @param aHeaderInfo - [input] TRtpSendPktParam and CSRC list. + * @return KErrNone if successful; system wide error code otherwise + */ + IMPORT_C TInt SendRtpPacket( const TRtpSendPktParams& aSendPktParam, + TArray aCSRCList); + /** * Send a non-RTP (control) data packet asynchronously @@ -533,8 +541,30 @@ * @return KErrNone. */ IMPORT_C TInt NotInUseSetNonRTPDataObserver( ); - - + + + /** + * Register a callback object for Send RTP data packets from an RTP + * Session. Only one Sender callback object is allowed to be + * registered for one Session. + * MRTPPacketObserver::ReadyToSendRtpPacket function from aRtpObserver object is + * called when an RTP data packet is received. + * @param aSessionId - [input] RTP Session ID + * @param aRtpObserver - [input] Callback object to receive RTP packets + * @return KErrNone if successful; system wide error code otherwise + */ + IMPORT_C TInt RegisterRtpPostProcessingObserver( TRtpId aSessionId, + MRtpPostProcessingObserver& aRtpObserver ); + + + /** + * Unregister RTP Packet observer callback object associated with an RTP + * session. + * @param aSessionId - [input] RTP Session ID + * @return None + */ + IMPORT_C void UnregisterRtpPostProcessingObserver( TRtpId aSessionId ); + private: /** * C++ default constructor. diff -r a858c2cf6a45 -r 7cdef8deefa0 ipappprotocols_plat/rtprtcp_api/inc/rtpdef.h --- a/ipappprotocols_plat/rtprtcp_api/inc/rtpdef.h Tue Jul 06 14:39:54 2010 +0300 +++ b/ipappprotocols_plat/rtprtcp_api/inc/rtpdef.h Wed Aug 18 10:07:48 2010 +0300 @@ -34,6 +34,7 @@ const TUint KMaxSdesItemSize = 255; const TUint KSocketBufSize = 4096; const TInt KMinRtpHeaderSize = 12; // 96 bits in header, 96/8 = 12 +const TInt KMaxCsrcIdentifiers = 15; // DATA TYPES @@ -41,6 +42,7 @@ const TRtpId KNullId = 0xffffffff; typedef TUint32 TRtpSSRC; // +typedef TUint32 TRtpCSRC; // typedef TUint8 TRtpPayloadType; // payload type of the RTP packet typedef TUint16 TRtpSequence; // sequence number of the RTP packet typedef TUint32 TRtpTimeStamp; // timestamp of the RTP packet @@ -55,6 +57,7 @@ // FORWARD DECLARATIONS class TRtpSendHeader; class TRtpRecvHeader; +class TRtpSendPktParams; // CLASS DECLARATION @@ -206,6 +209,30 @@ }; +/** +* Header class for sending RTP Packets +* +* @lib RtpService.dll +*/ +class TRtpSendPktParams + { +public: + + TRtpSendPktParams(TRtpSendHeader &aHeaderInfo); + + TRtpId iTranStreamId; // Transtream Id + TRtpSendHeader &iHeaderInfo; // Standard fixed header of RTP packet to send. + TPtrC8 iPayloadData; // Payload + TRequestStatus *iStatus; + TRtpSequence *iSequenceNum; // Sequence Number + }; + +inline TRtpSendPktParams::TRtpSendPktParams(TRtpSendHeader &aHeaderInfo) : iTranStreamId( 0 ), + iHeaderInfo( aHeaderInfo ), + iStatus( 0 ), + iSequenceNum( 0 ) + { + }; /** * An interface to the callback functions for asynchronous event @@ -318,4 +345,23 @@ }; + +/** +* callback functions for Send RTP packets. +* +* @lib RtpService.dll +*/ +class MRtpPostProcessingObserver + { + public: + /** + * Callback function to receive a handle to RTP packet which is ready to send. + * @param TRtpId aTranStreamId - Transimission stream id + * @param TPtr8 &aPacket - RTP packet Ready to send + * @return None + */ + virtual void ReadyToSendRtpPacket( TRtpId aTranStreamId, TPtr8 &aPacket ) = 0; + + }; + #endif // __RTPDEF_H diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/cfrtp/test/rtpscpr_dummy/group/dummy_cfrtp.mmp --- a/realtimenetprots/rtp/cfrtp/test/rtpscpr_dummy/group/dummy_cfrtp.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/cfrtp/test/rtpscpr_dummy/group/dummy_cfrtp.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -39,10 +39,7 @@ USERINCLUDE ../../../inc -SYSTEMINCLUDE /epoc32/include/ecom -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/comms-infras -SYSTEMINCLUDE /epoc32/include/networking +MW_LAYER_SYSTEMINCLUDE START RESOURCE A0008AA9.rss TARGET dummy_rtpscpr.rsc diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/cfrtp/test/te_cfrtp/group/te_cfrtpsuite.mmp --- a/realtimenetprots/rtp/cfrtp/test/te_cfrtp/group/te_cfrtpsuite.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/cfrtp/test/te_cfrtp/group/te_cfrtpsuite.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -33,9 +33,7 @@ USERINCLUDE ../../../inc USERINCLUDE ../../rtpscpr_dummy/inc -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/comms-infras +MW_LAYER_SYSTEMINCLUDE LIBRARY testexecuteutils.lib LIBRARY testexecutelogclient.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/rtpcore/group/rtpcore.mmp --- a/realtimenetprots/rtp/rtpcore/group/rtpcore.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/rtpcore/group/rtpcore.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -30,7 +30,9 @@ VENDORID 0x70000001 USERINCLUDE ../inc -MW_LAYER_SYSTEMINCLUDE_SYMBIAN + +MW_LAYER_SYSTEMINCLUDE +OS_LAYER_ESTLIB_SYSTEMINCLUDE SOURCEPATH ../src @@ -53,9 +55,6 @@ SOURCE rtpapi.cpp -OS_LAYER_ESTLIB_SYSTEMINCLUDE - - LIBRARY euser.lib esock.lib insock.lib random.lib bluetooth.lib commsfw.lib LIBRARY hal.lib DEBUGLIBRARY flogger.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/rtpcore/test/te_ut_rtpcollisionmgr/group/te_ut_rtpcollisionmgrsuite.mmp --- a/realtimenetprots/rtp/rtpcore/test/te_ut_rtpcollisionmgr/group/te_ut_rtpcollisionmgrsuite.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/rtpcore/test/te_ut_rtpcollisionmgr/group/te_ut_rtpcollisionmgrsuite.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -47,9 +47,7 @@ USERINCLUDE ../src USERINCLUDE ../../../inc -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/libc +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib esock.lib insock.lib random.lib bluetooth.lib hal.lib charconv.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/rtpcore/test/trtpcore/group/trtp2.mmp --- a/realtimenetprots/rtp/rtpcore/test/trtpcore/group/trtp2.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/rtpcore/test/trtpcore/group/trtp2.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -52,9 +52,7 @@ USERINCLUDE ../../../src/ USERINCLUDE ../../../inc/ -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/libc +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib testexecuteutils.lib esock.lib insock.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/rtpcore/test/trtpsocket/group/trtpsocket.mmp --- a/realtimenetprots/rtp/rtpcore/test/trtpsocket/group/trtpsocket.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/rtpcore/test/trtpsocket/group/trtpsocket.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -59,15 +59,7 @@ USERINCLUDE ../../../inc USERINCLUDE ../../../src - -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/comms-infras -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/libc - - - - +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib testexecuteutils.lib esock.lib insock.lib LIBRARY testexecutelogclient.lib netmeta.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/shimrtp/group/rtpremoved.mmp --- a/realtimenetprots/rtp/shimrtp/group/rtpremoved.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/shimrtp/group/rtpremoved.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -36,9 +36,11 @@ USERINCLUDE ../inc USERINCLUDE ../../rtpcore/inc -MW_LAYER_SYSTEMINCLUDE_SYMBIAN USERINCLUDE ../src/rtp +MW_LAYER_SYSTEMINCLUDE + + SOURCEPATH ../src/stubs SOURCE events_stub.cpp SOURCE receivestream_stub.cpp diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/shimrtp/test/rtpfilestreamer/group/rtpfilestreamer.mmp --- a/realtimenetprots/rtp/shimrtp/test/rtpfilestreamer/group/rtpfilestreamer.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/shimrtp/test/rtpfilestreamer/group/rtpfilestreamer.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -28,7 +28,9 @@ SOURCE demoapp.cpp USERINCLUDE ../inc -SYSTEMINCLUDE /epoc32/include + +MW_LAYER_SYSTEMINCLUDE + LIBRARY euser.lib LIBRARY esock.lib LIBRARY insock.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/shimrtp/test/te_rtcp/group/te_rtcpsuite.mmp --- a/realtimenetprots/rtp/shimrtp/test/te_rtcp/group/te_rtcpsuite.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/shimrtp/test/te_rtcp/group/te_rtcpsuite.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -35,9 +35,7 @@ USERINCLUDE ../../../inc USERINCLUDE ../../../src/rtp -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/comms-infras -SYSTEMINCLUDE /epoc32/include/test +MW_LAYER_SYSTEMINCLUDE //Please add your system include under here. diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/shimrtp/test/te_rtp/group/te_rtpsuite.mmp --- a/realtimenetprots/rtp/shimrtp/test/te_rtp/group/te_rtpsuite.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/shimrtp/test/te_rtp/group/te_rtpsuite.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -33,9 +33,7 @@ USERINCLUDE ../src USERINCLUDE ../../../inc -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/comms-infras +MW_LAYER_SYSTEMINCLUDE //Please add your system include under here. diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/rtp/shimrtp/test/trtp/group/trtp.mmp --- a/realtimenetprots/rtp/shimrtp/test/trtp/group/trtp.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/rtp/shimrtp/test/trtp/group/trtp.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -36,10 +36,7 @@ SOURCE trtpstep.cpp -SYSTEMINCLUDE /epoc32/include/comms-infras -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/test -SYSTEMINCLUDE /epoc32/include/libc +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib estlib.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrmonitor.h --- a/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrmonitor.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrmonitor.h Wed Aug 18 10:07:48 2010 +0300 @@ -64,48 +64,48 @@ * Starts to monitor IAP availability for the SNAP. * The observer will be informed asynchronouysly * when any IAP is available for the monitored SNAP. - * @param aSnapId SNAP id + * @param aConfigData SNAP Data to identify the correct SNAP Monitor. * @param aObserver observer to be informed when an IAP becomes available */ - void MonitorSnapL( TUint32 aSnapId, - MSipAlrObserver& aObserver ); + void MonitorSnapL( TSipSNAPConfigurationData & aConfigData, + MSipAlrObserver& aObserver); /** * Refreshes the IAP availability for the SNAP. * Scans the available IAPs for the SNAP and informs all the observers * if a better IAP than the current one is available. - * @param aSnapId SNAP id + * @param aConfigData SNAP Data to identify the correct SNAP Monitor. */ - void RefreshIapAvailabilityL( TUint32 aSnapId ); + void RefreshIapAvailabilityL( TSipSNAPConfigurationData & aConfigData ); /** * Allows migration to a new IAP for the SNAP. - * @param aSnapId SNAP id + * @param aConfigData SNAP Data to identify the correct SNAP Monitor. * @return KErrNone on success, otherwise a system wide error code. */ - TInt AllowMigration( TUint32 aSnapId ); + TInt AllowMigration( TSipSNAPConfigurationData & aConfigData ); /** * Disallows migration to a new IAP for the SNAP. - * @param aSnapId SNAP id + * @param aConfigData SNAP Data to identify the correct SNAP Monitor. * @return KErrNone on success, otherwise a system wide error code. */ - TInt DisallowMigration( TUint32 aSnapId ); + TInt DisallowMigration( TSipSNAPConfigurationData & aConfigData ); /** * The migration has succeeded and the new IAP has been taken into use. - * @param aSnapId SNAP id + * @param aConfigData SNAP Data to identify the correct SNAP Monitor. * @return KErrNone on success, otherwise a system wide error code. */ - TInt NewIapAccepted( TUint32 aSnapId ); + TInt NewIapAccepted( TSipSNAPConfigurationData & aConfigData ); /** * The migration has failed and the new IAP was not taken into use. - * @param aSnapId SNAP id + * @param aConfigData SNAP Data to identify the correct SNAP Monitor. * @return KErrNone on success, otherwise a system wide error code. */ - TInt NewIapRejected( TUint32 aSnapId ); + TInt NewIapRejected( TSipSNAPConfigurationData & aConfigData ); /** * Frees all the resources reserved for the observer. @@ -122,8 +122,9 @@ private: // New functions - CSipAlrSnapMonitor* FindSnapMonitor( TUint32 aSnapId ); - + CSipAlrSnapMonitor* FindSnapMonitor( TSipSNAPConfigurationData & aConfigData); + + private: // Data // Used for monitoring SNAP availability diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrobserver.h --- a/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrobserver.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrobserver.h Wed Aug 18 10:07:48 2010 +0300 @@ -82,4 +82,22 @@ }; +// CLASS DECLARATION +/** +* This is the class that encapsulates all snap specific data. +*/ + +class TSipSNAPConfigurationData + { +public: + + TSipSNAPConfigurationData(TUint32 aSnapId , TUint32 aBearerId) + { + iSnapId = aSnapId; + iBearerId = aBearerId; + }; + + TUint32 iSnapId; + TBool iBearerId; + }; #endif // MSIPALROBSERVER_H diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrsnapmonitor.h --- a/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrsnapmonitor.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/inc/sipalrsnapmonitor.h Wed Aug 18 10:07:48 2010 +0300 @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY #include @@ -56,10 +57,10 @@ public: // Constructors and destructor static CSipAlrSnapMonitor* NewLC( - TUint32 aSnapId, + TSipSNAPConfigurationData aSnapData, MSipAlrObserver& aObserver, RSocketServ& aSocketServer, - CSipSystemStateMonitor& aSystemStateMonitor ); + CSipSystemStateMonitor& aSystemStateMonitor); ~CSipAlrSnapMonitor(); @@ -108,7 +109,9 @@ void NewIapAccepted(); - void NewIapRejected(); + void NewIapRejected(); + + TBool BearerId(); private: // New functions @@ -134,9 +137,9 @@ private: // Constructors CSipAlrSnapMonitor( - TUint32 aSnapId, + TSipSNAPConfigurationData aSnapData, RSocketServ& aSocketServer, - CSipSystemStateMonitor& aSystemStateMonitor ); + CSipSystemStateMonitor& aSystemStateMonitor); void ConstructL( MSipAlrObserver& aObserver ); @@ -152,7 +155,7 @@ private: // Data - TUint32 iSnapId; + TSipSNAPConfigurationData iSnapData; RSocketServ& iSocketServer; CSipSystemStateMonitor& iSystemStateMonitor; RConnection iConnection; @@ -164,6 +167,8 @@ TBool iFirstStartHasSucceeded; TBool iConnectionActive; TBool iDying; + TConnPrefList iPrefList; + TExtendedConnPref iExtPrefs; private: // For testing purposes @@ -173,4 +178,4 @@ #endif }; -#endif //CSIPALRSNAPMONITOR_H \ No newline at end of file +#endif //CSIPALRSNAPMONITOR_H diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrmonitor.cpp --- a/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrmonitor.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrmonitor.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -71,12 +71,12 @@ // CSipAlrMonitor::RefreshIapAvailabilityL // ----------------------------------------------------------------------------- // -void CSipAlrMonitor::RefreshIapAvailabilityL ( TUint32 aSnapId ) +void CSipAlrMonitor::RefreshIapAvailabilityL ( TSipSNAPConfigurationData & aConfigData ) { PROFILE_DEBUG3( "CSipAlrMonitorImplementation::RefreshIapAvailabilityL", - aSnapId ) + aConfigData.iSnapId ) - CSipAlrSnapMonitor* monitor = FindSnapMonitor( aSnapId ); + CSipAlrSnapMonitor* monitor = FindSnapMonitor( aConfigData ); if ( monitor ) { monitor->RefreshL(); @@ -87,11 +87,11 @@ // CSipAlrMonitor::AllowMigration // ----------------------------------------------------------------------------- // -TInt CSipAlrMonitor::AllowMigration( TUint32 aSnapId ) +TInt CSipAlrMonitor::AllowMigration( TSipSNAPConfigurationData & aConfigData ) { - PROFILE_DEBUG3("CSipAlrMonitor::AllowMigration, SnapId",aSnapId) - - CSipAlrSnapMonitor* monitor = FindSnapMonitor( aSnapId ); + PROFILE_DEBUG3("CSipAlrMonitor::AllowMigration, SnapId",aConfigData.iSnapId) + PROFILE_DEBUG3("CSipAlrMonitor::AllowMigration, BearerFiltering",aConfigData.iBearerId) + CSipAlrSnapMonitor* monitor = FindSnapMonitor( aConfigData ); if ( monitor ) { monitor->AllowMigration(); @@ -103,11 +103,11 @@ // CSipAlrMonitor::DisallowMigration // ----------------------------------------------------------------------------- // -TInt CSipAlrMonitor::DisallowMigration( TUint32 aSnapId ) +TInt CSipAlrMonitor::DisallowMigration( TSipSNAPConfigurationData& aConfigData ) { - PROFILE_DEBUG3("CSipAlrMonitor::DisallowMigration, SnapId",aSnapId) - - CSipAlrSnapMonitor* monitor = FindSnapMonitor( aSnapId ); + PROFILE_DEBUG3("CSipAlrMonitor::DisallowMigration, SnapId",aConfigData.iSnapId) + PROFILE_DEBUG3("CSipAlrMonitor::DisallowMigration, BearerFiltering",aConfigData.iBearerId) + CSipAlrSnapMonitor* monitor = FindSnapMonitor( aConfigData ); if ( monitor ) { monitor->DisallowMigration(); @@ -120,11 +120,11 @@ // CSipAlrMonitor::NewIapAccepted // ----------------------------------------------------------------------------- // -TInt CSipAlrMonitor::NewIapAccepted( TUint32 aSnapId ) +TInt CSipAlrMonitor::NewIapAccepted( TSipSNAPConfigurationData & aConfigData) { - PROFILE_DEBUG3("CSipAlrMonitor::NewIapAccepted, SnapId",aSnapId) + PROFILE_DEBUG3("CSipAlrMonitor::NewIapAccepted, SnapId",aConfigData.iSnapId) - CSipAlrSnapMonitor* monitor = FindSnapMonitor( aSnapId ); + CSipAlrSnapMonitor* monitor = FindSnapMonitor( aConfigData ); if ( monitor ) { monitor->NewIapAccepted(); @@ -137,11 +137,11 @@ // CSipAlrMonitor::NewIapRejected // ----------------------------------------------------------------------------- // -TInt CSipAlrMonitor::NewIapRejected( TUint32 aSnapId ) +TInt CSipAlrMonitor::NewIapRejected( TSipSNAPConfigurationData & aConfigData ) { - PROFILE_DEBUG3( "CSipAlrMonitor::NewIapRejected, SnapId",aSnapId ) + PROFILE_DEBUG3( "CSipAlrMonitor::NewIapRejected, SnapId",aConfigData.iSnapId ) - CSipAlrSnapMonitor* monitor = FindSnapMonitor( aSnapId ); + CSipAlrSnapMonitor* monitor = FindSnapMonitor( aConfigData ); if ( monitor ) { monitor->NewIapRejected(); @@ -155,13 +155,14 @@ // ----------------------------------------------------------------------------- // void CSipAlrMonitor::MonitorSnapL( - TUint32 aSnapId, - MSipAlrObserver& aObserver ) + TSipSNAPConfigurationData& aConfigData, + MSipAlrObserver& aObserver) { PROFILE_DEBUG4( "CSipAlrMonitor::MonitorSnapL", - aSnapId, reinterpret_cast< TUint >( &aObserver ) ) - - CSipAlrSnapMonitor* monitor = FindSnapMonitor( aSnapId ); + aConfigData.iSnapId, reinterpret_cast< TUint >( &aObserver ) ) + + + CSipAlrSnapMonitor* monitor = FindSnapMonitor( aConfigData); if ( monitor ) { // Monitor exists, add observer and get current IAP availability @@ -173,7 +174,7 @@ else { monitor = CSipAlrSnapMonitor::NewLC( - aSnapId, aObserver, iSocketServer, iSystemStateMonitor ); + aConfigData, aObserver, iSocketServer, iSystemStateMonitor); iSnapMonitors.AppendL( monitor ); CleanupStack::Pop( monitor ); @@ -203,15 +204,18 @@ // CSipAlrMonitor::FindSnapMonitor // ----------------------------------------------------------------------------- // -CSipAlrSnapMonitor* CSipAlrMonitor::FindSnapMonitor( TUint32 aSnapId ) +CSipAlrSnapMonitor* CSipAlrMonitor::FindSnapMonitor( TSipSNAPConfigurationData & aConfigData) { CSipAlrSnapMonitor* monitor = NULL; for ( TInt i = 0; i < iSnapMonitors.Count() && !monitor; i++ ) { - if ( iSnapMonitors[i]->SnapId() == aSnapId ) - { - monitor = iSnapMonitors[i]; + if ( iSnapMonitors[i]->SnapId() == aConfigData.iSnapId && iSnapMonitors[i]->BearerId() == aConfigData.iBearerId ) //mtr found + { + monitor = iSnapMonitors[i]; } } return monitor; } + + + diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrsnapmonitor.cpp --- a/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrsnapmonitor.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrsnapmonitor.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -28,14 +28,14 @@ // ----------------------------------------------------------------------------- // CSipAlrSnapMonitor* CSipAlrSnapMonitor::NewLC( - TUint32 aSnapId, + TSipSNAPConfigurationData aSnapData, MSipAlrObserver& aObserver, RSocketServ& aSocketServer, - CSipSystemStateMonitor& aSystemStateMonitor ) + CSipSystemStateMonitor& aSystemStateMonitor) { CSipAlrSnapMonitor* self = new ( ELeave ) CSipAlrSnapMonitor( - aSnapId, aSocketServer, aSystemStateMonitor ); + aSnapData, aSocketServer, aSystemStateMonitor); CleanupStack::PushL( self ); self->ConstructL( aObserver ); return self; @@ -46,15 +46,15 @@ // ----------------------------------------------------------------------------- // CSipAlrSnapMonitor::CSipAlrSnapMonitor( - TUint32 aSnapId, + TSipSNAPConfigurationData aSnapData, RSocketServ& aSocketServer, - CSipSystemStateMonitor& aSystemStateMonitor ) : + CSipSystemStateMonitor& aSystemStateMonitor) : CActive ( CActive::EPriorityStandard ), - iSnapId( aSnapId ), + iSnapData( aSnapData ), iSocketServer( aSocketServer ), - iSystemStateMonitor( aSystemStateMonitor ) + iSystemStateMonitor( aSystemStateMonitor ) { - iPrefs.SetSnap( iSnapId ); + iPrefs.SetSnap( aSnapData.iSnapId ); CActiveScheduler::Add( this ); } @@ -67,9 +67,16 @@ PROFILE_DEBUG1( "CSipAlrSnapMonitor::ConstructL entered" ) iSystemStateMonitor.StartMonitoringL( - CSipSystemStateMonitor::ESnapAvailability, iSnapId, *this ); + CSipSystemStateMonitor::ESnapAvailability, SnapId(), *this ); AddObserverL( aObserver ); + + if(IsSnapAvailable()) + { + // SNAP is already Available to be started. + // No Need to wait for Notification from System State Monitor. + StartSnap(); + } PROFILE_DEBUG1( "CSipAlrSnapMonitor::ConstructL returns" ) } @@ -91,7 +98,7 @@ iObservers.Close(); iSystemStateMonitor.StopMonitoring( - CSipSystemStateMonitor::ESnapAvailability, iSnapId, *this ); + CSipSystemStateMonitor::ESnapAvailability, SnapId(), *this ); PROFILE_DEBUG1( "CSipAlrSnapMonitor::~CSipAlrSnapMonitor returns" ) } @@ -129,7 +136,7 @@ for ( TInt i = iObservers.Count() - 1; i >= 0; --i ) { iObservers[i].iObserver->AlrEvent( - MSipAlrObserver::EOfferedIapRejected, iSnapId, KNoIap ); + MSipAlrObserver::EOfferedIapRejected, SnapId(), KNoIap ); } } else @@ -188,7 +195,7 @@ TAccessPointInfo aNewAP, TBool /*aIsSeamless*/ ) { - PROFILE_DEBUG3( "CSipSnapAlrMonitor::NewCarrierActive", iSnapId ) + PROFILE_DEBUG3( "CSipSnapAlrMonitor::NewCarrierActive", SnapId() ) NotifyInitializedObservers( aNewAP.AccessPoint(), MSipAlrObserver::EIapActive ); @@ -206,7 +213,7 @@ PROFILE_DEBUG1( "CSipSnapAlrMonitor::Error iCommsMobilityAO==NULL") return; } - if ( aError == KErrNotFound) + if ( aError == KErrNotFound && !BearerId()) { NotifyInitializedObservers( KNoIap, MSipAlrObserver::ENoNewIapAvailable ); @@ -217,8 +224,12 @@ if ( !iDying ) { ResetState(); + if(!BearerId()) + { + PROFILE_DEBUG3( "CSipSnapAlrMonitor::Error, Start Snap as Bearer Id is ", BearerId() ) StartSnap(); } + } } // ----------------------------------------------------------------------------- @@ -235,7 +246,7 @@ if ( !IsActive() && aVariable == CSipSystemStateMonitor::ESnapAvailability && - aObjectId == iSnapId ) + aObjectId == SnapId() ) { if ( aValue == CSipSystemStateMonitor::ESnapAvailable ) { @@ -257,7 +268,7 @@ // TUint32 CSipAlrSnapMonitor::SnapId() const { - return iSnapId; + return iSnapData.iSnapId; } // ----------------------------------------------------------------------------- @@ -324,7 +335,7 @@ for ( TInt i = iObservers.Count() - 1; i >= 0; --i ) { iObservers[i].iObserver->AlrEvent( - MSipAlrObserver::ERefreshError, iSnapId, KNoIap ); + MSipAlrObserver::ERefreshError, SnapId(), KNoIap ); } } } @@ -402,7 +413,6 @@ TInt CSipAlrSnapMonitor::StartSnap() { PROFILE_DEBUG1( "CSipAlrSnapMonitor::StartSnap entered" ) - TInt err = KErrNone; if ( !IsActive() && IsSnapAvailable() ) { @@ -413,14 +423,40 @@ if ( err == KErrNone ) { - iConnection.Start( iPrefs, iStatus ); - SetActive(); + if(BearerId()) + { + if(BearerId()== 1) + { + iExtPrefs.SetBearerSet(TExtendedConnPref::EExtendedConnBearerWLAN); + } + else if(BearerId() == 2) + { + iExtPrefs.SetBearerSet(TExtendedConnPref::EExtendedConnBearerCellular); + } + PROFILE_DEBUG1( "CSipAlrSnapMonitor::Starting Bearer Filtered connection" ) + iExtPrefs.SetSnapId( SnapId()); + + TRAPD(error, iPrefList.AppendL(&iExtPrefs)); + if(error) + { + return error; + } + // Start connecting + iConnection.Start( iPrefList, iStatus ); + SetActive(); + } + else + { + PROFILE_DEBUG1( "CSipAlrSnapMonitor::Starting Normal Connection" ) + iConnection.Start( iPrefs, iStatus ); + SetActive(); + } } } PROFILE_DEBUG3( "CSipAlrSnapMonitor::StartSnap returns", err ) return err; - } + } // ----------------------------------------------------------------------------- // CSipAlrSnapMonitor::CreateMobilityAoL @@ -476,7 +512,7 @@ void CSipAlrSnapMonitor::NotifyObservers( TUint aIapId ) { PROFILE_DEBUG4( "CSipSnapAlrMonitor::NotifyObservers SNAP, IAP", - iSnapId, aIapId ) + SnapId(), aIapId ) NotifyInitializedObservers( aIapId, MSipAlrObserver::EIapAvailable ); NotifyNewObservers( aIapId ); @@ -495,9 +531,9 @@ if ( iObservers[i].iInitialEventDone ) { PROFILE_DEBUG3( "CSipAlrSnapMonitor::NotifyIntitializedObservers", - iSnapId ) + SnapId() ) - iObservers[i].iObserver->AlrEvent( aEvent, iSnapId, aIapId ); + iObservers[i].iObserver->AlrEvent( aEvent, SnapId(), aIapId ); } } } @@ -512,10 +548,10 @@ { if ( !iObservers[i].iInitialEventDone ) { - PROFILE_DEBUG3( "CSipAlrSnapMonitor::NotifyNewObservers", iSnapId ) + PROFILE_DEBUG3( "CSipAlrSnapMonitor::NotifyNewObservers", SnapId() ) iObservers[i].iObserver->AlrEvent( - MSipAlrObserver::EIapAvailable, iSnapId, aIapId ); + MSipAlrObserver::EIapAvailable, SnapId(), aIapId ); iObservers[i].iInitialEventDone = ETrue; } @@ -529,6 +565,15 @@ TBool CSipAlrSnapMonitor::IsSnapAvailable() const { return ( iSystemStateMonitor.CurrentValue( - CSipSystemStateMonitor::ESnapAvailability, iSnapId ) == + CSipSystemStateMonitor::ESnapAvailability, SnapId() ) == CSipSystemStateMonitor::ESnapAvailable ); } + +// ----------------------------------------------------------------------------- +// CSipAlrSnapMonitor::BearerId +// ----------------------------------------------------------------------------- +// +TBool CSipAlrSnapMonitor::BearerId() + { + return iSnapData.iBearerId; + } diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Client/Api/sipprofile.h --- a/realtimenetprots/sipfw/ProfileAgent/Client/Api/sipprofile.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Client/Api/sipprofile.h Wed Aug 18 10:07:48 2010 +0300 @@ -195,6 +195,15 @@ */ const TUint32 KSecondaryAPN = 21; +/** +* BearerType is of type TUint32. +* Possible Values and its purpose. +* 0 --> Not Specified. +* 1 --> WLAN Bearer Only. +* 2 --> Cellular Data Bearer Only. +**/ +const TUint32 KBearerType = 22; + // CLASS DECLARATION /** diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Client/Src/sipmanagedprofile.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Client/Src/sipmanagedprofile.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Client/Src/sipmanagedprofile.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -185,6 +185,7 @@ case KSIPDigestPassword: case KSIPHeaders: case KSIPSoIpTOS: + case KBearerType: User::Leave(KErrNotFound); case KSIPContactHeaderUser: User::Leave(KErrAccessDenied); @@ -276,6 +277,7 @@ case KSIPSnapId: case KPrimaryAPN: case KSecondaryAPN: + case KBearerType: User::Leave(KErrNotFound); default: iSIPProfile->SetExtensionParameterL(aParam, aVal); diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Group/sipprofileserver.mmp --- a/realtimenetprots/sipfw/ProfileAgent/Group/sipprofileserver.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Group/sipprofileserver.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -94,6 +94,8 @@ LIBRARY commsdat.lib LIBRARY featmgr.lib LIBRARY commdb.lib +LIBRARY extendedconnpref.lib +LIBRARY netmeta.lib VENDORID 0x70000001 diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -442,12 +442,12 @@ CurrentState() == MSIPProfileContext::ERegistered) && (aError == K408TimeOut || aError == K500ServerInternalError || - aError == KErrSIPOutboundProxyNotResponding || + aError == KErrTimedOut || + (( aError == KErrSIPOutboundProxyNotResponding || aError == KErrSIPResolvingFailure || - aError == KErrTimedOut || aError == KErrSIPTransportFailure || - aError == KErrSIPICMPFailure && - iConnection.State() != CSIPConnection::ESuspended)) + aError == KErrSIPICMPFailure ) && + iConnection.State() != CSIPConnection::ESuspended))) { if ( iRetryCounterSum + 1 < KMaxRetryForOneAddress && iRetryCounter < KMaxRetryForOneAddress ) @@ -562,10 +562,12 @@ PROFILE_DEBUG3("SIPIetfProfileContext::IncomingResponse", ProfileId()) aHandled = ETrue; const CSIPResponseElements* response = aTransaction.ResponseElements(); - TUint responseCode = response->StatusCode(); + TInt responseCode = KErrGeneral; TBool retry = EFalse; if (response) { + responseCode = response->StatusCode(); + retry = RetryRegister( &aTransaction, responseCode); if( !retry ) { diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/Sipimsprofilecontext.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/Sipimsprofilecontext.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/Sipimsprofilecontext.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -749,11 +749,11 @@ aError == K500ServerInternalError || aError == K504ServerTimeOut || aError == KErrTimedOut || - aError == KErrSIPOutboundProxyNotResponding || + ((aError == KErrSIPOutboundProxyNotResponding || aError == KErrSIPResolvingFailure || aError == KErrSIPTransportFailure || - aError == KErrSIPICMPFailure && - iConnection.State() != CSIPConnection::ESuspended) + aError == KErrSIPICMPFailure )&& + iConnection.State() != CSIPConnection::ESuspended)) { SetRetryPossible(ETrue); iRetriedRegister = ETrue; diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Profile/Src/sipconcreteprofile.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Profile/Src/sipconcreteprofile.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Profile/Src/sipconcreteprofile.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -14,7 +14,7 @@ // Name : sipconcreteprofile.cpp // Part of : SIP / SIP Profile Agent / SIP Concrete Profile // Implementation -// Version : %version: 3.1.2 % +// Version : %version: 3.1.2.1.2 % // @@ -2256,5 +2256,12 @@ PROFILE_DEBUG3("Exceptional SNAP Entry verifier :", KDefaultSNAPIdentifier) SetExtensionParameterL(KSIPSnapId,KDefaultSNAPIdentifier); } + +if ( ExtensionParameter(KBearerType,iVal) == KErrNotFound) + { +PROFILE_DEBUG3("CSIPConcreteProfile::ValidateProfileParamsL.. Setting bearer Id to 0", 0) + TUint32 defaultId=0; + SetExtensionParameterL(KBearerType,defaultId); + } return res; } diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileCacheItem.h --- a/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileCacheItem.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileCacheItem.h Wed Aug 18 10:07:48 2010 +0300 @@ -567,7 +567,10 @@ */ void HandleProfileError(TInt aError, CSIPConcreteProfile& aProfile); - +/** + * Function returns the Bearer ID for the Profile. + */ + TUint32 BearerID(); private: /** diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h --- a/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h Wed Aug 18 10:07:48 2010 +0300 @@ -36,6 +36,7 @@ #include "sipprofileerrorhandler.h" #include #include "sipapnmanager.h" +#include "sipalrobserver.h" #include // FORWARD DECLARATIONS @@ -466,10 +467,10 @@ /** * Gets the migration controller of the given SNAP id. If a controller * does not exists, creates a new one. - * @param aSnapId SNAP id + * @param aSnapData * @return Migration controller, ownership is not transferred. */ - CSipAlrMigrationController& MigrationControllerL(TUint32 aSnapId); + CSipAlrMigrationController& MigrationControllerL(TSipSNAPConfigurationData aSnapData); CSIPProfileState& UnregisteredState(); diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -969,9 +969,12 @@ StopSnapMonitoring(); } - if (!iMigrationController) + if (!iMigrationController) { - iMigrationController = &iServerCore.MigrationControllerL(aSnapId); + TUint32 bearerId = BearerID(); + TSipSNAPConfigurationData aSnapData(aSnapId,bearerId); + iMigrationController = &iServerCore.MigrationControllerL(aSnapData); + PROFILE_DEBUG3("ProfileCacheItem::BearerFilter value is", bearerId) TUint32 iapId = iMigrationController->AttachProfileL(*this); if (iapId) { @@ -1403,3 +1406,13 @@ return iIsOfflineInitiated; } +// ----------------------------------------------------------------------------- +// CSIPProfileCacheItem::BearerID +// This function will return the Bearer ID of the Profile. +// ----------------------------------------------------------------------------- +// +TUint32 CSIPProfileCacheItem::BearerID() +{ TUint32 bearerId(0); + LatestProfile().ExtensionParameter(KBearerType , bearerId); + return bearerId; +} diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -507,27 +507,7 @@ { ConfirmSystemstateMonitor(CSipSystemStateMonitor::ESystemState); } - } //end if Offline - - //If the System receives Online event - if(aValue == CSipSystemStateMonitor::ESystemOnline) - { - for (TInt i = 0; i < iProfileCache.Count(); i++) - { - CSIPProfileCacheItem* item = iProfileCache[i]; - item->OfflineInitiated(EFalse); - CSIPConcreteProfile::TStatus status; - iPluginDirector->State(status, item->UsedProfile()); - if (item->IsReferred() && status == CSIPConcreteProfile::EUnregistered) - { - TRAPD(err, item->StartRegisterL(*iWaitForIAP, *iRegInProg, ETrue)); - if (err != KErrNone) - { - HandleAsyncError(*item,CSIPConcreteProfile::ERegistrationInProgress,err); - } - } - } - } //end if Online + } //end if Offline } //end if SystemState else if(aVariable == CSipSystemStateMonitor::ERfsState) { @@ -1906,20 +1886,22 @@ // ----------------------------------------------------------------------------- // CSipAlrMigrationController& -CSIPProfileServerCore::MigrationControllerL(TUint32 aSnapId) +CSIPProfileServerCore::MigrationControllerL(TSipSNAPConfigurationData aSnapData) { - RemoveUnusedMigrationControllers(aSnapId); + RemoveUnusedMigrationControllers(aSnapData.iSnapId); for (TInt i = 0; i < iMigrationControllers.Count(); ++i) { - if (iMigrationControllers[i]->SnapId() == aSnapId) + // Migration controller is unique based on the SNAP ID and Bearer ID. + if (iMigrationControllers[i]->SnapId() == aSnapData.iSnapId + && iMigrationControllers[i]->BearerId() == aSnapData.iBearerId) { return *iMigrationControllers[i]; } } CSipAlrMigrationController* ctrl = - CSipAlrMigrationController::NewLC(iAlrHandler->AlrMonitorL(), aSnapId); + CSipAlrMigrationController::NewLC(iAlrHandler->AlrMonitorL(),aSnapData); iMigrationControllers.AppendL(ctrl); CleanupStack::Pop(ctrl); return *ctrl; @@ -2210,8 +2192,7 @@ CSIPConcreteProfile::TStatus status; self->iPluginDirector->State( status, self->iProfileCache[i]->UsedProfile() ); item->OfflineInitiated(EFalse); - if (item->IsReferred() && (!self->iApnManager->IsIapGPRSL(item->Profile().IapId())) - && status == CSIPConcreteProfile::EUnregistered) + if (item->IsReferred() && (status == CSIPConcreteProfile::EUnregistered) ) { TRAPD(err, item->StartRegisterL(*(self->iWaitForIAP), *(self->iRegInProg), ETrue)); if (err != KErrNone) diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrhandler.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrhandler.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrhandler.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -134,8 +134,8 @@ TUint32 snapId(0); __ASSERT_ALWAYS(aProfile.IsSNAPConfigured(snapId), User::Leave(KErrArgument)); - - AlrMonitorL().RefreshIapAvailabilityL(snapId); + TSipSNAPConfigurationData aSnapData(snapId ,aProfile.BearerID()); + AlrMonitorL().RefreshIapAvailabilityL(aSnapData); } // ----------------------------------------------------------------------------- diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -30,10 +30,10 @@ // ----------------------------------------------------------------------------- // CSipAlrMigrationController* -CSipAlrMigrationController::NewLC(CSipAlrMonitor& aAlrMonitor, TUint32 aSnapId) +CSipAlrMigrationController::NewLC(CSipAlrMonitor& aAlrMonitor, TSipSNAPConfigurationData aSnapData) { CSipAlrMigrationController* self = - new (ELeave) CSipAlrMigrationController(aAlrMonitor, aSnapId); + new (ELeave) CSipAlrMigrationController(aAlrMonitor, aSnapData); CleanupStack::PushL(self); return self; } @@ -44,9 +44,9 @@ // CSipAlrMigrationController::CSipAlrMigrationController( CSipAlrMonitor& aAlrMonitor, - TUint32 aSnapId) : + TSipSNAPConfigurationData aSnapData) : iAlrMonitor(aAlrMonitor), - iSnapId(aSnapId) + iSnapData(aSnapData) #ifdef CPPUNIT_TEST // Set the array granularity to 1, so it allocates memory in each append , iObservers(1) @@ -125,9 +125,14 @@ // TUint32 CSipAlrMigrationController::SnapId() const { - return iSnapId; + return iSnapData.iSnapId; } +TUint32 CSipAlrMigrationController::BearerId() const + { + return iSnapData.iBearerId; + } + // ----------------------------------------------------------------------------- // CSipAlrMigrationController::IsUsed // ----------------------------------------------------------------------------- @@ -148,12 +153,13 @@ { TSipAlrMigrationObserverInfo observerInfo(aObserver); iObservers.AppendL(observerInfo); - + const TInt KFirstObserverExists = 1; if (iObservers.Count() == KFirstObserverExists) { - PROFILE_DEBUG3("CSipAlrMigrCtrl::AttachProfileL snapId", iSnapId) - iAlrMonitor.MonitorSnapL(iSnapId, *this); + PROFILE_DEBUG3("CSipAlrMigrCtrl::AttachProfileL snapId", SnapId()) + PROFILE_DEBUG3("CSipAlrMigrCtrl::AttachProfileL BearerFiltered.. ", BearerId()) + iAlrMonitor.MonitorSnapL(iSnapData, *this); return KNoIap; } @@ -251,11 +257,11 @@ TInt err(KErrNone); if (iMigrationDisallowed) { - err = iAlrMonitor.DisallowMigration(iSnapId); + err = iAlrMonitor.DisallowMigration(iSnapData); } else { - err = iAlrMonitor.AllowMigration(iSnapId); + err = iAlrMonitor.AllowMigration(iSnapData); } if (err != KErrNone) { @@ -274,9 +280,10 @@ // void CSipAlrMigrationController::RefreshIapAvailabilityL(TUint32 aSnapId) { - if (!iRefreshIssued && aSnapId == iSnapId) + if (!iRefreshIssued && aSnapId == SnapId()) { - iAlrMonitor.RefreshIapAvailabilityL(aSnapId); + + iAlrMonitor.RefreshIapAvailabilityL(iSnapData); iRefreshIssued = ETrue; } } @@ -293,7 +300,7 @@ PROFILE_DEBUG4("CSipAlrMigrCtrl::SetIapAcceptance, iap,works=", iAllowedIapId, aIapWorks) - + TInt index = FindIndex(aObserver); if (index != KErrNotFound && iObservers[index].iIsWaitingForAcceptance) { @@ -306,14 +313,14 @@ iObservers[i].iIsWaitingForAcceptance = EFalse; } PROFILE_DEBUG1("CSipAlrMigrCtrl::SetIapAcceptance accepted") - return iAlrMonitor.NewIapAccepted(iSnapId); + return iAlrMonitor.NewIapAccepted(iSnapData); } if (!ObserversWaitingAcceptance()) { // Nobody got IAP to work PROFILE_DEBUG1("CSipAlrMigrCtrl::SetIapAcceptance rejected") - return iAlrMonitor.NewIapRejected(iSnapId); + return iAlrMonitor.NewIapRejected(iSnapData); } } return KErrNone; diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.h --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.h Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.h Wed Aug 18 10:07:48 2010 +0300 @@ -58,7 +58,7 @@ public: static CSipAlrMigrationController* NewLC(CSipAlrMonitor& aAlrMonitor, - TUint32 aSnapId); + TSipSNAPConfigurationData aSnapData); ~CSipAlrMigrationController(); @@ -71,6 +71,8 @@ public: // New functions TUint32 SnapId() const; + + TUint32 BearerId() const; /** * Check if any profile is using this instance. @@ -116,11 +118,13 @@ TBool aIapWorks); void ResetFlags(); + + private: // Constructors CSipAlrMigrationController(CSipAlrMonitor& aAlrMonitor, - TUint32 aSnapId); + TSipSNAPConfigurationData aSnapData); private: // New functions @@ -143,9 +147,6 @@ RArray iObservers; - // SNAP id that is monitored. Does not change. - const TUint32 iSnapId; - // The IAP id, that was most recently offered to observers with // MSipAlrMigrationObserver::IapAvailableL. TUint32 iOfferedIapId; @@ -163,6 +164,9 @@ // Will be set to EFalse, when ALR monitor notifies about IAP, using // MSipAlrObserver::IapAvailable. TBool iRefreshIssued; + + // This contains the SNAP ID and the Bearer ID configured for the SNAP. + TSipSNAPConfigurationData iSnapData; private: // For testing purposes #ifdef CPPUNIT_TEST diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SIP/Codec/src/CSIPAcceptEncodingHeader.cpp --- a/realtimenetprots/sipfw/SIP/Codec/src/CSIPAcceptEncodingHeader.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Codec/src/CSIPAcceptEncodingHeader.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -164,7 +164,7 @@ tmp->Des().Trim(); //Allowing '/' token for interoperability issues RArray array; - if(CFeatureDiscovery::IsFeatureSupportedL(TUid::Uid(KFeatureIdFfSipApnSwitching))) + if(CFeatureDiscovery::IsFeatureSupportedL(TUid::Uid(KFeatureIdFfSipNonstandardInteropfix))) { array.Append('/'); } diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -1489,7 +1489,15 @@ { uri.SIPURI()->SetSIPS( EFalse ); } - } //end if (aMessage->IsRequest) + //set the port information as per sip scheme and if there is no + //port information set in the contact header.= + if(uri.SIPURI()->IsSIPSURI() && (0 == uri.SIPURI()->HostPort().Port())) + uri.SIPURI()->HostPort().SetPort(KDefaultSipsPort); + else if ((EFalse == uri.SIPURI()->IsSIPSURI()) && (0 == uri.SIPURI()->HostPort().Port())) + uri.SIPURI()->HostPort().SetPort(KDefaultSipPort); + else + {} + } //end if (aMessage->IsRequest) } //end if (uri.IsSIPURI()) } //end if(sipaddr) } //end while diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SIP/NATTraversalController/example_plugin/group/nattraversalcontrollerexample.mmp --- a/realtimenetprots/sipfw/SIP/NATTraversalController/example_plugin/group/nattraversalcontrollerexample.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/NATTraversalController/example_plugin/group/nattraversalcontrollerexample.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -30,8 +30,7 @@ TARGET nattraversalcontrollerexample.rsc END -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/ecom +MW_LAYER_SYSTEMINCLUDE USERINCLUDE ../src diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SIP/NATTraversalController/example_plugin/src/dllentry.cpp --- a/realtimenetprots/sipfw/SIP/NATTraversalController/example_plugin/src/dllentry.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/NATTraversalController/example_plugin/src/dllentry.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -18,7 +18,7 @@ -#include +#include #include "CNATTraversalControllerExample.h" diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SIP/SystemStateMonitor/example_plugin/group/sipsystemstatemonitor.mmp --- a/realtimenetprots/sipfw/SIP/SystemStateMonitor/example_plugin/group/sipsystemstatemonitor.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/SystemStateMonitor/example_plugin/group/sipsystemstatemonitor.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -33,8 +33,7 @@ TARGET sipsystemstatemonitor.rsc END -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/ecom +MW_LAYER_SYSTEMINCLUDE USERINCLUDE ../inc diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SIP/SystemStateMonitor/example_plugin/src/implementationproxy.cpp --- a/realtimenetprots/sipfw/SIP/SystemStateMonitor/example_plugin/src/implementationproxy.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/SystemStateMonitor/example_plugin/src/implementationproxy.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -19,7 +19,7 @@ #include "sipsystemstatemonitorimpl.h" -#include +#include const TImplementationProxy ImplementationTable[] = { diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SampleApp/gameUI_techview/Group/ui.mmp --- a/realtimenetprots/sipfw/SampleApp/gameUI_techview/Group/ui.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SampleApp/gameUI_techview/Group/ui.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -58,9 +58,7 @@ USERINCLUDE ../../sipengine/inc USERINCLUDE ../../../SIP/Codec/inc -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/techview -SYSTEMINCLUDE /epoc32/include/oem +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib apparc.lib cone.lib eikcore.lib LIBRARY eikcoctl.lib bafl.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SampleApp/gameengine/Group/gameengine.mmp --- a/realtimenetprots/sipfw/SampleApp/gameengine/Group/gameengine.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SampleApp/gameengine/Group/gameengine.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -37,7 +37,7 @@ USERINCLUDE ../../sipengine/inc USERINCLUDE ../../socketengine/Inc -SYSTEMINCLUDE /epoc32/include +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY sipexsocketengine.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SampleApp/resolverplugin/Group/resolverplugin.mmp --- a/realtimenetprots/sipfw/SampleApp/resolverplugin/Group/resolverplugin.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SampleApp/resolverplugin/Group/resolverplugin.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -26,7 +26,7 @@ USERINCLUDE ../Inc -SYSTEMINCLUDE /epoc32/include /epoc32/include/ecom +MW_LAYER_SYSTEMINCLUDE START RESOURCE ../Data/A00001EC.rss TARGET sipexresolverplugin.rsc diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SampleApp/sipengine/group/SIPExSIPEngine.mmp --- a/realtimenetprots/sipfw/SampleApp/sipengine/group/SIPExSIPEngine.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SampleApp/sipengine/group/SIPExSIPEngine.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -34,7 +34,7 @@ USERINCLUDE ../inc -SYSTEMINCLUDE /epoc32/include +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY estor.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 realtimenetprots/sipfw/SampleApp/socketengine/Group/SIPExSocketEngine.mmp --- a/realtimenetprots/sipfw/SampleApp/socketengine/Group/SIPExSocketEngine.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/realtimenetprots/sipfw/SampleApp/socketengine/Group/SIPExSocketEngine.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -29,7 +29,7 @@ USERINCLUDE ../Inc -SYSTEMINCLUDE /epoc32/include +MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib LIBRARY esock.lib // RSocketServ diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/bwins/rtpserviceu.def --- a/rtp/rtpstack/bwins/rtpserviceu.def Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/bwins/rtpserviceu.def Wed Aug 18 10:07:48 2010 +0300 @@ -44,4 +44,7 @@ ?UnregisterRtpObserver@CRtpAPI@@QAEXK@Z @ 43 NONAME ; void CRtpAPI::UnregisterRtpObserver(unsigned long) ?Version@CRtpAPI@@QBE?AVTVersion@@XZ @ 44 NONAME ; class TVersion CRtpAPI::Version(void) const ?CreateSessionL@CRtpAPI@@QAEKABVTCreateSessionParams@@AAIHPBVTRtcpParams@@AAVCSRTPSession@@@Z @ 45 NONAME ; unsigned long CRtpAPI::CreateSessionL(class TCreateSessionParams const &, unsigned int &, int, class TRtcpParams const *, class CSRTPSession &) + ?SendRtpPacket@CRtpAPI@@QAEHABVTRtpSendPktParams@@V?$TArray@K@@@Z @ 46 NONAME ; int CRtpAPI::SendRtpPacket(class TRtpSendPktParams const &, class TArray) + ?RegisterRtpPostProcessingObserver@CRtpAPI@@QAEHKAAVMRtpPostProcessingObserver@@@Z @ 47 NONAME ; int CRtpAPI::RegisterRtpPostProcessingObserver(unsigned long, class MRtpPostProcessingObserver &) + ?UnregisterRtpPostProcessingObserver@CRtpAPI@@QAEXK@Z @ 48 NONAME ; void CRtpAPI::UnregisterRtpPostProcessingObserver(unsigned long) diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/eabi/rtpserviceu.def --- a/rtp/rtpstack/eabi/rtpserviceu.def Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/eabi/rtpserviceu.def Wed Aug 18 10:07:48 2010 +0300 @@ -74,3 +74,7 @@ _ZTI12CRtpSendItem @ 73 NONAME ; ## _ZTI15CRtpSessionSrtp @ 74 NONAME ; ## _ZTV15CRtpSessionSrtp @ 75 NONAME ; ## + _ZN7CRtpAPI13SendRtpPacketERK17TRtpSendPktParams6TArrayImE @ 76 NONAME + _ZN7CRtpAPI33RegisterRtpPostProcessingObserverEmR26MRtpPostProcessingObserver @ 77 NONAME + _ZN7CRtpAPI35UnregisterRtpPostProcessingObserverEm @ 78 NONAME + diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/inc/rtpmanager.h --- a/rtp/rtpstack/inc/rtpmanager.h Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/inc/rtpmanager.h Wed Aug 18 10:07:48 2010 +0300 @@ -135,24 +135,31 @@ TInt RegisterRtpObserver( TRtpId aSessionId, MRtpObserver& aObserver ); void UnregisterRtpObserver( TRtpId aSessionId ); + + TInt RegisterRtpPostProcessingObserver( TRtpId aSessionId, MRtpPostProcessingObserver& aRtpObserver ); + + void UnregisterRtpPostProcessingObserver( TRtpId aSessionId ); TInt SetNonRTPDataObserver( TRtpId aSessionId, MNonRTPDataObserver* aNonRTPDataObserver ); TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, - const TDesC8& aPayloadData ); + const TDesC8& aPayloadData, + const TArray *aCsrcList = NULL ); TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ); + TRequestStatus& aStatus, + const TArray *aCsrcList = NULL ); TInt SendRtpPacket( TRtpId aTranStreamId, TRtpSequence aSequenceNum, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ); + TRequestStatus& aStatus, + const TArray *aCsrcList = NULL ); void SendDataL( TRtpId aSessionId, TBool aUseRTPSocket, diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/inc/rtppacketparam.h --- a/rtp/rtpstack/inc/rtppacketparam.h Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/inc/rtppacketparam.h Wed Aug 18 10:07:48 2010 +0300 @@ -184,6 +184,7 @@ TUint32* CSRCarray; TUint8* payloadData; TInt payloadDataLen; + const TArray *iCsrcList; public://Nested class /** diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/inc/rtpsession.h --- a/rtp/rtpstack/inc/rtpsession.h Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/inc/rtpsession.h Wed Aug 18 10:07:48 2010 +0300 @@ -108,16 +108,20 @@ TInt RegisterRtpObserver( MRtpObserver& aObserver ); void UnregisterRtpObserver(); + + TInt RegisterRtpPostProcessingObserver( MRtpPostProcessingObserver& aObserver ); + void UnregisterRtpPostProcessingObserver(); TInt SetNonRTPDataObserver( MNonRTPDataObserver* aNonRTPDataObserver ); TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, - const TDesC8& aPayloadData ); + const TDesC8& aPayloadData, const TArray *aCsrcList = NULL ); TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ); + TRequestStatus& aStatus, + const TArray *aCsrcList = NULL ); TInt SendRtpPacket( const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData ); @@ -128,7 +132,8 @@ TRtpSequence aSequenceNum, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ); + TRequestStatus& aStatus, + const TArray *aCsrcList = NULL ); void SendData( TBool aUseRTPSocket, const TDesC8& aData, @@ -162,6 +167,8 @@ * disabled; system wide error code otherwise */ TInt IsRtcpSendingSuspended( TBool& aAutoSending ); + + void ReadyToSendRtpPacket(TRtpId aTranStreamId); public: // from MSsrcCheckCallback /** @@ -454,6 +461,7 @@ MNonRTPDataObserver* iNonRTPDataObserver; MRtpErrNotify& iErrNotify; MRtpAsignUniqueID& iAssignUniqueID; + MRtpPostProcessingObserver* iRtpPacketObserver; TBool iSessionStarted; diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/inc/rtpsessionsrtp.h --- a/rtp/rtpstack/inc/rtpsessionsrtp.h Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/inc/rtpsessionsrtp.h Wed Aug 18 10:07:48 2010 +0300 @@ -55,19 +55,21 @@ ~CRtpSessionSrtp(); TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, - const TDesC8& aPayloadData ); + const TDesC8& aPayloadData, const TArray *aCsrcList = NULL ); TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ); + TRequestStatus& aStatus, + const TArray *aCsrcList = NULL); TInt SendRtpPacket( TRtpId aTranStreamId, TRtpSequence aSequenceNum, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ); + TRequestStatus& aStatus, + const TArray *aCsrcList = NULL ); //TInt SendRtcpByePacket( TRtpId aTranStreamId, const TDesC8& aReason ); //TInt SendRtcpAppPacket( TRtpId aTranStreamId, const TRtcpApp& aApp ); diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/inc/rtptranstream.h --- a/rtp/rtpstack/inc/rtptranstream.h Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/inc/rtptranstream.h Wed Aug 18 10:07:48 2010 +0300 @@ -49,7 +49,8 @@ const TDesC8& aPayloadData, TRtpSequence aSeqNum, TBool aSetSeqNum, - CRtpPacket* aPktSnd ); + CRtpPacket* aPktSnd, + const TArray *aCsrcList = NULL); TInt BuildRtcpBYEPacket( const TDesC8& aReason, CRtpPacket* aPktRtcpSnd ); diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtpapi.cpp --- a/rtp/rtpstack/src/rtpapi.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtpapi.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -389,6 +389,56 @@ { return iManager->SendRtpPacket( aTranStreamId, aHeaderInfo, aPayloadData, aStatus ); } + + +// --------------------------------------------------------------------------- +// TInt CRtpAPI::RegisterRtpPostProcessingObserver() +// +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CRtpAPI::RegisterRtpPostProcessingObserver( TRtpId aSessionId, + MRtpPostProcessingObserver& aRtpPacketObserver ) + { + return iManager->RegisterRtpPostProcessingObserver( aSessionId, aRtpPacketObserver ); + } + + +// --------------------------------------------------------------------------- +// CRtpAPI::UnregisterRtpPostProcessingObserver() +// +// --------------------------------------------------------------------------- +// +EXPORT_C void CRtpAPI::UnregisterRtpPostProcessingObserver( TRtpId aSessionId ) + { + iManager->UnregisterRtpPostProcessingObserver( aSessionId ); + } + + +// --------------------------------------------------------------------------- +// TInt CRtpAPI::SendRtpPacket() +// +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CRtpAPI::SendRtpPacket(const TRtpSendPktParams& aSendPktParam , TArray aCSRCList) + { + if(!aSendPktParam.iStatus) + { + //SYNC Version + return iManager->SendRtpPacket( aSendPktParam.iTranStreamId, aSendPktParam.iHeaderInfo, + aSendPktParam.iPayloadData, &aCSRCList ); + } + else if (!aSendPktParam.iSequenceNum) //ASYNC Versions With and Without SEQ Number + { + return iManager->SendRtpPacket( aSendPktParam.iTranStreamId, aSendPktParam.iHeaderInfo, + aSendPktParam.iPayloadData, *aSendPktParam.iStatus, &aCSRCList ); + } + else + { + return iManager->SendRtpPacket( aSendPktParam.iTranStreamId, *aSendPktParam.iSequenceNum, aSendPktParam.iHeaderInfo, + aSendPktParam.iPayloadData, *aSendPktParam.iStatus, &aCSRCList ); + } + } + // --------------------------------------------------------------------------- // TInt CRtpAPI::SendData() diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtpmanager.cpp --- a/rtp/rtpstack/src/rtpmanager.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtpmanager.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -721,6 +721,47 @@ return result; } + +// --------------------------------------------------------------------------- +// TInt CRtpManager::RegisterRtpPostProcessingObserver() +// +// --------------------------------------------------------------------------- +// +TInt CRtpManager::RegisterRtpPostProcessingObserver( TRtpId aSessionId, MRtpPostProcessingObserver& aRtpPacketObserver ) + { + CRtpSession* session = GetSession( aSessionId ); + TInt result( KErrGeneral ); + if ( session ) + { + result = session->RegisterRtpPostProcessingObserver( aRtpPacketObserver ); + } + else + { + RTP_DEBUG_DETAIL( "CRtpManager::RegisterRtpPostProcessingObserver, Session not found" ); + } + return result; + } + + +// --------------------------------------------------------------------------- +// CRtpManager::UnregisterRtpPostProcessingObserver() +// +// --------------------------------------------------------------------------- +// +void CRtpManager::UnregisterRtpPostProcessingObserver( TRtpId aSessionId ) + { + CRtpSession* session = GetSession( aSessionId ); + + if ( session ) + { + session->UnregisterRtpPostProcessingObserver(); + } + else + { + RTP_DEBUG_DETAIL( "CRtpManager::UnregisterRtpPostProcessingObserver, Session not found" ); + } + } + // --------------------------------------------------------------------------- // CRtpManager::UnregisterRtpObserver() // @@ -773,7 +814,8 @@ // TInt CRtpManager::SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, - const TDesC8& aPayloadData ) + const TDesC8& aPayloadData, + const TArray *aCsrcList) { CRtpSession* rtpSession = GetSession( aTranStreamId ); @@ -786,13 +828,13 @@ return static_cast (rtpSession)->SendRtpPacket( aTranStreamId, aHeaderInfo, - aPayloadData ); + aPayloadData, aCsrcList ); } else { return rtpSession->SendRtpPacket( aTranStreamId, aHeaderInfo, - aPayloadData ); + aPayloadData, aCsrcList ); } } else @@ -815,7 +857,8 @@ TInt CRtpManager::SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ) + TRequestStatus& aStatus, + const TArray *aCsrcList) { CRtpSession* rtpSession = GetSession( aTranStreamId ); @@ -828,13 +871,13 @@ return static_cast (rtpSession)->SendRtpPacket( aTranStreamId, aHeaderInfo, - aPayloadData, aStatus ); + aPayloadData, aStatus, aCsrcList ); } else { return rtpSession->SendRtpPacket( aTranStreamId, aHeaderInfo, - aPayloadData, aStatus ); + aPayloadData, aStatus, aCsrcList ); } } @@ -860,7 +903,8 @@ TRtpSequence aSequenceNum, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ) + TRequestStatus& aStatus, + const TArray *aCsrcList ) { CRtpSession* rtpSession = GetSession( aTranStreamId ); TInt result( KErrNone ); @@ -874,14 +918,14 @@ result = static_cast (rtpSession)->SendRtpPacket( aTranStreamId, aSequenceNum, aHeaderInfo, aPayloadData, - aStatus ); + aStatus, aCsrcList ); } else { result = rtpSession->SendRtpPacket( aTranStreamId, aSequenceNum, aHeaderInfo, aPayloadData, - aStatus ); + aStatus, aCsrcList ); } } diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtppacket.cpp --- a/rtp/rtpstack/src/rtppacket.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtppacket.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -123,8 +123,8 @@ * * * 2 bit = version * * 1 bit = padding * - * 1 bit = CRSRC Count * - * 4 bit = extension * + * 1 bit = extension * + * 4 bit = CRSRC Count * ****************************/ //version (2 bit) @@ -143,13 +143,17 @@ dataP[0] |= ( 1 << 4 ); } - // CC = 0 (1 bit) + // CC 4 bit) + if( aInitParam->TRTP.numCSRC) + { + dataP[0] |= aInitParam->TRTP.numCSRC; + } /**************************** * dataP[1] = 8 bit * * * * 1 bit = marker * - * 1 bit = payload type * + * 7 bits = payload type * ****************************/ // marker (1 bit) @@ -182,6 +186,15 @@ //set the pointer to point to the first bit after SSRC dataP += 4; + + + //Set CSRC if Present + for(TInt count = 0; countTRTP.numCSRC; count++) + { + Write32( dataP, (*aInitParam->TRTP.iCsrcList)[count]); + dataP += 4; + } + if ( aInitParam->TRTP.fHeaderExtension ) { @@ -675,7 +688,7 @@ // Originally Allocate memory for all CSRC:s //it will have memeory resouce problem so only allocate when // CSRC<2 - if ( aExtractParam->TRTP.numCSRC < KCSRCListMax ) + if ( aExtractParam->TRTP.numCSRC <= KCSRCListMax ) { if ( !aExtractParam->TRTP.CSRCarray ) { diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtppacketparam.cpp --- a/rtp/rtpstack/src/rtppacketparam.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtppacketparam.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -115,6 +115,7 @@ CSRCarray( NULL ), payloadData( NULL ), payloadDataLen( 0 ), + iCsrcList(0), extension() { } diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtprecvstream.cpp --- a/rtp/rtpstack/src/rtprecvstream.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtprecvstream.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -241,6 +241,11 @@ iHdr.iPadding = extractParam.TRTP.padding; iHdr.iExtension = extractParam.TRTP.fHeaderExtension; iHdr.iCsrcCount = extractParam.TRTP.numCSRC; + + if ( iHdr.iCsrcCount ) + { + iHdr.iCsrcList = extractParam.TRTP.CSRCarray; + } iHdr.iMarker = extractParam.TRTP.marker; iHdr.iTimestamp = streamParam.TRTP.timeStamp; diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtpsession.cpp --- a/rtp/rtpstack/src/rtpsession.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtpsession.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -573,6 +573,23 @@ } } + +// --------------------------------------------------------------------------- +// TInt CRtpSession::ReadyToSendRtpPacket() +// +// --------------------------------------------------------------------------- +// +void CRtpSession::ReadyToSendRtpPacket(TRtpId aTranStreamId) + { + if ( iRtpPacketObserver ) + { + RTP_DEBUG_DETAIL("Giving ReadyToSendRtpPacket() Call Back " ); + TPtr8 pktPtr(iPktSnd->Data(), iPktSnd->Size(), iPktSnd->Size()); + iRtpPacketObserver->ReadyToSendRtpPacket( aTranStreamId , pktPtr ); + } + } + + // --------------------------------------------------------------------------- // TInt CRtpSession::SendRtpPacket() // @@ -580,7 +597,8 @@ // TInt CRtpSession::SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, - const TDesC8& aPayloadData ) + const TDesC8& aPayloadData, + const TArray *aCsrcList ) { if ( static_cast (aPayloadData.Size()) > iCommNet->MaxSocketSize() ) { @@ -595,12 +613,16 @@ { CRtpTranStream* tempStream = ( CRtpTranStream* ) streamAddress; tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse, - iPktSnd ); + iPktSnd, aCsrcList ); + + ReadyToSendRtpPacket(aTranStreamId); + ret = iCommNet->Send( ERTPPort, iPktSnd->Des() ); } return ret; } + // --------------------------------------------------------------------------- // TInt CRtpSession::SendRtpPacket() // @@ -609,7 +631,8 @@ TInt CRtpSession::SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ) + TRequestStatus& aStatus, + const TArray *aCsrcList ) { if ( static_cast( aPayloadData.Size() ) > iCommNet->MaxSocketSize() ) { @@ -625,7 +648,10 @@ CRtpTranStream* tempStream = reinterpret_cast( streamAddress ); tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse, - iPktSnd ); + iPktSnd, aCsrcList ); + + ReadyToSendRtpPacket(aTranStreamId); + iCommNet->Send( ERTPPort, iPktSnd->Des(), aStatus ); } return ret; @@ -707,7 +733,8 @@ TRtpSequence aSequenceNum, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ) + TRequestStatus& aStatus, + const TArray *aCsrcList ) { if ( static_cast( aPayloadData.Size() ) > iCommNet->MaxSocketSize() ) { @@ -723,7 +750,10 @@ CRtpTranStream* tempStream = reinterpret_cast( streamAddress ); tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, aSequenceNum, - ETrue, iPktSnd ); + ETrue, iPktSnd, aCsrcList ); + + ReadyToSendRtpPacket(aTranStreamId); + iCommNet->Send( ERTPPort, iPktSnd->Des(), aStatus ); } return ret; @@ -1146,6 +1176,29 @@ } } + +// --------------------------------------------------------------------------- +// TInt CRtpSession::RegisterRtpPostProcessingObserver() +// +// --------------------------------------------------------------------------- +// +TInt CRtpSession::RegisterRtpPostProcessingObserver( MRtpPostProcessingObserver& aRTPPacketObserver ) + { + iRtpPacketObserver = &aRTPPacketObserver; + + return KErrNone; + } + +// --------------------------------------------------------------------------- +// CRtpSession::UnregisterRtpPostProcessingObserver() +// +// --------------------------------------------------------------------------- +// +void CRtpSession::UnregisterRtpPostProcessingObserver() + { + iRtpPacketObserver = NULL; + } + // --------------------------------------------------------------------------- // TInt CRtpSession::RegisterRtcpObserver() // diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtpsessionsrtp.cpp --- a/rtp/rtpstack/src/rtpsessionsrtp.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtpsessionsrtp.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -117,7 +117,8 @@ TInt CRtpSessionSrtp::SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, - const TDesC8& aPayloadData ) + const TDesC8& aPayloadData, + const TArray *aCsrcList ) { if ( static_cast (aPayloadData.Size()) > iCommNet->MaxSocketSize() ) { @@ -132,7 +133,7 @@ { CRtpTranStream* tempStream = ( CRtpTranStream* ) streamAddress; tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse, - iPktSnd ); + iPktSnd, aCsrcList ); if(iSndPacket) { @@ -159,7 +160,8 @@ TInt CRtpSessionSrtp::SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ) + TRequestStatus& aStatus, + const TArray *aCsrcList ) { if ( static_cast (aPayloadData.Size()) > iCommNet->MaxSocketSize() ) { @@ -174,7 +176,7 @@ { CRtpTranStream* tempStream = ( CRtpTranStream* ) streamAddress; tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse, - iPktSnd ); + iPktSnd, aCsrcList ); if(iSndPacket) { delete iSndPacket; @@ -202,7 +204,8 @@ TRtpSequence aSequenceNum, const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData, - TRequestStatus& aStatus ) + TRequestStatus& aStatus, + const TArray *aCsrcList ) { if ( static_cast( aPayloadData.Size() ) > iCommNet->MaxSocketSize() ) { @@ -218,7 +221,7 @@ CRtpTranStream* tempStream = reinterpret_cast( streamAddress ); tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, aSequenceNum, - ETrue, iPktSnd ); + ETrue, iPktSnd, aCsrcList ); if(iSndPacket) { delete iSndPacket; diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/src/rtptranstream.cpp --- a/rtp/rtpstack/src/rtptranstream.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/src/rtptranstream.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -187,7 +187,8 @@ const TDesC8& aPayloadData, TRtpSequence aSeqNum, TBool aSetSeqNum, - CRtpPacket* aPktSnd ) + CRtpPacket* aPktSnd, + const TArray *aCsrcList) { TRtpPacketStreamParam streamParam; TRtpPacketIOParam inParam; @@ -234,6 +235,21 @@ inParam.TRTP.payloadData = const_cast( aPayloadData.Ptr() ); inParam.TRTP.payloadDataLen = aPayloadData.Length(); + + if(aCsrcList && aCsrcList->Count()) + { + // Maxm 15 CSRC identifiers will be supported + if( aCsrcList->Count() <= KMaxCsrcIdentifiers ) + { + inParam.TRTP.numCSRC = (TUint8)aCsrcList->Count(); + } + else + { + inParam.TRTP.numCSRC = KMaxCsrcIdentifiers; + } + + inParam.TRTP.iCsrcList = aCsrcList; + } streamParam.TRTP.payload = aHeaderInfo.iPayloadType; diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/tsrc/ut_rtpstack/inc/UT_CRtpAPI.h --- a/rtp/rtpstack/tsrc/ut_rtpstack/inc/UT_CRtpAPI.h Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/tsrc/ut_rtpstack/inc/UT_CRtpAPI.h Wed Aug 18 10:07:48 2010 +0300 @@ -65,7 +65,8 @@ public MRtpObserver, public MNonRTPDataObserver, public MRtcpObserver, - public MSRTPReKeyingObserver + public MSRTPReKeyingObserver, + public MRtpPostProcessingObserver { public: // Constructors and destructors @@ -103,6 +104,8 @@ void SRTPMasterKeyStaleEvent(const CSRTPSession& aSession); void SRTPMasterKeyStaleEvent(const CSRTPStream& aStream); + void ReadyToSendRtpPacket( TRtpId aTranStreamId, TPtr8 &aPacket ); + private: // New methods void SetupL(); @@ -240,7 +243,12 @@ void UT_CRtpAPI_VersionL(); - + + void UT_CRtpAPI_RegisterRtpPostProcessingObserverL(); + + void UT_CRtpAPI_SendRtpPacketWithCSRCL(); + + void UT_CRtpAPI_UnregisterRtpPostProcessingObserverL(); private: // Data @@ -256,8 +264,9 @@ TBuf8<32> iMKI; TBuf8<32> iRFC3711_TestMasterKey128bits; TBuf8<32> iRFC3711_TestMasterSalt112bits; - TBuf8<32> iSalt; + TBuf8<32> iSalt; TBuf8<32> iKey; + TBool iIsCallBackReceived; }; #endif // __UT_CRTPAPI_H__ diff -r a858c2cf6a45 -r 7cdef8deefa0 rtp/rtpstack/tsrc/ut_rtpstack/src/UT_CRtpAPI.cpp --- a/rtp/rtpstack/tsrc/ut_rtpstack/src/UT_CRtpAPI.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/rtp/rtpstack/tsrc/ut_rtpstack/src/UT_CRtpAPI.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -68,6 +68,8 @@ #endif _LIT8(KHello, "hello...testing"); +_LIT8(KNoCName, ""); + // CONSTRUCTION UT_CRtpAPI* UT_CRtpAPI::NewL() { @@ -1422,6 +1424,7 @@ { iErr= aErrCode; } + //from Obs void UT_CRtpAPI::RtpPacketReceived( TRtpId /*aStreamId*/, const TRtpRecvHeader& /*aHeaderInfo*/, @@ -1471,6 +1474,279 @@ { } + +void UT_CRtpAPI::ReadyToSendRtpPacket( TRtpId /*aTranStreamId*/, TPtr8 &/*aPacket*/ ) + { + // RTP Packet Callback received + iIsCallBackReceived = ETrue; + } + + +void UT_CRtpAPI::UT_CRtpAPI_RegisterRtpPostProcessingObserverL( ) + { + TInt result(KErrNone); + TRtpSdesParams params; + + result = iRtpAPI->OpenL( params, NULL, NULL, NULL ); + EUNIT_ASSERT(result==KErrNone); + + TRequestStatus status; + result = iRtpAPI->StartConnection( status, KDefaultIap2 ); // KDefaultIap + RTP_EUNIT_ASSERT_EQUALS ( result, KErrNone ); + // Wait until the connection is really up + User::WaitForRequest( status ); + + //create session + TCreateSessionParams sessionParams; + sessionParams.iPriority = TCreateSessionParams::EPriorityStandard; + sessionParams.iSocketBufSize = KSocketBufSize; + TUint port( 5000 ); + TBool enableRtcp( EFalse ); + TRtcpParams rtcpParams; + rtcpParams.iRtcpFraction = 0.10; + rtcpParams.iRtcpTimeOut = 0; + rtcpParams.iSessionBWidth = 32000; + + TRtpId error( KNullId ); + error = iRtpAPI->CreateSessionL( sessionParams, + port, + enableRtcp, + &rtcpParams ); + RTP_EUNIT_ASSERT_RTP_ID( error ); + + TRcvStreamParams recvparams; + recvparams.iPayloadType = 0; + + TRtpId error2( KNullId ); + TInt err( KErrNone ); + error2 = iRtpAPI->CreateReceiveStreamL( error /*session id*/, recvparams ); + RTP_EUNIT_ASSERT_RTP_ID ( error2 ); + + + err = iRtpAPI->RegisterRtpPostProcessingObserver( error, *this ); + EUNIT_ASSERT ( err == KErrNone ) + } + + +void UT_CRtpAPI::UT_CRtpAPI_SendRtpPacketWithCSRCL() + { + TInt result(KErrNone); + TRtpSdesParams params; + + result = iRtpAPI->OpenL( params, NULL, NULL, NULL ); + RTP_EUNIT_ASSERT_EQUALS(result, KErrNone); + + TRequestStatus status; + result = iRtpAPI->StartConnection( status, KDefaultIap ); // KDefaultIap + RTP_EUNIT_ASSERT_EQUALS ( result, KErrNone ); + // Wait until the connection is really up + User::WaitForRequest( status ); + + //create session + TCreateSessionParams sessionParams; + sessionParams.iPriority = TCreateSessionParams::EPriorityStandard; + sessionParams.iSocketBufSize = KSocketBufSize; + TUint port( 5000 ); + TBool enableRtcp( EFalse ); + TRtcpParams rtcpParams; + rtcpParams.iRtcpFraction = 0.10; + rtcpParams.iRtcpTimeOut = 0; + rtcpParams.iSessionBWidth = 32000; + + TRtpId error( KNullId ); + error = iRtpAPI->CreateSessionL( sessionParams, + port, + enableRtcp, + &rtcpParams ); + RTP_EUNIT_ASSERT_RTP_ID( error ); + + TTranStreamParams transparams; + transparams.iPayloadType = 0; + TRtpSSRC ssrc( 0 ); + + TInt err( KErrNone ); + err = iRtpAPI->RegisterRtpPostProcessingObserver( error, *this ); + EUNIT_ASSERT ( err == KErrNone ) + + + err = iRtpAPI->CreateTransmitStreamL( error /*session id*/, transparams, ssrc ); + RTP_EUNIT_ASSERT_RTP_ID ( err ); + + + TRtpSendHeader header; + header.iHeaderExtension = NULL; + header.iMarker = 0; + header.iPadding = 0; + header.iPayloadType = 0; + header.iTimestamp = 10; + + HBufC8* data = HBufC8::NewLC(KLength); + data->Des().Copy(KHello); + CleanupStack::Pop(data); + + TRtpSendPktParams *headerinfo = new(ELeave) TRtpSendPktParams(header); + headerinfo->iTranStreamId = err; + headerinfo->iPayloadData.Set(data->Des()); + + const TUint KArrayGranularity = 15; + + CArrayFixFlat* fix; + fix = new(ELeave) CArrayFixFlat(KArrayGranularity); + + fix->AppendL(123456); + fix->AppendL(999999); + + TInt error2( KErrNone ); + iIsCallBackReceived = EFalse; + // Try sending synchronously with Csrc + error2 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array()); + RTP_EUNIT_ASSERT_EQUALS ( error2, KErrNone ); + + CRtpSession* rtpSession = iRtpAPI->iManager->GetSession( err ); + User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus ); + rtpSession->iCommNet->iSender[ERTPPort]->RunL(); + rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); + EUNIT_ASSERT(iIsCallBackReceived == ETrue); + + iIsCallBackReceived = EFalse; + // Try sending asynchronously with CSRC + headerinfo->iStatus = &status; + error2 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array()); + RTP_EUNIT_ASSERT_EQUALS ( error2, KErrNone ); + EUNIT_ASSERT( KRequestPending == status.Int() ); + User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus ); + rtpSession->iCommNet->iSender[ERTPPort]->RunL(); + rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); + User::WaitForRequest( status ); + EUNIT_ASSERT( KErrNone == status.Int() ); + // Is call back received check + EUNIT_ASSERT(iIsCallBackReceived == ETrue); + + iIsCallBackReceived = EFalse; + // Try sending asynchronously, specifying the sequence number with CSRC + TRtpSequence seqNum = 42; + headerinfo->iSequenceNum = &seqNum; + error2 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array()); + RTP_EUNIT_ASSERT_EQUALS ( error2, KErrNone ); + EUNIT_ASSERT( KRequestPending == status.Int() ); + User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus ); + rtpSession->iCommNet->iSender[ERTPPort]->RunL(); + rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); + User::WaitForRequest( status ); + EUNIT_ASSERT( KErrNone == status.Int() ); + EUNIT_ASSERT(iIsCallBackReceived == ETrue); + + delete fix; + delete headerinfo; + delete data; + } + + +void UT_CRtpAPI::UT_CRtpAPI_UnregisterRtpPostProcessingObserverL( ) + { + TInt result(KErrNone); + TRtpSdesParams params; + + result = iRtpAPI->OpenL( params, NULL, NULL, NULL ); + EUNIT_ASSERT(result==KErrNone); + + TRequestStatus status; + result = iRtpAPI->StartConnection( status, KDefaultIap2 ); // KDefaultIap + RTP_EUNIT_ASSERT_EQUALS ( result, KErrNone ); + // Wait until the connection is really up + User::WaitForRequest( status ); + + //create session + TCreateSessionParams sessionParams; + sessionParams.iPriority = TCreateSessionParams::EPriorityStandard; + sessionParams.iSocketBufSize = KSocketBufSize; + TUint port( 5000 ); + TBool enableRtcp( EFalse ); + TRtcpParams rtcpParams; + rtcpParams.iRtcpFraction = 0.10; + rtcpParams.iRtcpTimeOut = 0; + rtcpParams.iSessionBWidth = 32000; + + TRtpId error( KNullId ); + error = iRtpAPI->CreateSessionL( sessionParams, + port, + enableRtcp, + &rtcpParams ); + RTP_EUNIT_ASSERT_RTP_ID( error ); + + TRcvStreamParams recvparams; + recvparams.iPayloadType = 0; + + TRtpId error2( KNullId ); + TInt err( KErrNone ); + error2 = iRtpAPI->CreateReceiveStreamL( error /*session id*/, recvparams ); + RTP_EUNIT_ASSERT_RTP_ID ( error2 ); + + TTranStreamParams transparams; + transparams.iPayloadType = 0; + TRtpSSRC ssrc( 0 ); + + err = iRtpAPI->RegisterRtpPostProcessingObserver( error, *this ); + EUNIT_ASSERT ( err == KErrNone ) + + err = iRtpAPI->CreateTransmitStreamL( error /*session id*/, transparams, ssrc ); + RTP_EUNIT_ASSERT_RTP_ID ( err ); + + + TRtpSendHeader header; + header.iHeaderExtension = NULL; + header.iMarker = 0; + header.iPadding = 0; + header.iPayloadType = 0; + header.iTimestamp = 10; + + HBufC8* data = HBufC8::NewLC(KLength); + data->Des().Copy(KHello); + CleanupStack::Pop(data); + + TRtpSendPktParams *headerinfo = new(ELeave) TRtpSendPktParams(header); + headerinfo->iTranStreamId = err; + headerinfo->iPayloadData.Set(data->Des()); + + const TUint KArrayGranularity = 15; + + CArrayFixFlat* fix; + fix = new(ELeave) CArrayFixFlat(KArrayGranularity); + + fix->AppendL(123456); + fix->AppendL(999999); + + TInt error3( KErrNone ); + iIsCallBackReceived = EFalse; + // Try sending synchronously with Csrc + error3 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array()); + RTP_EUNIT_ASSERT_EQUALS ( error3, KErrNone ); + + CRtpSession* rtpSession = iRtpAPI->iManager->GetSession( err ); + User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus ); + rtpSession->iCommNet->iSender[ERTPPort]->RunL(); + rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); + EUNIT_ASSERT(iIsCallBackReceived == ETrue); + + // Unregister callback + iRtpAPI->UnregisterRtpPostProcessingObserver(error); + + iIsCallBackReceived = EFalse; + error3 = KErrNone; + // Try sending synchronously with Csrc + error3 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array()); + RTP_EUNIT_ASSERT_EQUALS ( error3, KErrNone ); + + User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus ); + rtpSession->iCommNet->iSender[ERTPPort]->RunL(); + rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus(); + EUNIT_ASSERT(iIsCallBackReceived == EFalse); + + delete fix; + delete headerinfo; + delete data; + } + // TEST TABLE EUNIT_BEGIN_TEST_TABLE( @@ -1799,8 +2075,30 @@ "Version", "FUNCTIONALITY", SetupL, UT_CRtpAPI_VersionL, Teardown) + +EUNIT_TEST( + "RegisterRtpPostProcessingObserver - test ", + "CRtpAPI", + "RegisterRtpPostProcessingObserver", + "FUNCTIONALITY", + SetupL, UT_CRtpAPI_RegisterRtpPostProcessingObserverL, Teardown) +EUNIT_TEST( + "SendRtpPacketWithCSRC - test ", + "CRtpAPI", + "SendRtpPacket", + "FUNCTIONALITY", + SetupL, UT_CRtpAPI_SendRtpPacketWithCSRCL, Teardown) + +EUNIT_TEST( + "UnregisterRtpPostProcessingObserver - test ", + "CRtpAPI", + "UnregisterRtpPostProcessingObserver", + "FUNCTIONALITY", + SetupL, UT_CRtpAPI_UnregisterRtpPostProcessingObserverL, Teardown) + + EUNIT_END_TEST_TABLE // END OF FILE diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippdevmgmtsipadapter/inc/smldmsipadapterconstants.h --- a/sipplugins/sippdevmgmtsipadapter/inc/smldmsipadapterconstants.h Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippdevmgmtsipadapter/inc/smldmsipadapterconstants.h Wed Aug 18 10:07:48 2010 +0300 @@ -77,6 +77,8 @@ "DestinationNetwork" ); _LIT8( KNSmlDMSIPSigQos, "SignalingQoS" ); +_LIT8( KNSmlDMSIPBearerID, + "BearerID" ); // Explanations of parameters _LIT8( KNSmlDMSIPNodeNameExp, @@ -127,6 +129,8 @@ "Reference to Destination Network" ); _LIT8( KNSmlDMSIPSigQosExp, "Signaling QoS" ); +_LIT8( KNSmlDMSIPBearerIDExp, + "Bearer ID" ); // For SIP URI. // References: OMA DM MO for Nokia SIP and IETF RFC3261. diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippdevmgmtsipadapter/src/nsmldmsipadapter.cpp --- a/sipplugins/sippdevmgmtsipadapter/src/nsmldmsipadapter.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippdevmgmtsipadapter/src/nsmldmsipadapter.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -499,6 +499,16 @@ sigQos.SetDFFormatL( MSmlDmDDFObject::EInt ); sigQos.AddDFTypeMimeTypeL( KNSmlDMSIPTextPlain ); sigQos.SetDescriptionL( KNSmlDMSIPSigQosExp ); + + //Bearer ID + MSmlDmDDFObject& bearerid = idNode.AddChildObjectL( KNSmlDMSIPBearerID ); + bearerid.SetAccessTypesL( accessTypesGetReplaceAdd ); + bearerid.SetOccurenceL( MSmlDmDDFObject::EZeroOrOne ); + bearerid.SetScopeL( MSmlDmDDFObject::EDynamic ); + bearerid.SetDFFormatL( MSmlDmDDFObject::EInt ); + bearerid.AddDFTypeMimeTypeL( KNSmlDMSIPTextPlain ); + bearerid.SetDescriptionL( KNSmlDMSIPBearerIDExp ); + DBG_PRINT("CNSmlDmSIPAdapter::DDFStructureL(): end"); } @@ -856,6 +866,22 @@ } } + // SIP/x/BearerId + if ( KNSmlDMSIPBearerID() == lastUriSeg ) + { + TUint32 bearerid = DesToInt( aObject ); + if ( bearerid ) + { + err = iProfiles->At( profileID )->SetParameter( + KBearerType, bearerid ); + } + else + { + status = CSmlDmAdapter::EInvalidObject; + } + } + + // ============================== // OutboundProxy settings node // ============================== @@ -1260,6 +1286,16 @@ sigQos >>= 2; segmentResult.Num( sigQos ); } + + // SIP/x/BearerId + if ( KNSmlDMSIPBearerID() == lastUriSeg ) + { + TUint32 bearerid; + err = iProfiles->At( profileID )->GetParameter( + KBearerType, bearerid ); + segmentResult.Num( bearerid ); + } + // Set error if fetch failed. if ( -1 > err ) @@ -1520,6 +1556,12 @@ segmentName ); currentURISegmentList->InsertL( currentURISegmentList->Size(), KNSmlDMSIPSeparator8 ); + + segmentName.Copy( KNSmlDMSIPBearerID ); + currentURISegmentList->InsertL( currentURISegmentList->Size(), + segmentName ); + currentURISegmentList->InsertL( currentURISegmentList->Size(), + KNSmlDMSIPSeparator8 ); } // SIP/x/OutboundProxy @@ -1821,7 +1863,11 @@ } } } - return aURI.Left( i ); + + if(i < 0) + return aURI.Left(i+1); + else + return aURI.Left( i ); } // --------------------------------------------------------------------------- diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippdevmgmtsipadapter/tsrc/UT_CNSmlDmSIPAdapter/Group/ut_cnsmldmsipadapter.mmp --- a/sipplugins/sippdevmgmtsipadapter/tsrc/UT_CNSmlDmSIPAdapter/Group/ut_cnsmldmsipadapter.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippdevmgmtsipadapter/tsrc/UT_CNSmlDmSIPAdapter/Group/ut_cnsmldmsipadapter.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -41,11 +41,6 @@ USERINCLUDE ../../../inc USERINCLUDE ../inc -#if defined ( OS_LAYER_SYSTEMINCLUDE ) -OS_LAYER_SYSTEMINCLUDE -#else -SYSTEMINCLUDE /epoc32/include -#endif MW_LAYER_SYSTEMINCLUDE LIBRARY bafl.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippsipadapter/inc/CWPSIPItem.h --- a/sipplugins/sippsipadapter/inc/CWPSIPItem.h Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippsipadapter/inc/CWPSIPItem.h Wed Aug 18 10:07:48 2010 +0300 @@ -488,6 +488,9 @@ * @param aSigQos Signalling QoS value. */ void SetSigQos( TUint32 aSigQos ); + + void SetBearerID(TUint32 aBearerId); + TUint32 GetBearerID(); private: @@ -686,6 +689,8 @@ * Signalling QoS value. */ TUint32 iSigQos; + + TUint32 iBearerId; private: //friend class UT_CWPSIPItem; // For testing purposes. diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp --- a/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -52,6 +52,7 @@ _LIT( KParmLOCK, "LOCK" ); _LIT( KParmAUTOREG, "AUTOREG" ); _LIT( KParmSIGQOS, "SIGQOS" ); +_LIT( KParmBearerID, "PBEARERID" ); // For other purposes. const TUint32 KNotSet = 0xffffffff; @@ -501,6 +502,14 @@ iCurrentSIPItem->SetSigQos( parmVal ); } } + + else if(aParameter.Name() == KParmBearerID ) + { + TInt bearerid; + TLex8 lex( tmpValue->Des() ); + User::LeaveIfError( lex.Val( bearerid ) ); + iCurrentSIPItem->SetBearerID((TUint32) bearerid ); + } break; } case EWPParameterAppRef: diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippsipadapter/src/CWPSIPItem.cpp --- a/sipplugins/sippsipadapter/src/CWPSIPItem.cpp Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippsipadapter/src/CWPSIPItem.cpp Wed Aug 18 10:07:48 2010 +0300 @@ -146,6 +146,7 @@ iToAppRef = HBufC8::NewL( 0 ); iNetwork = HBufC::NewL( 0 ); iSnapId = KErrNotFound; + iBearerId = 0; SetSigQos( 40 ); DBG_PRINT( "CWPSIPItem::ConstructL - end" ); } @@ -1007,7 +1008,9 @@ // Signalling QoS parameter. cSIPManagedProfile->SetParameter( KSIPSoIpTOS, iSigQos ); - + + cSIPManagedProfile->SetParameter( KBearerType, iBearerId ); + // Stores SIP profile to permanent storage cSIPManagedProfileRegistry->SaveL( *cSIPManagedProfile ); @@ -1259,4 +1262,14 @@ iSigQos = tosBits; } + +void CWPSIPItem::SetBearerID(TUint32 aBearerId) +{ +iBearerId = aBearerId; +} + +TUint32 CWPSIPItem:: GetBearerID() +{ +return iBearerId; +} // End of file. diff -r a858c2cf6a45 -r 7cdef8deefa0 sipplugins/sippsipadapter/tsrc/ut_cwpsipadapter/group/T_SIPAdapter.mmp --- a/sipplugins/sippsipadapter/tsrc/ut_cwpsipadapter/group/T_SIPAdapter.mmp Tue Jul 06 14:39:54 2010 +0300 +++ b/sipplugins/sippsipadapter/tsrc/ut_cwpsipadapter/group/T_SIPAdapter.mmp Wed Aug 18 10:07:48 2010 +0300 @@ -36,12 +36,6 @@ USERINCLUDE ../inc USERINCLUDE ../../../inc -#if defined ( OS_LAYER_SYSTEMINCLUDE ) -OS_LAYER_SYSTEMINCLUDE -#else -SYSTEMINCLUDE /epoc32/include -#endif - MW_LAYER_SYSTEMINCLUDE LIBRARY EUnit.lib diff -r a858c2cf6a45 -r 7cdef8deefa0 sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconevents.h --- a/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconevents.h Tue Jul 06 14:39:54 2010 +0300 +++ b/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconevents.h Wed Aug 18 10:07:48 2010 +0300 @@ -21,6 +21,7 @@ @publishedAll @released since v9.2 */ +#warning "SIPProvider APIs are deprecated, use SIP Client Library APIs instead." #ifndef SIPSCPR_SUBCONEVENTS_H #define SIPSCPR_SUBCONEVENTS_H @@ -44,7 +45,8 @@ /** CSubConSIPResponseEvent is used to get and set the response elements of the most recent response @publishedAll -@released since v9.2 */ +@deprecated +*/ { public: /** @@ -77,7 +79,8 @@ /** CSubConSIPAuthenticationRequiredEvent is used when SIP authentication is required @publishedAll -@released since v9.2 */ +@deprecated +*/ { public: @@ -102,7 +105,8 @@ /** CSubConSIPNotificationEvent is used for receiving SIP event notifications @publishedAll -@released since v9.2 */ +@deprecated + */ { public: inline static CSubConSIPNotificationEvent* NewL(); @@ -126,7 +130,7 @@ /** Factory used to create instances of the SIP SubConnection Extension Events @publishedAll -@released since v9.2 +@deprecated */ { public: diff -r a858c2cf6a45 -r 7cdef8deefa0 sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconparams.h --- a/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconparams.h Tue Jul 06 14:39:54 2010 +0300 +++ b/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconparams.h Wed Aug 18 10:07:48 2010 +0300 @@ -21,7 +21,7 @@ @publishedAll @released since v9.2 */ - +#warning "SIPProvider APIs are deprecated, use SIP Client Library APIs instead." #ifndef SIP_SUBCONPARAMS_H #define SIP_SUBCONPARAMS_H @@ -45,7 +45,7 @@ This contains the SIP Invite parameters that will be passed via subconnection to the SIP stack @publishedAll -@released since v9.2 +@deprecated */ { public: @@ -123,7 +123,7 @@ This contains the SIP Subscribe parameters that will be passed via subconnection to the SIP stack @publishedAll -@released since v9.2 +@deprecated */ { public: @@ -212,7 +212,7 @@ This contains the SIP Authenticate parameters that will be passed via subconnection to the SIP stack @publishedAll -@released since v9.2 +@deprecated */ { public: @@ -265,7 +265,7 @@ /** Factory used to create instances of the SIP SubConnection Parameter Extension Sets. @publishedAll -@released since v9.2 +@depricated */ { public: diff -r a858c2cf6a45 -r 7cdef8deefa0 sipproviderplugins/sipprovider/sipconnectionplugins/inc/sipconnpref.h --- a/sipproviderplugins/sipprovider/sipconnectionplugins/inc/sipconnpref.h Tue Jul 06 14:39:54 2010 +0300 +++ b/sipproviderplugins/sipprovider/sipconnectionplugins/inc/sipconnpref.h Wed Aug 18 10:07:48 2010 +0300 @@ -20,6 +20,7 @@ @publishedAll @released since v9.2 */ +#warning "SIPProvider APIs are deprecated, use SIP Client Library APIs instead." #ifndef SIPCONNPREFS_H @@ -48,7 +49,7 @@ /** This contains the information about the type of the connection preferences used by the SIP in the form of the profiles @publishedAll -@released since v9.2 +@deprecated */ { public: