diff OrthancServer/Sources/ServerContext.h @ 4627:f7d5372b59b3 db-changes

handling revisions of attachments
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Apr 2021 15:11:59 +0200
parents 1f455b86b054
children 66109d24d26e
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.h	Mon Apr 19 10:28:43 2021 +0200
+++ b/OrthancServer/Sources/ServerContext.h	Tue Apr 20 15:11:59 2021 +0200
@@ -295,10 +295,13 @@
       return compressionEnabled_;
     }
 
-    bool AddAttachment(const std::string& resourceId,
+    bool AddAttachment(int64_t& newRevision,
+                       const std::string& resourceId,
                        FileContentType attachmentType,
                        const void* data,
-                       size_t size);
+                       size_t size,
+                       bool hasOldRevision,
+                       int64_t oldRevision);
 
     StoreStatus Store(std::string& resultPublicId,
                       DicomInstanceToStore& dicom,
@@ -327,6 +330,7 @@
 
     // This method is for low-level operations on "/instances/.../attachments/..."
     void ReadAttachment(std::string& result,
+                        int64_t& revision,
                         const std::string& instancePublicId,
                         FileContentType content,
                         bool uncompressIfNeeded);