|
Fawkes API
Fawkes Development Version
|
Program to communicate with plugin manager via Fawkes network. More...
#include <tools/plugin/plugin_tool.h>

Public Member Functions | |
| PluginTool (fawkes::ArgumentParser *argp, fawkes::FawkesNetworkClient *c) | |
| Constructor. | |
| PluginTool (fawkes::FawkesNetworkClient *c) | |
| Constructor. | |
| ~PluginTool () | |
| Destructor. | |
| void | handle_signal (int signum) |
| Handle signals. | |
| void | set_load_plugin (const char *plugin_name) |
| Load plugin on next run. | |
| void | set_unload_plugin (const char *plugin_name) |
| Unload plugin on next run. | |
| void | set_watch_mode () |
| Set watch mode. | |
| void | set_list_mode () |
| Set list mode. | |
| void | run () |
| Run opmode as requested determined by the arguments. | |
Public Member Functions inherited from fawkes::SignalHandler | |
| virtual | ~SignalHandler () |
| Virtual destructor. | |
Public Member Functions inherited from fawkes::FawkesNetworkClientHandler | |
| virtual | ~FawkesNetworkClientHandler () |
| Empty virtual destructor. | |
Static Public Member Functions | |
| static void | print_usage (const char *program_name) |
| Print usage. | |
Program to communicate with plugin manager via Fawkes network.
Definition at line 35 of file plugin_tool.h.
| PluginTool::PluginTool | ( | fawkes::ArgumentParser * | argp, |
| fawkes::FawkesNetworkClient * | c | ||
| ) |
Constructor.
| argp | argument parser, three arguments are handled:
|
| c | FawkesNetworkClient with established connection |
Definition at line 47 of file plugin_tool.cpp.
References fawkes::ArgumentParser::arg(), fawkes::ArgumentParser::has_arg(), and fawkes::ArgumentParser::program_name().
| PluginTool::PluginTool | ( | fawkes::FawkesNetworkClient * | c | ) |
Constructor.
This constructor just set the Fawkes network client. A run() call will fail if not one of set_load_plugin(), set_unload_plugin(), set_watch_mode() or set_list_mode() has been called before.
| c | Fawkes network client with established connection |
Definition at line 82 of file plugin_tool.cpp.
| PluginTool::~PluginTool | ( | ) |
Destructor.
Definition at line 92 of file plugin_tool.cpp.
|
virtual |
Handle signals.
| signum | signal number of received signal |
Implements fawkes::SignalHandler.
Definition at line 165 of file plugin_tool.cpp.
|
static |
| void PluginTool::run | ( | ) |
Run opmode as requested determined by the arguments.
Definition at line 393 of file plugin_tool.cpp.
| void PluginTool::set_list_mode | ( | ) |
Set list mode.
On next run() call the client will list all loaded plugins once.
Definition at line 155 of file plugin_tool.cpp.
| void PluginTool::set_load_plugin | ( | const char * | plugin_name | ) |
Load plugin on next run.
The next time run is called a LOAD_PLUGIN message is sent for the given plugin name.
| plugin_name | name of the plugin to load |
Definition at line 121 of file plugin_tool.cpp.
| void PluginTool::set_unload_plugin | ( | const char * | plugin_name | ) |
Unload plugin on next run.
The next time run is called a UNLOAD_PLUGIN message is sent for the given plugin name.
| plugin_name | name of the plugin to unload |
Definition at line 134 of file plugin_tool.cpp.
| void PluginTool::set_watch_mode | ( | ) |
Set watch mode.
On next run() call the client will watch for new events.
Definition at line 145 of file plugin_tool.cpp.