Revision: 201019 RCL_3 PDK_3.0.0
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 13:04:58 +0300
branchRCL_3
changeset 20 a7d1e54a7332
parent 19 8517a9ac4a23
child 26 822e1f077722
Revision: 201019 Kit: 2010121
realtimenetprots/rtp/shimrtp/eabi/rtpmu.def
realtimenetprots/rtp/shimrtp/src/rtp/rtcp.cpp
realtimenetprots/rtp/shimrtp/src/stubs/rtcp_stub.cpp
realtimenetprots/sipfw/Data/101F413C.txt
realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileCacheItem.h
realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h
realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp
realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp
realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileStateUnregistered.cpp
realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp
realtimenetprots/sipfw/conf/sipframework_101f413c.crml
realtimenetprots/sipfw/rom/sipsw.iby
sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp
sipplugins/sippsipsettingsui/src/SipSettIntegerEditItem.cpp
--- a/realtimenetprots/rtp/shimrtp/eabi/rtpmu.def	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/rtp/shimrtp/eabi/rtpmu.def	Tue May 25 13:04:58 2010 +0300
@@ -116,4 +116,5 @@
 	_ZN20RRtpSession_Internal36SetPrePostProcessingRegisterCallbackEP26MPrePostProcessingCallback @ 115 NONAME
 	_ZN20RRtpSession_Internal5OpenLER11RSocketServR9TSockAddrS3_iR14RSubConnectioniRK6TDesC8 @ 116 NONAME
 	_ZN14RRtpSendPacket5CloseEv @ 117 NONAME
+	_ZNK11RRtcpRRItem10SenderSSRCEv @ 118 NONAME
 
--- a/realtimenetprots/rtp/shimrtp/src/rtp/rtcp.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/rtp/shimrtp/src/rtp/rtcp.cpp	Tue May 25 13:04:58 2010 +0300
@@ -70,6 +70,12 @@
 	return iPtr->dlsr;
 	}
 
+EXPORT_C TUint RRtcpRRItem::SenderSSRC() const
+	{
+	__RTP_LOG(_L("RRtcpSRItem::SenderSSRC() ... "));
+	return AboutSSRC();
+	}
+	
 
 /******/
 EXPORT_C RRtcpRRPart::RRtcpRRPart(TRtcpRRPart& aRR) :iRRPart(aRR)
--- a/realtimenetprots/rtp/shimrtp/src/stubs/rtcp_stub.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/rtp/shimrtp/src/stubs/rtcp_stub.cpp	Tue May 25 13:04:58 2010 +0300
@@ -70,6 +70,11 @@
 	return 0;
 	}
 
+EXPORT_C TUint RRtcpRRItem::SenderSSRC() const
+	{
+	ASSERT(0);
+	return 0;
+	}
 
 /******/
 EXPORT_C RRtcpRRPart::RRtcpRRPart(TRtcpRRPart& aRR) :iRRPart(aRR)
Binary file realtimenetprots/sipfw/Data/101F413C.txt has changed
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileCacheItem.h	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileCacheItem.h	Tue May 25 13:04:58 2010 +0300
@@ -290,6 +290,18 @@
         */
 		TBool IsShutdownInitiated() const;
 		
+      /**
+        * System is about to go in Offline Mode
+        */
+        void OfflineInitiated(TBool aOfflineInitiated);
+
+        /**
+        * Tells if system is about to be Offline.
+        * @return ETrue if system Offline has been initiated
+        *         EFalse otherwise
+        */
+        TBool IsOfflineInitiated() const;
+		
 		/**
         * System is about to be shut down.
         */
@@ -554,11 +566,7 @@
 		* @param aStatus Status of the profile
 		*/
 		void HandleProfileError(TInt aError, 
-			CSIPConcreteProfile& aProfile);
-		/**
-		 * Function resets the boolean variable iIsShutdownInitiated
-		 */
-		void ResetShutdownvariable();
+			CSIPConcreteProfile& aProfile);		
 
 	private:
 
