changeset 238:5dea2c38b6be

fix build with framework 1.12.11
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 14 Apr 2026 07:13:37 +0200
parents 6a2f3fc566f6
children 5e2e2c8d7969
files Common/StoragePlugin.cpp
diffstat 1 files changed, 22 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Common/StoragePlugin.cpp	Mon Apr 13 10:57:05 2026 +0200
+++ b/Common/StoragePlugin.cpp	Tue Apr 14 07:13:37 2026 +0200
@@ -40,16 +40,20 @@
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
 
+#include "EncryptionConfigurator.h"
 #include "EncryptionHelpers.h"
-#include "EncryptionConfigurator.h"
 #include "FileSystemStorage.h"
+#include "MoveStorageJob.h"
+#include "StoragePlugin.h"
 
 #include <Logging.h>
 #include <SystemToolbox.h>
-#include "MoveStorageJob.h"
-#include "StoragePlugin.h"
 #include <Toolbox.h>
 
+#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11)
+#  include <ElapsedTimer.h>
+#endif
+
 #ifdef _WIN32
 // This is a hotfix for: https://orthanc.uclouvain.be/hg/orthanc/rev/e4d9a872998f
 #  undef ORTHANC_PLUGINS_API
@@ -106,7 +110,12 @@
 {
   try
   {
+#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11)
+    Orthanc::ElapsedTimer timer;
+#else
     Orthanc::Toolbox::ElapsedTimer timer;
+#endif
+
     LOG(INFO) << primaryStorage->GetNameForLogs() << ": creating attachment " << uuid
               << " of type " << boost::lexical_cast<std::string>(type);
     std::unique_ptr<IStorage::IWriter> writer(primaryStorage->GetWriterForObject(uuid, type, cryptoEnabled));
@@ -155,7 +164,12 @@
 
   try
   {
+#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11)
+    Orthanc::ElapsedTimer timer;
+#else
     Orthanc::Toolbox::ElapsedTimer timer;
+#endif
+
     LOG(INFO) << storage->GetNameForLogs() << ": reading range of attachment " << uuid
               << " of type " << boost::lexical_cast<std::string>(type);
     
@@ -207,7 +221,12 @@
 {
   try
   {
+#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11)
+    Orthanc::ElapsedTimer timer;
+#else
     Orthanc::Toolbox::ElapsedTimer timer;
+#endif
+
     LOG(INFO) << storage->GetNameForLogs() << ": reading whole attachment " << uuid
               << " of type " << boost::lexical_cast<std::string>(type);
     std::unique_ptr<IStorage::IReader> reader(storage->GetReaderForObject(uuid, type, cryptoEnabled));