Fawkes API Fawkes Development Version
webview_plugin.cpp
1
2/***************************************************************************
3 * webview_plugin.h - Fawkes Webview Plugin
4 *
5 * Created: Mon Oct 13 17:46:57 2008 (I5 Developer's Day)
6 * Copyright 2006-2018 Tim Niemueller [www.niemueller.de]
7 ****************************************************************************/
8
9/* This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Library General Public License for more details.
18 *
19 * Read the full text in the LICENSE.GPL file in the doc directory.
20 */
21
22#include "webview_thread.h"
23
24#include <core/exception.h>
25#include <plugins/webview/webview_plugin.h>
26
27#ifdef HAVE_REST_APIS
28# include "backendinfo-rest-api/backendinfo-rest-api.h"
29# include "blackboard-rest-api/blackboard-rest-api.h"
30# include "config-rest-api/config-rest-api.h"
31# include "plugin-rest-api/plugin-rest-api.h"
32# ifdef HAVE_JPEG
33# include "image-rest-api/image-rest-api.h"
34# endif
35# ifdef HAVE_TF
36# include "tf-rest-api/tf-rest-api.h"
37# endif
38#endif
39
40using namespace fawkes;
41
42/** @class WebviewPlugin <plugins/webview/webview_plugin.h>
43 * Webview plugin for Fawkes.
44 * This provides an extensible web interface for Fawkes.
45 * @author Tim Niemueller
46 */
47
48/** Constructor.
49 * @param config Fawkes configuration
50 */
52{
53 bool enable_thread_pool = config->get_bool("/webview/thread-pool/enable");
54
55 thread_list.push_back(new WebviewThread(enable_thread_pool));
56#ifdef HAVE_REST_APIS
61# ifdef HAVE_JPEG
63# endif
64# ifdef HAVE_TF
66# endif
67#endif
68}
69
70PLUGIN_DESCRIPTION("Web interface for Fawkes")
71EXPORT_PLUGIN(WebviewPlugin)
REST API backend for the image.
REST API backend for the blackboard.
REST API backend for plugins.
REST API backend for the image.
REST API backend for plugins.
REST API backend for the transforms.
Definition: tf-rest-api.h:39
Webview plugin for Fawkes.
WebviewPlugin(fawkes::Configuration *config)
Constructor.
Webview Thread.
Interface for configuration handling.
Definition: config.h:68
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
Plugin interface class.
Definition: plugin.h:34
ThreadList thread_list
Thread list member.
Definition: plugin.h:53
Configuration * config
Fawkes configuration.
Definition: plugin.h:58
void push_back(Thread *thread)
Add thread to the end.
Fawkes library namespace.