Implementation of notification functions as defined in kdbnotification.h.
More...
#include <kdbassert.h>
#include <kdbease.h>
#include <kdbinternal.h>
#include <kdbioprivate.h>
#include <kdblogger.h>
#include <kdbnotification.h>
#include <kdbnotificationinternal.h>
#include <stdio.h>
Implementation of notification functions as defined in kdbnotification.h.
- Copyright
- BSD License (see LICENSE.md or https://www.libelektra.org)
◆ 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
-