activityfw/storage/server/src/afapplicationsstorage.cpp
changeset 124 e36b2f4799c0
parent 121 0b3699f6c654
--- a/activityfw/storage/server/src/afapplicationsstorage.cpp	Fri Sep 17 08:32:18 2010 +0300
+++ b/activityfw/storage/server/src/afapplicationsstorage.cpp	Mon Oct 04 00:38:31 2010 +0300
@@ -17,19 +17,22 @@
 #include "afapplicationsstorage.h"
 //------------------------------------------------------------------------------
 CAfApplicationsStorage* CAfApplicationsStorage::NewL(CAfStorage& storage, 
-                                                     const MAfApplicationsRegistry& provider)
+                                                     const MAfApplicationsRegistry& provider, 
+                                                     MAfApplicationsObserver &observer)
 {
-    CAfApplicationsStorage *self = new (ELeave)CAfApplicationsStorage(storage, provider);
+    CAfApplicationsStorage *self = new (ELeave)CAfApplicationsStorage(storage, provider, observer);
     return self;
     
 }
 
 //------------------------------------------------------------------------------
 CAfApplicationsStorage::CAfApplicationsStorage(CAfStorage& storage, 
-                                               const MAfApplicationsRegistry& provider)
+                                               const MAfApplicationsRegistry& provider, 
+                                               MAfApplicationsObserver &observer)
 :
     mStorage(storage),
-    mProvider(provider)
+    mProvider(provider),
+    mObserver(observer)
 {
 }
 
@@ -44,6 +47,10 @@
     for (TInt iter(0); iter < removedApp.Count(); ++iter) {
         TRAP_IGNORE(deleteActivityL(removedApp[iter]));
     }
+
+    if ( removedApp.Count() > 0 ) {
+        mObserver.applicationsChanged();
+    }
 }
 
 //------------------------------------------------------------------------------
@@ -55,7 +62,8 @@
                                     KNullDesC,
                                     KNullDesC,
                                     KNullDesC8,
-                                    KNullDesC8));
+                                    KNullDesC8,
+                                    TTime()));
     mStorage.DeleteActivitiesL(*entry);
     CleanupStack::PopAndDestroy(entry);
 }