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 
30 namespace fawkes {
31 class WebUrlManager;
32 class WebviewRestApiManager;
33 class Logger;
34 class WebReply;
35 } // namespace fawkes
36 
38 {
39 public:
42  fawkes::Logger * logger);
44 
45 private:
46  fawkes::WebReply *process_request(const fawkes::WebRequest *request);
47 
48 private:
49  fawkes::WebUrlManager * url_mgr_;
51  fawkes::Logger * logger_;
52 
53  std::vector<fawkes::WebRequest::Method> methods_;
54 };
55 
56 #endif
WebviewRESTRequestProcessor::WebviewRESTRequestProcessor
WebviewRESTRequestProcessor(fawkes::WebUrlManager *url_manager, fawkes::WebviewRestApiManager *api_mgr, fawkes::Logger *logger)
Constructor.
Definition: rest_processor.cpp:50
fawkes::WebRequest
Web request meta data carrier.
Definition: request.h:42
fawkes::WebviewRestApiManager
Manage URL mappings.
Definition: rest_api_manager.h:37
fawkes::WebUrlManager
Manage URL mappings.
Definition: url_manager.h:40
WebviewRESTRequestProcessor::~WebviewRESTRequestProcessor
~WebviewRESTRequestProcessor()
Destructor.
Definition: rest_processor.cpp:72
WebviewRESTRequestProcessor
REST API web processor.
Definition: rest_processor.h:38
fawkes::Logger
Interface for logging.
Definition: logger.h:42
fawkes
Fawkes library namespace.
fawkes::WebReply
Basic web reply.
Definition: reply.h:34