diff OrthancServer/Sources/ServerIndex.cpp @ 4571:9224e107d613 db-changes

simplifying IDatabaseListener::SignalChange() as IDatabaseListener::SignalResourceDeleted()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Mar 2021 16:49:34 +0100
parents 648defffc8cc
children c12d4e5f469b
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerIndex.cpp	Mon Mar 08 16:04:56 2021 +0100
+++ b/OrthancServer/Sources/ServerIndex.cpp	Mon Mar 08 16:49:34 2021 +0100
@@ -177,7 +177,7 @@
     }
 
     virtual void SignalRemainingAncestor(ResourceType parentType,
-                                         const std::string& publicId)
+                                         const std::string& publicId) ORTHANC_OVERRIDE
     {
       LOG(TRACE) << "Remaining ancestor \"" << publicId << "\" (" << parentType << ")";
 
@@ -197,14 +197,20 @@
       }        
     }
 
-    virtual void SignalFileDeleted(const FileInfo& info)
+    virtual void SignalAttachmentDeleted(const FileInfo& info) ORTHANC_OVERRIDE
     {
       assert(Toolbox::IsUuid(info.GetUuid()));
       pendingFilesToRemove_.push_back(FileToRemove(info));
       sizeOfFilesToRemove_ += info.GetCompressedSize();
     }
 
-    virtual void SignalChange(const ServerIndexChange& change)
+    virtual void SignalResourceDeleted(ResourceType type,
+                                       const std::string& publicId) ORTHANC_OVERRIDE
+    {
+      SignalChange(ServerIndexChange(ChangeType_Deleted, type, publicId));
+    }
+
+    void SignalChange(const ServerIndexChange& change)
     {
       LOG(TRACE) << "Change related to resource " << change.GetPublicId() << " of type " 
                  << EnumerationToString(change.GetResourceType()) << ": "