Elektra  0.9.5
Functions
notification.c File Reference

Implementation of notification functions as defined in kdbnotification.h. More...

#include <kdbassert.h>
#include <kdbease.h>
#include <kdbhelper.h>
#include <kdbinvoke.h>
#include <kdbioprivate.h>
#include <kdblogger.h>
#include <kdbnotification.h>
#include <kdbnotificationinternal.h>
#include <kdbplugin.h>
#include <kdbprivate.h>
#include <stdio.h>
Include dependency graph for notification.c:

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

Detailed Description

Implementation of notification functions as defined in kdbnotification.h.

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