1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2 
3 #ifndef CONFIGMODULESHANDLER_H
4 #define CONFIGMODULESHANDLER_H
5 
6 #include "remote/httphandler.hpp"
7 
8 namespace icinga
9 {
10 
11 class ConfigPackagesHandler final : public HttpHandler
12 {
13 public:
14 	DECLARE_PTR_TYPEDEFS(ConfigPackagesHandler);
15 
16 	bool HandleRequest(
17 		AsioTlsStream& stream,
18 		const ApiUser::Ptr& user,
19 		boost::beast::http::request<boost::beast::http::string_body>& request,
20 		const Url::Ptr& url,
21 		boost::beast::http::response<boost::beast::http::string_body>& response,
22 		const Dictionary::Ptr& params,
23 		boost::asio::yield_context& yc,
24 		HttpServerConnection& server
25 	) override;
26 
27 private:
28 	void HandleGet(
29 		const ApiUser::Ptr& user,
30 		boost::beast::http::request<boost::beast::http::string_body>& request,
31 		const Url::Ptr& url,
32 		boost::beast::http::response<boost::beast::http::string_body>& response,
33 		const Dictionary::Ptr& params
34 	);
35 	void HandlePost(
36 		const ApiUser::Ptr& user,
37 		boost::beast::http::request<boost::beast::http::string_body>& request,
38 		const Url::Ptr& url,
39 		boost::beast::http::response<boost::beast::http::string_body>& response,
40 		const Dictionary::Ptr& params
41 	);
42 	void HandleDelete(
43 		const ApiUser::Ptr& user,
44 		boost::beast::http::request<boost::beast::http::string_body>& request,
45 		const Url::Ptr& url,
46 		boost::beast::http::response<boost::beast::http::string_body>& response,
47 		const Dictionary::Ptr& params
48 	);
49 
50 };
51 
52 }
53 
54 #endif /* CONFIGMODULESHANDLER_H */
55