$darkmode
Elektra 0.10.0
Functions
elektra/plugin.c File Reference

Interna of plugin functionality. More...

#include <kdbassert.h>
#include <kdberrors.h>
#include <kdbinternal.h>
#include <kdbversion.h>
Include dependency graph for elektra/plugin.c:

Functions

Plugin * elektraPluginOpen (const char *name, KeySet *modules, KeySet *config, Key *errorKey)
 Opens a plugin. More...
 
size_t elektraPluginGetFunction (Plugin *plugin, const char *name)
 Retrieves a function exported by a plugin. More...
 

Detailed Description

Interna of plugin functionality.

Function Documentation

◆ elektraPluginGetFunction()

size_t elektraPluginGetFunction ( Plugin *  plugin,
const char *  name 
)

Retrieves a function exported by a plugin.

Parameters
pluginPlugin handle
nameFunction name. Must be a valid key name suffix. May not contain the sequence '..'
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