Fawkes API  Fawkes Development Version
plugin.h
1 
2 /***************************************************************************
3  * plugin.h - XML-RPC methods related to plugin management
4  *
5  * Created: Mon Aug 31 00:50:41 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_METHODS_PLUGIN_H_
24 #define __PLUGINS_XMLRPC_METHODS_PLUGIN_H_
25 
26 #include <xmlrpc-c/registry.hpp>
27 
28 namespace fawkes {
29  class Logger;
30  class PluginManager;
31 }
32 
34  public:
35  XmlRpcPluginMethods(xmlrpc_c::registry *registry,
36  fawkes::PluginManager *plugin_manager,
37  fawkes::Logger *logger);
39 
40  class plugin_list : public xmlrpc_c::method {
41  public:
42  plugin_list(fawkes::PluginManager *plugin_manager);
43  virtual ~plugin_list();
44  virtual void execute(xmlrpc_c::paramList const& params,
45  xmlrpc_c::value * const result);
46  private:
47  fawkes::PluginManager *__plugin_manager;
48  };
49 
50  class plugin_load : public xmlrpc_c::method {
51  public:
52  plugin_load(fawkes::PluginManager *plugin_manager, fawkes::Logger *logger);
53  virtual ~plugin_load();
54  virtual void execute(xmlrpc_c::paramList const& params,
55  xmlrpc_c::value * const result);
56  private:
57  fawkes::PluginManager *__plugin_manager;
58  fawkes::Logger *__logger;
59  };
60 
61  class plugin_unload : public xmlrpc_c::method {
62  public:
63  plugin_unload(fawkes::PluginManager *plugin_manager, fawkes::Logger *logger);
64  virtual ~plugin_unload();
65  virtual void execute(xmlrpc_c::paramList const& params,
66  xmlrpc_c::value * const result);
67  private:
68  fawkes::PluginManager *__plugin_manager;
69  fawkes::Logger *__logger;
70  };
71 
72  private:
73  xmlrpc_c::registry *__xmlrpc_registry;
74 
75  fawkes::PluginManager *__plugin_manager;
76  fawkes::Logger *__logger;
77  plugin_list *__plugin_list;
78  plugin_load *__plugin_load;
79  plugin_unload *__plugin_unload;
80 };
81 
82 #endif
XML-RPC method to load a plugin.
Definition: plugin.h:50
Fawkes library namespace.
Wrapper class for plugin related XML-RPC methods.
Definition: plugin.h:33
XML-RPC method to unload a plugin.
Definition: plugin.h:61
Fawkes Plugin Manager.
Definition: manager.h:51
Plugin list XML-RPC method.
Definition: plugin.h:40
Interface for logging.
Definition: logger.h:34