diff Core/HttpServer/HttpOutput.h @ 1519:8bd0d897763f

refactoring: IHttpStreamAnswer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2015 13:15:16 +0200
parents 4f8c8ef114db
children 3606278d305e
line wrap: on
line diff
--- a/Core/HttpServer/HttpOutput.h	Tue Aug 11 10:36:05 2015 +0200
+++ b/Core/HttpServer/HttpOutput.h	Tue Aug 11 13:15:16 2015 +0200
@@ -37,6 +37,7 @@
 #include <stdint.h>
 #include "../Enumerations.h"
 #include "IHttpOutputStream.h"
+#include "IHttpStreamAnswer.h"
 #include "../Uuid.h"
 
 namespace Orthanc
@@ -102,6 +103,8 @@
 
       void CloseMultipart();
 
+      void CloseBody();
+
       State GetState() const
       {
         return state_;
@@ -155,11 +158,6 @@
       stateMachine_.SetContentFilename(filename);
     }
 
-    void SetContentLength(uint64_t length)
-    {
-      stateMachine_.SetContentLength(length);
-    }
-
     void SetCookie(const std::string& cookie,
                    const std::string& value)
     {
@@ -177,7 +175,7 @@
 
     void SendBody(const std::string& str);
 
-    void SendBody();
+    void SendEmptyBody();
 
     void SendMethodNotAllowed(const std::string& allowed);
 
@@ -207,5 +205,7 @@
     {
       return stateMachine_.GetState() == StateMachine::State_WritingMultipart;
     }
+
+    void Answer(IHttpStreamAnswer& stream);
   };
 }