Elektra 0.11.0
|
Elektra-Notification structures and declarations for application developers. More...
#include "kdb.h"
#include "kdbtypes.h"
Typedefs | |
typedef void(* | ElektraNotificationConversionErrorCallback) (Key *key, void *context) |
Callback function called when string to number conversion failed. | |
typedef void(* | ElektraNotificationChangeCallback) (Key *key, void *context) |
Callback function for key changes. | |
Functions | |
int | elektraNotificationContract (KeySet *contract) |
Creates a contract for use with kdbOpen() that sets up notifications. | |
int | elektraNotificationRegisterCallback (KDB *kdb, Key *key, ElektraNotificationChangeCallback callback, void *context) |
Subscribe for updates via callback when a given key value is changed. | |
int | elektraNotificationRegisterCallbackSameOrBelow (KDB *kdb, Key *key, ElektraNotificationChangeCallback callback, void *context) |
Subscribe for updates via callback when a given key or a key below changed. | |
ELEKTRA_NOTIFICATION_REGISTER_SIGNATURE (int, Int) | |
Subscribe for automatic updates to a given variable when the given key value is changed. | |
Elektra-Notification structures and declarations for application developers.
int elektraNotificationContract | ( | KeySet * | contract | ) |
Creates a contract for use with kdbOpen() that sets up notifications.
When you call kdbOpen() with this contract, the internalnotification
plugin will be mounted automatically. This allows you to call other elektraNotification*
functions.
If you need to configure notification transport plugins, you should manually add the relevant keys to contract
.
contract | The keyset into which the contract is written. |
-1 | if contract is NULL |
0 | on success |