libkea_http_la_SOURCES += request_context.h
libkea_http_la_SOURCES += request_parser.cc request_parser.h
libkea_http_la_SOURCES += response.cc response.h
+libkea_http_la_SOURCES += response_creator.h
libkea_http_la_SOURCES += response_json.cc response_json.h
#include <exceptions/exceptions.h>
#include <http/request_context.h>
+#include <boost/shared_ptr.hpp>
#include <map>
#include <set>
#include <stdint.h>
HttpRequestError(file, line, what) { };
};
+class HttpRequest;
+
+/// @brief Pointer to the @ref HttpRequest object.
+typedef boost::shared_ptr<HttpRequest> HttpRequestPtr;
+
+/// @brief Pointer to the const @ref HttpRequest object.
+typedef boost::shared_ptr<const HttpRequest> ConstHttpRequestPtr;
+
/// @brief Represents HTTP request message.
///
/// This object represents parsed HTTP message. The @ref HttpRequestContext
#include <exceptions/exceptions.h>
#include <http/http_types.h>
#include <boost/lexical_cast.hpp>
+#include <boost/shared_ptr.hpp>
#include <cstdint>
#include <map>
#include <string>
SERVICE_UNAVAILABLE = 503
};
+class HttpResponse;
+
+/// @brief Pointer to the @ref HttpResponse object.
+typedef boost::shared_ptr<HttpResponse> HttpResponsePtr;
+
+/// @brief Pointer to the const @ref HttpResponse object.
+typedef boost::shared_ptr<const HttpResponse> ConstHttpResponsePtr;
+
class HttpResponse {
public:
--- /dev/null
+// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef HTTP_RESPONSE_CREATOR_H
+#define HTTP_RESPONSE_CREATOR_H
+
+#include <http/request.h>
+#include <http/response.h>
+
+namespace isc {
+namespace http {
+
+class HttpResponseCreator {
+public:
+
+ virtual ~HttpResponseCreator() { };
+
+ virtual HttpResponsePtr create(const ConstHttpRequestPtr& request) = 0;
+
+};
+
+} // namespace http
+} // namespace isc
+
+#endif