Elektra  0.8.23
Files
Notification

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.
 

Detailed Description

Notification feature.

For an introduction to notifications please see the Notification Tutorial.

Global Mounting

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).

Transport Plugins

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.