diff OrthancFramework/Sources/FileStorage/StorageCache.h @ 5426:c65e036d649b

StorageCache is now storing transcoded instances + added ?transcode=... option to the /file route.
author Alain Mazy <am@osimis.io>
date Thu, 16 Nov 2023 16:09:04 +0100
parents d37dff2c0028
children 111e21b4f8bc
line wrap: on
line diff
--- a/OrthancFramework/Sources/FileStorage/StorageCache.h	Wed Nov 15 08:58:45 2023 +0100
+++ b/OrthancFramework/Sources/FileStorage/StorageCache.h	Thu Nov 16 16:09:04 2023 +0100
@@ -50,26 +50,35 @@
         Accessor(StorageCache& cache);
 
         void Add(const std::string& uuid, 
-                FileContentType contentType,
-                const std::string& value);
+                 FileContentType contentType,
+                 const std::string& value);
 
         void AddStartRange(const std::string& uuid, 
-                          FileContentType contentType,
-                          const std::string& value);
+                           FileContentType contentType,
+                           const std::string& value);
 
         void Add(const std::string& uuid, 
-                FileContentType contentType,
-                const void* buffer,
-                size_t size);
+                 FileContentType contentType,
+                 const void* buffer,
+                 size_t size);
 
         bool Fetch(std::string& value, 
-                  const std::string& uuid,
-                  FileContentType contentType);
+                   const std::string& uuid,
+                   FileContentType contentType);
 
         bool FetchStartRange(std::string& value, 
-                            const std::string& uuid,
-                            FileContentType contentType,
-                            uint64_t end /* exclusive */);
+                             const std::string& uuid,
+                             FileContentType contentType,
+                             uint64_t end /* exclusive */);
+
+        bool FetchTranscodedInstance(std::string& value, 
+                                     const std::string& uuid,
+                                     DicomTransferSyntax targetSyntax);
+
+        void AddTranscodedInstance(const std::string& uuid,
+                                   DicomTransferSyntax targetSyntax,
+                                   const void* buffer,
+                                   size_t size);
       };
 
     private: