Elektra-Notification structures and declarations for application developers.
More...
#include "kdb.h"
Elektra-Notification structures and declarations for application developers.
- Copyright
- BSD License (see LICENSE.md or https://www.libelektra.org)
◆ ElektraNotificationChangeCallback
typedef void(* ElektraNotificationChangeCallback) (Key *key) |
Callback function for key changes.
- Parameters
-
◆ elektraNotificationClose()
int elektraNotificationClose |
( |
KDB * |
kdb | ) |
|
Stop the notification system for the given KDB instance.
May only be called after elektraNotificationOpen() was called for given KDB instance.
- Parameters
-
- Return values
-
◆ elektraNotificationOpen()
int elektraNotificationOpen |
( |
KDB * |
kdb | ) |
|
Initialize the notification system for the given KDB instance.
Asynchronous receiving of notifications requires an I/O binding. Use elektraIoSetBinding() before calling this function.
May only be called once for a KDB instance. Subsequent calls return 0.
- Parameters
-
- Return values
-
◆ elektraNotificationRegisterCallback()
Subscribe for updates via callback when a given key value is changed.
- Parameters
-
handle | plugin handle |
key | key to watch for changes |
callback | callback function |
- Return values
-
◆ elektraNotificationRegisterInt()
int elektraNotificationRegisterInt |
( |
KDB * |
kdb, |
|
|
Key * |
key, |
|
|
int * |
variable |
|
) |
| |
Subscribe for automatic updates to a given integer variable when the given key value is changed.
- Parameters
-
handle | plugin handle |
key | key to watch for changes |
variable | integer variable |
- Return values
-