void (*LND_PluginFunc) (LND_Plugin *plugin, void *user_data); void libnd_plugin_init (void); LND_Plugin* libnd_plugin_find (const char *name); int libnd_plugin_run (LND_Plugin *plugin, LND_Trace *trace, void *user_data); const char* libnd_plugin_get_name (LND_Plugin *plugin); const char* libnd_plugin_get_author (LND_Plugin *plugin); const char* libnd_plugin_get_version (LND_Plugin *plugin); void libnd_plugin_foreach (LND_PluginFunc callback, void *user_data); |
void (*LND_PluginFunc) (LND_Plugin *plugin, void *user_data); |
This is the signature of functions that can be passed to
libnd_plugin_foreach()
.
iterated plugin.
arbitrary user data.
void libnd_plugin_init (void); |
The function scans the plugin directories, reads in the plugins it finds and hooks them into the main window.
LND_Plugin* libnd_plugin_find (const char *name); |
The function scans the list of loaded plugins and returns the plugin of name name, or NULL if no such plugin exists. NOTE: name lookups are case-insensitive.
name of plugin to look up.
plugin with name name, or NULL on failure.
int libnd_plugin_run (LND_Plugin *plugin, LND_Trace *trace, void *user_data); |
The function runs the given plugin on the current trace. If there is no current trace, it just returns.
plugin to run.
trace to run the plugin on.
arbitrary data to pass to plugin implementation.
an error code returned by the plugin.
const char* libnd_plugin_get_name (LND_Plugin *plugin); |
The function returns a pointer to statically allocated memory containing a string describing the plugin.
plugin to query.
name string.
const char* libnd_plugin_get_author (LND_Plugin *plugin); |
The function returns a pointer to statically allocated memory containing a string with the author's name.
plugin to query.
author name string.
const char* libnd_plugin_get_version (LND_Plugin *plugin); |
The function returns a pointer to statically allocated memory containing a string describing the plugin version.
plugin to query.
version string.
void libnd_plugin_foreach (LND_PluginFunc callback, void *user_data); |
The function iterates over the registered plugins and applies a callback function to each of them.
callback to call for each plugin.
arbitrary user data passed through to callback.