plugin management API More...
#include "gnunet_util_lib.h"
Go to the source code of this file.
Functions | |
void | GPI_plugins_load (const struct GNUNET_CONFIGURATION_Handle *cfg) |
Load transport plugins. More... | |
void | GPI_plugins_unload (void) |
Unload all plugins. More... | |
struct GNUNET_TRANSPORT_PluginFunctions * | GPI_plugins_find (const char *name) |
Obtain the plugin API based on a plugin name. More... | |
plugin management API
Definition in file gnunet-peerinfo_plugins.h.
void GPI_plugins_load | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg | ) |
Load transport plugins.
cfg | configuration to use |
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().