voipplugins/sipconnectionprovider/src/scppresencehandler.cpp
branchRCL_3
changeset 11 bddb6d4447db
parent 10 7117cbf1600a
child 15 ed1e38b404e5
--- a/voipplugins/sipconnectionprovider/src/scppresencehandler.cpp	Fri Mar 12 15:42:09 2010 +0200
+++ b/voipplugins/sipconnectionprovider/src/scppresencehandler.cpp	Mon Mar 15 12:39:55 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -39,7 +39,7 @@
 #include <ximpcontext.h>
 #include <ximpstatus.h>
 #include <pressettingsapi.h> //presence settings
-#include <XdmSettingsApi.h>
+#include <xdmsettingsapi.h>
 #include <cvimpstsettingsstore.h>
 
 #include "scppresencehandler.h"
@@ -322,6 +322,14 @@
     SCPLOGSTRING( "CScpPresenceHandler::HandleSipConnectionEvent OUT" );
     }    
 
+// -----------------------------------------------------------------------------
+// CScpPresenceHandler::HandleSipConnectionEvent
+// -----------------------------------------------------------------------------
+//
+TBool CScpPresenceHandler::IsSipProfileAllowedToStartAlr()
+    {
+    return EFalse;
+    }
 
 // ======================= From MXIMPContextObserver ===========================
 
@@ -695,7 +703,6 @@
     
     MPresenceInfoFieldValueEnum* enumField2 = 
         iFeature->PresenceObjectFactory().NewEnumInfoFieldLC();
-    
     TInt availabilityEnum(0);
     RBuf customMessage;
     CleanupClosePushL( customMessage );
@@ -910,8 +917,19 @@
     // Unbind request complete
     else if ( reqType == EUnBindReq && EUnBinding == iPresenceState )
         {
-        SCPLOGSTRING( "CScpPresenceHandler::HandleRequestCompleteEvent status offline" );       
-        DeregisterNow();
+        SCPLOGSTRING( "CScpPresenceHandler::HandleRequestCompleteEvent status offline" );
+        
+        // Do not send info to our client if roaming is ongoing 
+        if ( !iSubService.IsRoaming() )
+            {
+            DeregisterNow();
+            }
+		// Inform SIP to start ALR migration
+        else
+            {
+            iSubService.ProfileHandler().StartAlrMigration( iSubService.SipProfileId() );
+            }
+        
         SCPLOGSTRING( "CScpPresenceHandler::HandleRequestCompleteEvent status offline end" );
         }