| Elektra 0.11.0

Functions
plugin/plugin.c File Reference

Access plugin handle. More...

`#include <kdbassert.h>`
`#include <kdbinternal.h>`

## Functions
Plugin * | elektraPluginExport (const char *pluginName,...)
| Allows one to Export Methods for a Plugin.
KeySet * | elektraPluginGetConfig (Plugin *handle)
| Returns the configuration of that plugin.
void | elektraPluginSetData (Plugin *plugin, void *data)
| Store a pointer to plugin specific data.
void * | elektraPluginGetData (Plugin *plugin)
| Get a pointer to the plugin specific data stored before.
KeySet * | elektraPluginGetGlobalKeySet (Plugin *plugin)
| Get a pointer to the global keyset.
ElektraKdbPhase | elektraPluginGetPhase (Plugin *plugin)
| Returns the current phase of the current KDB operation.
Plugin * | elektraPluginFromMountpoint (Plugin *plugin, const char *ref)
| Retrieves the handle for another plugin in the same mountpoint based on a reference.

## Detailed Description

Access plugin handle.

Copyright
  BSD License (see LICENSE.md or https://www.libelektra.org)

## Function Documentation

## ◆ elektraPluginFromMountpoint()

Plugin * elektraPluginFromMountpoint | ( | Plugin * | plugin,
|  | const char * | ref
| ) |  |

Retrieves the handle for another plugin in the same mountpoint based on a reference.

The plugins of a mountpoint are defined via `system:/elektra/mountpoint/<mp>/pluigns/<ref>` keys in the declaration of the mountpoint. To use this function, you must provide the `<ref>` part as `ref`.

Parameters

  plugin | active plugin handle
  ref | reference to another plugin

Returns
  the plugin referenced by `ref`

Return values

  NULL | if `plugin`, or `ref` are `NULL`, or no plugin was found for `ref`

## ◆ elektraPluginGetPhase()

ElektraKdbPhase elektraPluginGetPhase | ( | Plugin * | plugin | ) |

Returns the current phase of the current KDB operation.

During kdbGet() this will be one of the `ELEKTRA_KDB_GET_PHASE_*` constants and during kdbSet() it will be one of the `ELEKTRA_KDB_SET_PHASE_*` constants.

Parameters

  plugin | plugin handle

Returns
  current phase

Return values

  0 | if `plugin` is `NULL`