Fawkes API  Fawkes Development Version
plugin.h
00001 
00002 /***************************************************************************
00003  *  plugin.h - XML-RPC methods related to plugin management
00004  *
00005  *  Created: Mon Aug 31 00:50:41 2009
00006  *  Copyright  2006-2009  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  Read the full text in the LICENSE.GPL file in the doc directory.
00021  */
00022 
00023 #ifndef __PLUGINS_XMLRPC_METHODS_PLUGIN_H_
00024 #define __PLUGINS_XMLRPC_METHODS_PLUGIN_H_
00025 
00026 #include <xmlrpc-c/registry.hpp>
00027 
00028 namespace fawkes {
00029   class Logger;
00030   class PluginManager;
00031 }
00032 
00033 class XmlRpcPluginMethods {
00034  public:
00035   XmlRpcPluginMethods(xmlrpc_c::registry *registry,
00036                       fawkes::PluginManager *plugin_manager,
00037                       fawkes::Logger *logger);
00038   ~XmlRpcPluginMethods();
00039 
00040   class plugin_list : public xmlrpc_c::method {
00041    public:
00042     plugin_list(fawkes::PluginManager *plugin_manager);
00043     virtual ~plugin_list();
00044     virtual void execute(xmlrpc_c::paramList const& params,
00045                          xmlrpc_c::value *   const  result);
00046    private:
00047     fawkes::PluginManager *__plugin_manager;
00048   };
00049 
00050   class plugin_load : public xmlrpc_c::method {
00051    public:
00052     plugin_load(fawkes::PluginManager *plugin_manager, fawkes::Logger *logger);
00053     virtual ~plugin_load();
00054     virtual void execute(xmlrpc_c::paramList const& params,
00055                          xmlrpc_c::value *   const  result);
00056    private:
00057     fawkes::PluginManager *__plugin_manager;
00058     fawkes::Logger        *__logger;
00059   };
00060 
00061   class plugin_unload : public xmlrpc_c::method {
00062    public:
00063     plugin_unload(fawkes::PluginManager *plugin_manager, fawkes::Logger *logger);
00064     virtual ~plugin_unload();
00065     virtual void execute(xmlrpc_c::paramList const& params,
00066                          xmlrpc_c::value *   const  result);
00067    private:
00068     fawkes::PluginManager *__plugin_manager;
00069     fawkes::Logger        *__logger;
00070   };
00071 
00072  private:
00073   xmlrpc_c::registry *__xmlrpc_registry;
00074 
00075   fawkes::PluginManager *__plugin_manager;
00076   fawkes::Logger        *__logger;
00077   plugin_list           *__plugin_list;
00078   plugin_load           *__plugin_load;
00079   plugin_unload         *__plugin_unload;
00080 };
00081 
00082 #endif