|
| ElektraInvokeHandle * | elektraInvokeInitialize (const char *elektraPluginName) |
| ElektraInvokeHandle * | elektraInvokeOpen (const char *elektraPluginName, KeySet *config, Key *errorKey) |
| | Opens a new handle to invoke functions for a plugin.
|
| const void * | elektraInvokeGetFunction (ElektraInvokeHandle *handle, const char *elektraPluginFunctionName) |
| | Get a function pointer.
|
| KeySet * | elektraInvokeGetPluginConfig (ElektraInvokeHandle *handle) |
| | Get the configuration the plugin uses.
|
| const char * | elektraInvokeGetPluginName (ElektraInvokeHandle *handle) |
| | Get the name of the plugin.
|
| void * | elektraInvokeGetPluginData (ElektraInvokeHandle *handle) |
| | Get the data of the plugin.
|
| KeySet * | elektraInvokeGetModules (ElektraInvokeHandle *handle) |
| | Get the modules used for invoking.
|
| KeySet * | elektraInvokeGetExports (ElektraInvokeHandle *handle) |
| | Get the exports from the plugin.
|
| int | elektraInvoke2Args (ElektraInvokeHandle *handle, const char *elektraPluginFunctionName, KeySet *ks, Key *k) |
| | A convenience function to call a function with two arguments.
|
| void | elektraInvokeClose (ElektraInvokeHandle *handle, Key *errorKey) |
| | Closes all affairs with the handle.
|
| int | elektraInvokeCallDeferable (ElektraInvokeHandle *handle, const char *elektraPluginFunctionName, KeySet *parameters) |
| | Invokes a deferable function on an invoke handle.
|
| void | elektraInvokeExecuteDeferredCalls (ElektraInvokeHandle *handle, ElektraDeferredCallList *list) |
| | Execute deferred calls from list on given invoke handle.
|
| int | elektraDeferredCall (Plugin *handle, const char *elektraPluginFunctionName, KeySet *parameters) |
| | Call a deferable function on a plugin handle.
|
| int | elektraDeferredCallAdd (ElektraDeferredCallList *list, const char *name, KeySet *parameters) |
| | Add a new deferred call to the deferred call list.
|
| ElektraDeferredCallList * | elektraDeferredCallCreateList (void) |
| | Create new deferred call list.
|
| void | elektraDeferredCallDeleteList (ElektraDeferredCallList *list) |
| | Delete deferred call list.
|
| void | elektraDeferredCallsExecute (Plugin *plugin, ElektraDeferredCallList *list) |
| | Execute deferred calls on given plugin.
|
Functionality to use plugins and invoke functions.
Allows invoking functions of plugins as needed within applications and plugins inside and outside of the KDB.
To use this library, you need to include:
and link against libelektra-invoke. Then you can use it:
void elektraInvokeClose(ElektraInvokeHandle *handle, Key *errorKey)
Closes all affairs with the handle.
Definition invoke.c:318
int elektraInvoke2Args(ElektraInvokeHandle *handle, const char *elektraPluginFunctionName, KeySet *ks, Key *k)
A convenience function to call a function with two arguments.
Definition invoke.c:293
ElektraInvokeHandle * elektraInvokeOpen(const char *elektraPluginName, KeySet *config, Key *errorKey)
Opens a new handle to invoke functions for a plugin.
Definition invoke.c:94
| int elektraDeferredCall |
( |
Plugin * | handle, |
|
|
const char * | elektraPluginFunctionName, |
|
|
KeySet * | parameters ) |
Call a deferable function on a plugin handle.
If the function is exported by the plugin it is directly invoked, if the plugin supports deferring calls, the call is deferred. If both is possible (function is exported and deferred calls are supported), the function is directly called and the call is deferred (i.e. for nested plugins).
- Parameters
-
| handle | invoke handle |
| elektraPluginFunctionName | function name |
| parameters | parameter key set. Can bee freed afterwards. |
- Return values
-
| 0 | on success |
| -1 | when the call failed (direct call and deferring not available) |
| int elektraInvokeCallDeferable |
( |
ElektraInvokeHandle * | handle, |
|
|
const char * | elektraPluginFunctionName, |
|
|
KeySet * | parameters ) |
Invokes a deferable function on an invoke handle.
If the function is exported by the plugin it is directly invoked, if the plugin supports deferring calls, the call is deferred.
The parameters key set can be freed afterwards.
- Parameters
-
| handle | invoke handle |
| elektraPluginFunctionName | function name |
| parameters | parameter key set |
- Return values
-
| 0 | on success |
| -1 | when the call failed (direct call and deferring not available) |