plugin management More...
#include "platform.h"
#include "gnunet-peerinfo_plugins.h"
#include "gnunet_transport_plugin.h"
#include "gnunet_hello_lib.h"
Go to the source code of this file.
Data Structures | |
struct | TransportPlugin |
Entry in doubly-linked list of all of our plugins. More... | |
Functions | |
void | GPI_plugins_load (const struct GNUNET_CONFIGURATION_Handle *cfg) |
Load and initialize all plugins. More... | |
void | GPI_plugins_unload () |
Unload all plugins. More... | |
struct GNUNET_TRANSPORT_PluginFunctions * | GPI_plugins_find (const char *name) |
Obtain the plugin API based on a plugin name. More... | |
Variables | |
static struct TransportPlugin * | plugins_head |
Head of DLL of all loaded plugins. More... | |
static struct TransportPlugin * | plugins_tail |
Head of DLL of all loaded plugins. More... | |
plugin management
Definition in file gnunet-peerinfo_plugins.c.
void GPI_plugins_load | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg | ) |
Load and initialize all plugins.
Load transport plugins.
The respective functions will be invoked by the plugins when the respective events happen. The closure will be set to a 'const char*' containing the name of the plugin that caused the call.
cfg | configuration to use |
Definition at line 89 of file gnunet-peerinfo_plugins.c.
References _, TransportPlugin::api, cfg, GNUNET_TRANSPORT_PluginEnvironment::cfg, GNUNET_TRANSPORT_PluginEnvironment::cls, TransportPlugin::env, GNUNET_asprintf(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONTAINER_DLL_insert, GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_INFO, GNUNET_free, GNUNET_log, GNUNET_new, GNUNET_OK, GNUNET_PLUGIN_load(), GNUNET_strdup, TransportPlugin::lib_name, TransportPlugin::next, plugins_head, plugins_tail, and TransportPlugin::short_name.
Referenced by libgnunet_plugin_dhtu_gnunet_init(), and state_machine().
void GPI_plugins_unload | ( | void | ) |
Unload all plugins.
Definition at line 142 of file gnunet-peerinfo_plugins.c.
References TransportPlugin::api, GNUNET_break, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_PLUGIN_unload(), TransportPlugin::lib_name, plugins_head, plugins_tail, and TransportPlugin::short_name.
Referenced by libgnunet_plugin_dhtu_gnunet_done(), and shutdown_task().
struct GNUNET_TRANSPORT_PluginFunctions* GPI_plugins_find | ( | const char * | name | ) |
Obtain the plugin API based on a plugin name.
name | name of the plugin |
Definition at line 164 of file gnunet-peerinfo_plugins.c.
References GNUNET_free, GNUNET_strdup, head, name, PendingResolutions::next, and plugins_head.
Referenced by gnunet_try_connect(), parse_hello_uri(), peerinfo_cb(), and print_my_uri().
|
static |
Head of DLL of all loaded plugins.
Definition at line 72 of file gnunet-peerinfo_plugins.c.
Referenced by GPI_plugins_find(), GPI_plugins_load(), and GPI_plugins_unload().
|
static |
Head of DLL of all loaded plugins.
Definition at line 77 of file gnunet-peerinfo_plugins.c.
Referenced by GPI_plugins_load(), and GPI_plugins_unload().