icinga2/lib/remote/objectqueryhandler.hpp

35 lines
829 B
C++
Raw Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2015-06-22 11:11:21 +02:00
#ifndef OBJECTQUERYHANDLER_H
#define OBJECTQUERYHANDLER_H
2015-06-22 11:11:21 +02:00
#include "remote/httphandler.hpp"
namespace icinga
{
2018-01-04 06:11:04 +01:00
class ObjectQueryHandler final : public HttpHandler
2015-06-22 11:11:21 +02:00
{
public:
DECLARE_PTR_TYPEDEFS(ObjectQueryHandler);
2015-06-22 11:11:21 +02:00
bool HandleRequest(
2019-02-15 11:51:12 +01:00
AsioTlsStream& stream,
const ApiUser::Ptr& user,
boost::beast::http::request<boost::beast::http::string_body>& request,
const Url::Ptr& url,
boost::beast::http::response<boost::beast::http::string_body>& response,
2019-02-15 11:51:12 +01:00
const Dictionary::Ptr& params,
boost::asio::yield_context& yc,
HttpServerConnection& server
) override;
private:
static Dictionary::Ptr SerializeObjectAttrs(const Object::Ptr& object, const String& attrPrefix,
const Array::Ptr& attrs, bool isJoin, bool allAttrs);
2015-06-22 11:11:21 +02:00
};
}
#endif /* OBJECTQUERYHANDLER_H */