@@ -647,6 +655,9 @@
 		// ETrue if system shutdown has been initiated
 		TBool 						iIsShutdownInitiated;
 		
+		//ETrue if system offline has been initiated
+		TBool                       iIsOfflineInitiated;                    
+		
 		// ETrue if Rfs has been initiated
 		TBool                       iIsRfsInprogress;
 
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h	Tue May 25 13:04:58 2010 +0300
@@ -493,7 +493,7 @@
 		*Starts timer of type CDeltaTimer, 
 		*which callback is ConnectionCloseTimerExpired function
 		*/
-		void StartConnectionCloseTimer();
+		void StartConnectionCloseTimer(TInt aValue);
 		
 		/**
 		* A callback for CDeltaTimer
@@ -835,8 +835,6 @@
 		//ApnManager
 		CSIPApnManager*                     iApnManager; // iBackupApnSettings;
 		RArray<TStoreSwitchEnabledProfile>                iWaitForApnSettings;
-
-		TBool 								iOfflineEventReceived;
 		
 		TBool									iFeatMgrInitialized;
 		
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp	Tue May 25 13:04:58 2010 +0300
@@ -87,6 +87,7 @@
 	iIsVpnInUse = EFalse;
 	iInitialApnSelected = EFalse;
 	iApnSwitchEnabled = EFalse;
+	iIsOfflineInitiated = EFalse;
 	iDeltaTimerEntry.Set(iDeltaTimerCallBack);
 	}
 
@@ -1357,14 +1358,6 @@
 	iServerCore.SendErrorEvent(
 		*this, CSIPConcreteProfile::ERegistrationInProgress, KErrCancel );
 	}
-// -----------------------------------------------------------------------------
-// CSIPProfileCacheItem::ResetShutdownvariable
-// -----------------------------------------------------------------------------
-//
-void CSIPProfileCacheItem::ResetShutdownvariable()
-    {    
-    iIsShutdownInitiated = EFalse;
-    }
 
 // -----------------------------------------------------------------------------
 // CSIPProfileCacheItem::DefaultSNAPL
@@ -1384,3 +1377,28 @@
 		PROFILE_DEBUG3("CSIPProfileCacheItem::DefaultSNAPL with Value: ", aSnapId)
 		CleanupStack::PopAndDestroy();
 	}
+
+// -----------------------------------------------------------------------------
+// CSIPProfileCacheItem::OfflineInitiated
+// -----------------------------------------------------------------------------
+//
+void CSIPProfileCacheItem::OfflineInitiated(TBool aOfflineInitiated)
+    {
+    if(aOfflineInitiated)
+        {
+        iIsOfflineInitiated = ETrue;
+        iCurrentState->ShutdownInitiated(*this);
+        }
+    else
+        iIsOfflineInitiated = EFalse;    
+    }
+
+// -----------------------------------------------------------------------------
+// CSIPProfileCacheItem::IsOfflineInitiated
+// -----------------------------------------------------------------------------
+//
+TBool CSIPProfileCacheItem::IsOfflineInitiated() const
+    {
+    return iIsOfflineInitiated;
+    }
+
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp	Tue May 25 13:04:58 2010 +0300
@@ -57,6 +57,7 @@
 
 const TInt KMicroSecInSec = 1000000;
 const TInt KIdleTimer = 2;
+const TInt KOfflineTimer = 5;
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -171,8 +172,6 @@
     iNotify = CSIPProfileStorageSecureBackup::NewL(this);
     
     iServer = CSIPProfileCSServer::NewL(*this);
-	
-	iOfflineEventReceived = EFalse;
     
     PROFILE_DEBUG1("ProfileServer started")
     }
@@ -291,8 +290,11 @@
             	}
         		
         	}
+        
+        //For Profiles which were in RegInProgress and has moved to Registered State,
+        //needs to be deregistered if Offline or RFs or Vpn if in Use has been triggered.
         TBool eventCompleted = EFalse;
-        if(item && (item->IsRfsInprogress() || iOfflineEventReceived ||
+        if(item && (item->IsRfsInprogress() || item->IsOfflineInitiated()  ||
                 (FeatureManager::FeatureSupported( KFeatureIdFfImsDeregistrationInVpn )&& 
                         item->IsVpnInUse())))
             {
@@ -305,19 +307,30 @@
                     {
                     count--;
                     }
-                else if (status == CSIPConcreteProfile::ERegistered )
+                else if (status == CSIPConcreteProfile::ERegistered)
                     {
-                    iProfileCache[i]->ShutdownInitiated();
-                    }
-                }
+                    if(item->IsOfflineInitiated())
+                        {                        
+                        //Don't do anything. If the ProfileStatusEvent = Registered in Offline, it
+                        //will only be for WLAN so don't deregister it. If ProfileStatusEvent = Deregistered
+                        //means application triggered deregistration so ProfileAgent should not attempt registering it.
+                        }
+                    else
+                        {
+                        iProfileCache[i]->ShutdownInitiated();
+                        }
+                    } //end if unregistered
             if ( !count )
                 eventCompleted = ETrue;
-            }
+                } //end for
+            } //end outer if
+        
+        
         if(eventCompleted)
             {
             if (item->IsRfsInprogress())
-                StartConnectionCloseTimer();
-            else if(iOfflineEventReceived)
+                StartConnectionCloseTimer(KIdleTimer);
+            else if(item->IsOfflineInitiated() )
                 ConfirmSystemstateMonitor(CSipSystemStateMonitor::ESystemState);
             else if((FeatureManager::FeatureSupported( KFeatureIdFfImsDeregistrationInVpn )&& 
                         item->IsVpnInUse()))
@@ -444,50 +457,56 @@
     {
     PROFILE_DEBUG3("CSIPProfileServerCore::SystemVariableUpdated System State changed to value", aValue)
     
-    //If the SystemState is Offline, turn the boolean variable to true so that Profile-Server
-    //can indicate System State monitor that event processing is completed, provided all the 
-    //profiles have got deregistered
-    if (CSipSystemStateMonitor::ESystemOffline == aValue)
-        iOfflineEventReceived = ETrue;
-    
-	if ( aVariable == CSipSystemStateMonitor::ESystemState &&
-	     (aValue == CSipSystemStateMonitor::ESystemShuttingDown || 
-	     aValue == CSipSystemStateMonitor::ESystemOffline
-			 ))
+	if ( aVariable == CSipSystemStateMonitor::ESystemState )
 	    {   
-	    TBool waitForDeregistration = EFalse;
-        for (TInt i = 0; i < iProfileCache.Count(); i++)
-            {
-            iProfileCache[i]->ShutdownInitiated();
-            CSIPConcreteProfile::TStatus status;
-            iPluginDirector->State(status, iProfileCache[i]->UsedProfile());
-            if(status != CSIPConcreteProfile::EUnregistered)
-                waitForDeregistration = ETrue;            
-            }
-        if(!waitForDeregistration)
-            {
-            ConfirmSystemstateMonitor(CSipSystemStateMonitor::ESystemState);
-            }
-	    }
-	//If the System State is Online, register all the profiles in always on mode
-	else if(aVariable == CSipSystemStateMonitor::ESystemState && 
-		aValue == CSipSystemStateMonitor::ESystemOnline)
-		{
-		iOfflineEventReceived = EFalse;
-		for (TInt i = 0; i < iProfileCache.Count(); i++)
-		    {
-		    iProfileCache[i]->ResetShutdownvariable();
-		    CSIPProfileCacheItem* item = iProfileCache[i];
-		    if (iProfileCache[i]->IsReferred())
-		        {
-                TRAPD(err, item->StartRegisterL(*iWaitForIAP, *iRegInProg, ETrue));
-		        if (err != KErrNone)
-		            {
-		            HandleAsyncError(*item,CSIPConcreteProfile::ERegistrationInProgress,err);
-		            }
-				}
-			}
-		}
+            // If the System is Shutting down
+            if(aValue == CSipSystemStateMonitor::ESystemShuttingDown)
+                {                
+                for (TInt i = 0; i < iProfileCache.Count(); i++)
+                    {
+                    iProfileCache[i]->ShutdownInitiated();                                
+                    }                
+                } //end if Shutdown
+            
+            //If the System receives Offline event
+            if(aValue == CSipSystemStateMonitor::ESystemOffline)
+                {                
+                StartConnectionCloseTimer(KOfflineTimer);
+                TBool waitForDeregistration = EFalse;
+                for (TInt i = 0; i < iProfileCache.Count(); i++)
+                    {
+                    iProfileCache[i]->OfflineInitiated(ETrue);
+                    CSIPConcreteProfile::TStatus status;
+                    iPluginDirector->State(status, iProfileCache[i]->UsedProfile());
+                    if(status != CSIPConcreteProfile::EUnregistered)
+                        waitForDeregistration = ETrue;            
+                    }
+                if(!waitForDeregistration)
+                    {
+                    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 SystemState    
 	else if(aVariable == CSipSystemStateMonitor::ERfsState)
 	    {
 	    if(aValue == CSipSystemStateMonitor::ERfsStarted)
@@ -2136,11 +2155,11 @@
 // CSIPProfileServerCore::StartConnectionCloseTimer
 // -----------------------------------------------------------------------------
 //
-void CSIPProfileServerCore::StartConnectionCloseTimer()
+void CSIPProfileServerCore::StartConnectionCloseTimer(TInt aValue)
 	{
 	PROFILE_DEBUG1("CSIPProfileServerCore::StartConnectionCloseTimer")
 	iDeltaTimer->Remove(iDeltaTimerEntry);
-	TTimeIntervalMicroSeconds32 interval(KMicroSecInSec * KIdleTimer);
+	TTimeIntervalMicroSeconds32 interval(KMicroSecInSec * aValue);
 	iDeltaTimer->Queue(interval, iDeltaTimerEntry);
 	}
 
@@ -2152,7 +2171,33 @@
 	{
 	PROFILE_DEBUG1("CSIPProfileServerCore::ConnectionCloseTimerExpired")
 	CSIPProfileServerCore* self = reinterpret_cast<CSIPProfileServerCore*>(aPtr);
-  	self->ConfirmSystemstateMonitor(CSipSystemStateMonitor::ERfsState);
+	
+	TBool IsOffline = self->iProfileCache[0]->IsOfflineInitiated();
+	if(IsOffline)
+	    {
+	    self->ConfirmSystemstateMonitor(CSipSystemStateMonitor::ESystemState);	    	        
+        for (TInt i = 0; i < self->iProfileCache.Count(); i++)
+            {            
+            CSIPProfileCacheItem* item = self->iProfileCache[i];
+            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) 
+                {                
+                TRAPD(err, item->StartRegisterL(*(self->iWaitForIAP), *(self->iRegInProg), ETrue));
+                if (err != KErrNone)
+                    {
+                    self->HandleAsyncError(*item,CSIPConcreteProfile::ERegistrationInProgress,err);
+                    }                  
+                }
+            else
+                {}           
+            } //end for	    	    
+	    }//end Outer If
+	else
+	    self->ConfirmSystemstateMonitor(CSipSystemStateMonitor::ERfsState);
+	
   	return ETrue;
 	}
 
@@ -2162,9 +2207,8 @@
 //
 void CSIPProfileServerCore::ConfirmSystemstateMonitor(
 	CSipSystemStateMonitor::TSystemVariable aVariable)
-	{
-		iSystemStateMonitor->EventProcessingCompleted(
-		        aVariable, 0, *this);
+	{    
+        iSystemStateMonitor->EventProcessingCompleted(aVariable, 0, *this);
 	}
 	
 // ----------------------------------------------------------------------------
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileStateUnregistered.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileStateUnregistered.cpp	Tue May 25 13:04:58 2010 +0300
@@ -114,7 +114,7 @@
 		TBool isVpnInUse = (FeatureManager::FeatureSupported( KFeatureIdFfImsDeregistrationInVpn )
                                 && aItem.IsVpnInUse());
 		
-        if ( aItem.IsReferred() && !aItem.IsShutdownInitiated() &&
+        if ( aItem.IsReferred() && !aItem.IsShutdownInitiated() && !aItem.IsOfflineInitiated() &&
                 !aItem.IsRfsInprogress() && !isVpnInUse)
             {
             aItem.ClearOldProfile();
--- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp	Tue May 25 13:04:58 2010 +0300
@@ -610,7 +610,12 @@
 				// Sent-by is now set for the first time, must set the port too
 				if ( receivePort == 0 )
 		            {
-		            receivePort = KDefaultSipPort;
+                    //If the Transport in the outgoing request is TLS and port value = 0
+                    //provide 5061 for TLS and 5060 for UDP/TCP
+                    if(SIPStrings::StringF(SipStrConsts::ETLS) == viaHeader->Transport())
+                        receivePort = KDefaultSipsPort;
+                    else
+                        receivePort = KDefaultSipPort;
 		            }
 	        	}
 	        if ( receivePort )
Binary file realtimenetprots/sipfw/conf/sipframework_101f413c.crml has changed
--- a/realtimenetprots/sipfw/rom/sipsw.iby	Tue May 11 16:32:45 2010 +0300
+++ b/realtimenetprots/sipfw/rom/sipsw.iby	Tue May 25 13:04:58 2010 +0300
@@ -103,7 +103,9 @@
 
 ECOM_PLUGIN(sipietfagnt.dll,sipietfagnt.rsc) 
 
+#ifndef FF_EXCLUDE_STANDARD_IMSAGENT 
 ECOM_PLUGIN(sipimsagnt.dll,sipimsagnt.rsc)
+#endif
 
 /* Resources - XML for secure profile backup*/
 data=ZPRIVATE\101F413C\backup_registration.xml private\101F413C\backup_registration.xml
