Mercurial > hg > orthanc
diff Core/HttpServer/HttpOutput.h @ 217:1ac3aacd10a5
simplifications
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 12:22:23 +0100 |
parents | 7f74209ea0f8 |
children | 4031f73fe0e4 |
line wrap: on
line diff
--- a/Core/HttpServer/HttpOutput.h Thu Nov 29 11:57:35 2012 +0100 +++ b/Core/HttpServer/HttpOutput.h Thu Nov 29 12:22:23 2012 +0100 @@ -35,7 +35,6 @@ #include <string> #include <stdint.h> #include "../Enumerations.h" -#include "../FileStorage.h" namespace Orthanc { @@ -44,6 +43,11 @@ private: void SendHeaderInternal(Orthanc_HttpStatus status); + void SendOkHeader(const char* contentType, + bool hasContentLength, + uint64_t contentLength, + const char* contentFilename); + public: virtual ~HttpOutput() { @@ -51,13 +55,6 @@ virtual void Send(const void* buffer, size_t length) = 0; - void SendOkHeader(const std::string& contentType); - - void SendOkHeader(const char* contentType, - bool hasContentLength, - uint64_t contentLength, - const char* contentFilename); - void SendCustomOkHeader(const std::string& customHeader); void SendString(const std::string& s); @@ -66,8 +63,9 @@ void SendHeader(Orthanc_HttpStatus status); + void Redirect(const std::string& path); - // Higher-level constructs to send entire files or buffers ------------------- + // Higher-level constructs to send entire buffers ---------------------------- void AnswerBufferWithContentType(const std::string& buffer, const std::string& contentType); @@ -75,19 +73,5 @@ void AnswerBufferWithContentType(const void* buffer, size_t size, const std::string& contentType); - - void AnswerFileWithContentType(const std::string& path, - const std::string& contentType, - const char* filename = NULL); - - void AnswerFileAutodetectContentType(const std::string& path, - const char* filename = NULL); - - void AnswerFile(const FileStorage& storage, - const std::string& uuid, - const std::string& contentType, - const char* filename = NULL); - - void Redirect(const std::string& path); }; }