Fawkes API Fawkes Development Version
rest_processor.h
1
2/***************************************************************************
3 * rest_processor.h - Web request processor for an extensible REST API
4 *
5 * Created: Fri Mar 16 12:02:03 2018
6 * Copyright 2006-2018 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#ifndef _PLUGINS_WEBVIEW_REST_PROCESSOR_H_
24#define _PLUGINS_WEBVIEW_REST_PROCESSOR_H_
25
26#include <webview/request.h>
27
28#include <vector>
29
30namespace fawkes {
31class WebUrlManager;
32class WebviewRestApiManager;
33class Logger;
34class WebReply;
35} // namespace fawkes
36
38{
39public:
42 fawkes::Logger * logger);
44
45private:
46 fawkes::WebReply *process_request(const fawkes::WebRequest *request);
47
48private:
49 fawkes::WebUrlManager * url_mgr_;
51 fawkes::Logger * logger_;
52
53 std::vector<fawkes::WebRequest::Method> methods_;
54};
55
56#endif
REST API web processor.
~WebviewRESTRequestProcessor()
Destructor.
WebviewRESTRequestProcessor(fawkes::WebUrlManager *url_manager, fawkes::WebviewRestApiManager *api_mgr, fawkes::Logger *logger)
Constructor.
Interface for logging.
Definition: logger.h:42
Basic web reply.
Definition: reply.h:34
Web request meta data carrier.
Definition: request.h:42
Manage URL mappings.
Definition: url_manager.h:40
Fawkes library namespace.