Elektra
0.8.23
|
Notification feature. More...
Files | |
file | kdbnotification.h |
Elektra-Notification structures and declarations for application developers. | |
file | kdbnotificationinternal.h |
Elektra-Notification structures and declarations for developing notification and transport plugins. | |
Notification feature.
For an introduction to notifications please see the Notification Tutorial.
elektraNotificationOpen() loads and mounts the internalnotification plugin globally at run-time. The key database is not altered permanently. elektraNotificationClose() reverts the mounting.
The internalnotification plugin is mounted at its defined positions (see its plugin docs).
kdb global-mount
the list plugin is mounted at all positions. This plugin allows to mount multiple plugins at a position. If this plugin is present at a position the internalnotification plugin is added to the list plugin's configuration at run-time.Notification transport plugins (or simply transport plugins) export "openNotification" (ElektraNotificationOpenNotification()) and optionally "closeNotification" (ElektraNotificationCloseNotification()) functions as part of their contract.
The function "openNotification" is called during elektraNotificationOpen(). At this point an I/O binding is set and it is save to use it. If no binding is set despite the plugin requires it, it should log a message and perform no additional operations. This ensures that the plugin can be used in applications that do not use I/O bindings or notification features.
ElektraNotificationOpenNotification() receives a callback and additional data. When a key change notification is received (or a change is detected by other means) this callback shall be called with the changed Key and the additional data.