--- /dev/null
+/* $Id$
+
+This file is part of libmsphttp
+Copyright © 2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the LGPL
+*/
+
+#ifndef MSP_HTTP_MESSAGE_H_
+#define MSP_HTTP_MESSAGE_H_
+
+#include <string>
+#include "misc.h"
+
+namespace Msp {
+namespace Http {
+
+class Message
+{
+public:
+ virtual ~Message() { }
+
+ void set_header(const std::string &, const std::string &);
+ const std::string &get_header(const std::string &) const;
+ const std::string &get_data() const { return data; }
+ bool get_complete() const { return complete; }
+ void add_data(const std::string &);
+ unsigned parse_data(const std::string &);
+ virtual std::string str() const =0;
+protected:
+ Version http_version;
+ HeaderMap headers;
+ std::string data;
+ unsigned chunk_length;
+ bool complete;
+
+ Message();
+ std::string str_common() const;
+};
+
+} // namespace Http
+} // namespace Msp
+
+#endif