diff Core/FileStorage/StorageAccessor.h @ 2394:75c779ca948c

fix compilation without Web server
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2017 16:23:10 +0200
parents a3a65de1840f
children 5edec967055e
line wrap: on
line diff
--- a/Core/FileStorage/StorageAccessor.h	Wed Aug 30 13:27:05 2017 +0200
+++ b/Core/FileStorage/StorageAccessor.h	Wed Aug 30 16:23:10 2017 +0200
@@ -33,10 +33,21 @@
 
 #pragma once
 
+#if !defined(ORTHANC_ENABLE_CIVETWEB)
+#  error Macro ORTHANC_ENABLE_CIVETWEB must be defined to use this file
+#endif
+
+#if !defined(ORTHANC_ENABLE_MONGOOSE)
+#  error Macro ORTHANC_ENABLE_MONGOOSE must be defined to use this file
+#endif
+
 #include "IStorageArea.h"
 #include "FileInfo.h"
-#include "../HttpServer/BufferHttpSender.h"
-#include "../RestApi/RestApiOutput.h"
+
+#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1
+#  include "../HttpServer/BufferHttpSender.h"
+#  include "../RestApi/RestApiOutput.h"
+#endif
 
 #include <vector>
 #include <string>
@@ -51,9 +62,11 @@
   private:
     IStorageArea&  area_;
 
+#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1
     void SetupSender(BufferHttpSender& sender,
                      const FileInfo& info,
                      const std::string& mime);
+#endif
 
   public:
     StorageAccessor(IStorageArea& area) : area_(area)
@@ -86,6 +99,7 @@
       area_.Remove(info.GetUuid(), info.GetContentType());
     }
 
+#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1
     void AnswerFile(HttpOutput& output,
                     const FileInfo& info,
                     const std::string& mime);
@@ -93,5 +107,6 @@
     void AnswerFile(RestApiOutput& output,
                     const FileInfo& info,
                     const std::string& mime);
+#endif
   };
 }