comparison 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
comparison
equal deleted inserted replaced
4626:686f189a903d 4627:f7d5372b59b3
293 bool IsCompressionEnabled() const 293 bool IsCompressionEnabled() const
294 { 294 {
295 return compressionEnabled_; 295 return compressionEnabled_;
296 } 296 }
297 297
298 bool AddAttachment(const std::string& resourceId, 298 bool AddAttachment(int64_t& newRevision,
299 const std::string& resourceId,
299 FileContentType attachmentType, 300 FileContentType attachmentType,
300 const void* data, 301 const void* data,
301 size_t size); 302 size_t size,
303 bool hasOldRevision,
304 int64_t oldRevision);
302 305
303 StoreStatus Store(std::string& resultPublicId, 306 StoreStatus Store(std::string& resultPublicId,
304 DicomInstanceToStore& dicom, 307 DicomInstanceToStore& dicom,
305 StoreInstanceMode mode); 308 StoreInstanceMode mode);
306 309
325 bool ReadDicomUntilPixelData(std::string& dicom, 328 bool ReadDicomUntilPixelData(std::string& dicom,
326 const std::string& instancePublicId); 329 const std::string& instancePublicId);
327 330
328 // This method is for low-level operations on "/instances/.../attachments/..." 331 // This method is for low-level operations on "/instances/.../attachments/..."
329 void ReadAttachment(std::string& result, 332 void ReadAttachment(std::string& result,
333 int64_t& revision,
330 const std::string& instancePublicId, 334 const std::string& instancePublicId,
331 FileContentType content, 335 FileContentType content,
332 bool uncompressIfNeeded); 336 bool uncompressIfNeeded);
333 337
334 void SetStoreMD5ForAttachments(bool storeMD5); 338 void SetStoreMD5ForAttachments(bool storeMD5);