comparison Core/RestApi/RestApiOutput.h @ 1519:8bd0d897763f

refactoring: IHttpStreamAnswer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2015 13:15:16 +0200
parents eb46cc06389a
children 9c5d93510414
comparison
equal deleted inserted replaced
1518:eb46cc06389a 1519:8bd0d897763f
53 RestApiOutput(HttpOutput& output, 53 RestApiOutput(HttpOutput& output,
54 HttpMethod method); 54 HttpMethod method);
55 55
56 ~RestApiOutput(); 56 ~RestApiOutput();
57 57
58 HttpOutput& GetLowLevelOutput()
59 {
60 return output_;
61 }
62
63 void MarkLowLevelOutputDone()
64 {
65 alreadySent_ = true;
66 }
67
68 void SetConvertJsonToXml(bool convert) 58 void SetConvertJsonToXml(bool convert)
69 { 59 {
70 convertJsonToXml_ = convert; 60 convertJsonToXml_ = convert;
71 } 61 }
72 62
73 bool IsConvertJsonToXml() const 63 bool IsConvertJsonToXml() const
74 { 64 {
75 return convertJsonToXml_; 65 return convertJsonToXml_;
76 } 66 }
77 67
78 void AnswerFile(HttpFileSender& sender); 68 void AnswerStream(IHttpStreamAnswer& stream);
79 69
80 void AnswerJson(const Json::Value& value); 70 void AnswerJson(const Json::Value& value);
81 71
82 void AnswerBuffer(const std::string& buffer, 72 void AnswerBuffer(const std::string& buffer,
83 const std::string& contentType); 73 const std::string& contentType);