Mercurial > hg > orthanc
diff Core/FileStorage/StorageAccessor.cpp @ 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 | 878b59270859 |
line wrap: on
line diff
--- a/Core/FileStorage/StorageAccessor.cpp Wed Aug 30 13:27:05 2017 +0200 +++ b/Core/FileStorage/StorageAccessor.cpp Wed Aug 30 16:23:10 2017 +0200 @@ -36,10 +36,13 @@ #include "../Compression/ZlibCompressor.h" #include "../OrthancException.h" -#include "../HttpServer/HttpStreamTranscoder.h" #include "../Toolbox.h" #include "../SystemToolbox.h" +#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1 +# include "../HttpServer/HttpStreamTranscoder.h" +#endif + namespace Orthanc { FileInfo StorageAccessor::Write(const void* data, @@ -143,6 +146,7 @@ } +#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1 void StorageAccessor::SetupSender(BufferHttpSender& sender, const FileInfo& info, const std::string& mime) @@ -168,8 +172,10 @@ sender.SetContentFilename(info.GetUuid() + std::string(extension)); } +#endif +#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1 void StorageAccessor::AnswerFile(HttpOutput& output, const FileInfo& info, const std::string& mime) @@ -180,8 +186,10 @@ HttpStreamTranscoder transcoder(sender, info.GetCompressionType()); output.Answer(transcoder); } +#endif +#if ORTHANC_ENABLE_CIVETWEB == 1 || ORTHANC_ENABLE_MONGOOSE == 1 void StorageAccessor::AnswerFile(RestApiOutput& output, const FileInfo& info, const std::string& mime) @@ -192,4 +200,5 @@ HttpStreamTranscoder transcoder(sender, info.GetCompressionType()); output.AnswerStream(transcoder); } +#endif }