diff OrthancServer/Sources/ServerIndex.h @ 4565:3495a3d97ab6 db-changes

start of read-write transactions
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Mar 2021 12:34:17 +0100
parents bb1c365f9e44
children b812a5f2cef3
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerIndex.h	Mon Mar 08 11:08:03 2021 +0100
+++ b/OrthancServer/Sources/ServerIndex.h	Mon Mar 08 12:34:17 2021 +0100
@@ -155,13 +155,6 @@
                       bool hasPixelDataOffset,
                       uint64_t pixelDataOffset);
 
-    bool DeleteResource(Json::Value& target /* out */,
-                        const std::string& uuid,
-                        ResourceType expectedType);
-
-    void LogExportedResource(const std::string& publicId,
-                             const std::string& remoteModality);
-
     void SetProtectedPatient(const std::string& publicId,
                              bool isProtected);
 
@@ -401,6 +394,15 @@
       {
       }
 
+      void DeleteResource(int64_t id)
+      {
+        db_.DeleteResource(id);
+      }
+
+      void LogExportedResource(const ExportedResource& resource)
+      {
+        db_.LogExportedResource(resource);
+      }
     };
 
 
@@ -422,7 +424,8 @@
       {
       }
 
-      virtual void Apply(ReadWriteTransaction& transaction) = 0;
+      virtual void Apply(ReadWriteTransaction& transaction,
+                         Listener& listener) = 0;
     };
     
   private:
@@ -539,5 +542,12 @@
                               const DatabaseLookup& lookup,
                               ResourceType queryLevel,
                               size_t limit);
+
+    bool DeleteResource(Json::Value& target /* out */,
+                        const std::string& uuid,
+                        ResourceType expectedType);
+
+    void LogExportedResource(const std::string& publicId,
+                             const std::string& remoteModality);
   };
 }