$darkmode
Elektra 0.11.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...
 
const char * elektraPluginPhaseName (ElektraKdbPhase phase)
 Gets a string with the name of the given constant for a plugin phase. 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

◆ elektraPluginPhaseName()

const char* elektraPluginPhaseName ( ElektraKdbPhase  phase)

Gets a string with the name of the given constant for a plugin phase.

Parameters
phaseThe ElektraKdbPhase value for which a string representation should be returned
Returns
A string with the name of the given phase. The returned string is a constant value and must never be freed!
Return values
???if an unknown value for the phase was given