Fawkes API Fawkes Development Version
xmlrpc_thread.h
1
2/***************************************************************************
3 * xmlrpc_thread.h - Thread that handles xml-rpc requests
4 *
5 * Created: Sun Aug 30 12:44:30 2009
6 * Copyright 2006-2009 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_XMLRPC_XMLRPC_THREAD_H_
24#define _PLUGINS_XMLRPC_XMLRPC_THREAD_H_
25
26#include <aspect/blackboard.h>
27#include <aspect/configurable.h>
28#include <aspect/logger.h>
29#include <aspect/logging.h>
30#include <aspect/network.h>
31#include <aspect/plugin_director.h>
32#include <aspect/webview.h>
33#include <core/threading/thread.h>
34#include <logging/cache.h>
35
36namespace fawkes {
37class NetworkService;
38class WebRequestDispatcher;
39class WebUrlManager;
40class WebServer;
41} // namespace fawkes
42
46
55{
56public:
59
60 virtual void init();
61 virtual void finalize();
62 virtual void loop();
63
64 /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
65protected:
66 virtual void
68 {
69 Thread::run();
70 }
71
72private:
73 fawkes::WebServer * webserver_;
75 fawkes::WebUrlManager * url_manager_;
76
77 XmlRpcRequestProcessor *processor_;
78 XmlRpcPluginMethods * plugin_methods_;
79 XmlRpcLogMethods * log_methods_;
80
81 bool custom_server_;
82 unsigned int cfg_port_;
83
84 fawkes::CacheLogger cache_logger_;
85 fawkes::NetworkService *xmlrpc_service_;
86};
87
88#endif
Wrapper class for logging related XML-RPC methods.
Definition: log.h:35
Wrapper class for plugin related XML-RPC methods.
Definition: plugin.h:34
XML-RPC web request processor.
XML-RPC Thread.
Definition: xmlrpc_thread.h:55
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition: xmlrpc_thread.h:67
virtual void init()
Initialize the thread.
XmlRpcThread()
Constructor.
virtual void loop()
Code to execute in the thread.
virtual void finalize()
Finalize the thread.
Thread aspect to access to BlackBoard.
Definition: blackboard.h:34
Logging Cache.
Definition: cache.h:38
Thread aspect to access configuration data.
Definition: configurable.h:33
Thread aspect that allows to provide a logger to Fawkes.
Definition: logger.h:34
Thread aspect to log output.
Definition: logging.h:33
Thread aspect for network communication.
Definition: network.h:35
Representation of a service announced or found via service discovery (i.e.
Definition: service.h:38
Thread aspect to access the PluginManager.
Thread class encapsulation of pthreads.
Definition: thread.h:46
Web request dispatcher.
Encapsulation of the libmicrohttpd webserver.
Definition: server.h:44
Manage URL mappings.
Definition: url_manager.h:40
Thread aspect to provide web pages via Webview.
Definition: webview.h:37
Fawkes library namespace.