Interna of plugin functionality.
More...
#include <kdbassert.h>
#include <kdberrors.h>
#include <kdbinternal.h>
#include <kdbversion.h>
|
| int | elektraProcessPlugin (Key *cur, int *pluginNumber, char **pluginName, char **referenceName, Key *errorKey) |
| int | elektraProcessPlugins (Plugin **plugins, KeySet *modules, KeySet *referencePlugins, KeySet *config, KeySet *systemConfig, KeySet *global, Key *errorKey) |
| | Load a plugin.
|
| Plugin * | elektraPluginOpen (const char *name, KeySet *modules, KeySet *config, Key *errorKey) |
| | Opens a plugin.
|
| size_t | elektraPluginGetFunction (Plugin *plugin, const char *name) |
| | Retrieves a function exported by a plugin.
|
Interna of plugin functionality.
- Copyright
- BSD License (see LICENSE.md or https://www.libelektra.org)
◆ elektraPluginGetFunction()
| size_t elektraPluginGetFunction |
( |
Plugin * | plugin, |
|
|
const char * | name ) |
Retrieves a function exported by a plugin.
- Parameters
-
| Plugins | Plugin handle |
| name | Function name |
- Returns
- Pointer to function. NULL if function not found or not enough memory available
◆ elektraPluginOpen()
| Plugin * elektraPluginOpen |
( |
const char * | name, |
|
|
KeySet * | modules, |
|
|
KeySet * | config, |
|
|
Key * | errorKey ) |
Opens a plugin.
The config will be used as is. So be sure to transfer ownership of the config to it, with e.g. ksDup(). elektraPluginClose() will delete the config.
- Returns
- a pointer to a new created plugin or 0 on error
◆ elektraProcessPlugin()
| int elektraProcessPlugin |
( |
Key * | cur, |
|
|
int * | pluginNumber, |
|
|
char ** | pluginName, |
|
|
char ** | referenceName, |
|
|
Key * | errorKey ) |
- Return values
-
| 1 | and an allocated string of the pluginName if a new plugins should be created. |
| 2 | and an allocated string of the referenceName if an old plugin should be used |
| 3 | and both if a new plugin should be created and made available for later back referencing. |
| -1 | on error |
◆ elektraProcessPlugins()
| int elektraProcessPlugins |
( |
Plugin ** | plugins, |
|
|
KeySet * | modules, |
|
|
KeySet * | referencePlugins, |
|
|
KeySet * | config, |
|
|
KeySet * | systemConfig, |
|
|
KeySet * | global, |
|
|
Key * | errorKey ) |
Load a plugin.
The array of plugins must be set to 0. Its length is NR_OF_PLUGINS.
systemConfig will only be used, not deleted.
- Parameters
-
| config | the config with the information how the plugins should be put together |
| systemConfig | the shared (system) config for the plugins. Every plugin additional get this config. |
| global | the global keyset of the KDB instance |
- Return values
-