deviceupdatesui/deviceupdates/src/dminforetrieval.cpp
changeset 47 d316aecb87fd
parent 36 9eefb50e711a
child 49 c34c36d1c835
--- a/deviceupdatesui/deviceupdates/src/dminforetrieval.cpp	Tue Jul 13 03:51:25 2010 +0530
+++ b/deviceupdatesui/deviceupdates/src/dminforetrieval.cpp	Tue Jul 13 04:01:20 2010 +0530
@@ -483,6 +483,15 @@
     if(error == KErrNone)   {}             
     }
 
+void DmInfo::sync(int aProfileId)
+    {
+    int itemNum = findProfile(aProfileId);
+    if(itemNum!=KErrNotFound)
+        {
+        synchronize(itemNum);
+        }
+    }
+
 void DmInfo::synccomplete(int jobstatus)
     {
     if (jobstatus == ENSmlSyncComplete)
@@ -491,7 +500,10 @@
         //Update profile list
         refreshProfileList();
         }
-    serversView->syncCompleted(jobstatus);
+    if(serversView!=NULL)
+        {
+        serversView->syncCompleted(jobstatus);
+        }
     iDbEventsBlocked = EFalse;
     }
 
@@ -543,3 +555,14 @@
     FLOG( "[OMADM] DmInfo::DisableDbNotifications() completed" );
     }
 
+TInt DmInfo::findProfile(TInt aProfileId)
+    {
+    for(TInt i=0;i<iProfileList->Count();i++)
+        {
+        if(iProfileList->At(i).iProfileId == aProfileId)
+            {
+            return i;
+            }
+        }
+    return KErrNotFound;
+    }