Description: Fix FTBFS with liborthancframework-dev >= 1.9.8
Author: Sebastien Jodogne <s.jodogne@orthanc-labs.com>
Forwarded: https://orthanc.uclouvain.be/hg/orthanc-webviewer/rev/d89da90a262b
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: OrthancWebViewer-2.10/Plugin/Cache/CacheManager.cpp
===================================================================
--- OrthancWebViewer-2.10.orig/Plugin/Cache/CacheManager.cpp
+++ OrthancWebViewer-2.10/Plugin/Cache/CacheManager.cpp
@@ -467,8 +467,14 @@ namespace OrthancPlugins
     try
     {
 #if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) && ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 0) 
-      std::unique_ptr<Orthanc::IMemoryBuffer> buffer(
-        pimpl_->storage_.Read(uuid, Orthanc::FileContentType_Unknown));
+      std::unique_ptr<Orthanc::IMemoryBuffer> buffer;
+
+#  if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 8)
+      buffer.reset(pimpl_->storage_.ReadWhole(uuid, Orthanc::FileContentType_Unknown));
+#  else
+      buffer.reset(pimpl_->storage_.Read(uuid, Orthanc::FileContentType_Unknown));
+#  endif
+
       buffer->MoveToString(content);
 #else
       pimpl_->storage_.Read(content, uuid, Orthanc::FileContentType_Unknown);
