$darkmode
Elektra 0.9.12
Typedefs | Functions
kdbnotification.h File Reference

Elektra-Notification structures and declarations for application developers. More...

#include "kdb.h"
#include "kdbtypes.h"
Include dependency graph for kdbnotification.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef void(* ElektraNotificationConversionErrorCallback) (Key *key, void *context)
 Callback function called when string to number conversion failed. More...
 
typedef void(* ElektraNotificationChangeCallback) (Key *key, void *context)
 Callback function for key changes. More...
 

Functions

int elektraNotificationContract (KeySet *contract)
 Creates a contract for use with kdbOpen() that sets up notifications. More...
 
int elektraNotificationRegisterCallback (KDB *kdb, Key *key, ElektraNotificationChangeCallback callback, void *context)
 Subscribe for updates via callback when a given key value is changed. More...
 
int elektraNotificationRegisterCallbackSameOrBelow (KDB *kdb, Key *key, ElektraNotificationChangeCallback callback, void *context)
 Subscribe for updates via callback when a given key or a key below changed. More...
 
int elektraNotificationRegisterInt (KDB *kdb, Key *key, int *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterUnsignedInt (KDB *kdb, Key *key, unsigned int *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterLong (KDB *kdb, Key *key, long *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterUnsignedLong (KDB *kdb, Key *key, unsigned long *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterLongLong (KDB *kdb, Key *key, long long *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterUnsignedLongLong (KDB *kdb, Key *key, unsigned long long *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterFloat (KDB *kdb, Key *key, float *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterDouble (KDB *kdb, Key *key, double *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbBoolean (KDB *kdb, Key *key, kdb_boolean_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbChar (KDB *kdb, Key *key, kdb_char_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbOctet (KDB *kdb, Key *key, kdb_octet_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbShort (KDB *kdb, Key *key, kdb_short_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbUnsignedShort (KDB *kdb, Key *key, kdb_unsigned_short_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbLong (KDB *kdb, Key *key, kdb_long_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbUnsignedLong (KDB *kdb, Key *key, kdb_unsigned_long_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbLongLong (KDB *kdb, Key *key, kdb_long_long_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbUnsignedLongLong (KDB *kdb, Key *key, kdb_unsigned_long_long_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbFloat (KDB *kdb, Key *key, kdb_float_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 
int elektraNotificationRegisterKdbDouble (KDB *kdb, Key *key, kdb_double_t *variable)
 Subscribe for automatic updates to a given variable when the given key value is changed. More...
 

Detailed Description

Elektra-Notification structures and declarations for application developers.

Function Documentation

◆ elektraNotificationContract()

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.

Parameters
contractThe keyset into which the contract is written.
Return values
-1if contract is NULL
0on success