libnd_plugin

Name

libnd_plugin -- 

Synopsis



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);

Description

Details

LND_PluginFunc ()

void        (*LND_PluginFunc)               (LND_Plugin *plugin,
                                             void *user_data);

This is the signature of functions that can be passed to libnd_plugin_foreach().

plugin :

iterated plugin.

user_data :

arbitrary user data.


libnd_plugin_init ()

void        libnd_plugin_init               (void);

The function scans the plugin directories, reads in the plugins it finds and hooks them into the main window.


libnd_plugin_find ()

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 :

name of plugin to look up.

Returns :

plugin with name name, or NULL on failure.


libnd_plugin_run ()

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 :

plugin to run.

trace :

trace to run the plugin on.

user_data :

arbitrary data to pass to plugin implementation.

Returns :

an error code returned by the plugin.


libnd_plugin_get_name ()

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 :

plugin to query.

Returns :

name string.


libnd_plugin_get_author ()

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 :

plugin to query.

Returns :

author name string.


libnd_plugin_get_version ()

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 :

plugin to query.

Returns :

version string.


libnd_plugin_foreach ()

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 :

callback to call for each plugin.

user_data :

arbitrary user data passed through to callback.