diff UnitTestsSources/ServerIndexTests.cpp @ 1177:5b2d8c280ac2 db-changes

Plugins can monitor changes through callbacks
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Sep 2014 17:37:44 +0200
parents 1ea4094d077c
children 1169528a9a5f
line wrap: on
line diff
--- a/UnitTestsSources/ServerIndexTests.cpp	Mon Sep 22 14:11:37 2014 +0200
+++ b/UnitTestsSources/ServerIndexTests.cpp	Wed Sep 24 17:37:44 2014 +0200
@@ -82,13 +82,19 @@
       LOG(INFO) << "A file must be removed: " << fileUuid;
     }       
 
-    virtual void SignalResourceDeleted(ResourceType type,
-                                       const std::string& publicId)
+    virtual void SignalChange(ChangeType changeType,
+                              ResourceType resourceType,
+                              const std::string& publicId)
     {
-      deletedResources_.push_back(publicId);
-      LOG(INFO) << "A resource was removed: " << publicId;
+      if (changeType == ChangeType_Deleted)
+      {
+        deletedResources_.push_back(publicId);        
+      }
+
+      LOG(INFO) << "Change related to resource " << publicId << " of type " 
+                << EnumerationToString(resourceType) << ": " << EnumerationToString(changeType);
     }
-                         
+
   };