--- a/sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/sipplugins/sippsipsettingsui/src/SIPSettIntegerSetPage.cpp	Tue May 25 13:04:58 2010 +0300
@@ -27,7 +27,6 @@
 #include    "gssippluginlogger.h"
 
 _LIT( NULLString,"" );
-_LIT16( ZeroString,"-1" );
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -72,23 +71,18 @@
         }
        TextControl()->GetText( intText );
        lex.Assign( intText.Ptr() );
-       lex.Val( value );
-       if( value >= 0 && value <= 65535 || intText == NULLString )
-    	   {
-           if( intText == NULLString )
-    	       {
-               TextControl()->SetTextL(&ZeroString);
-    	       }
-           UpdateSettingL();  
+       lex.Val( value );   	   
+       if( intText == NULLString )
+	       {
+           TextControl()->SetTextL(&NULLString);
+	       }
+       UpdateSettingL();  
             
-           // Everything OK, save setting and exit page
-           AcceptSettingL();	   
-    	   ret = ETrue;
-    	   }
-       else
-    	   {
-    	   ret = EFalse;
-    	   }
+       // Everything OK, save setting and exit page
+       AcceptSettingL();	   
+	   ret = ETrue;
+    	   
+      
         
         return ret;    
     }
--- a/sipplugins/sippsipsettingsui/src/SipSettIntegerEditItem.cpp	Tue May 11 16:32:45 2010 +0300
+++ b/sipplugins/sippsipsettingsui/src/SipSettIntegerEditItem.cpp	Tue May 25 13:04:58 2010 +0300
@@ -45,8 +45,7 @@
     lex.Assign(aInteger.Ptr());
     lex.Val(value);
     iValue = value;
-    
- 
+    AknTextUtils::DisplayTextLanguageSpecificNumberConversion( aInteger );
     
     }
 
@@ -89,6 +88,7 @@
         	{
         	TBuf<KMaxServerPortLength> ValueString;
         	ValueString.AppendNum( iValue );
+			AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ValueString );
         	InternalTextPtr().Copy( ValueString );
         	}