| Elektra 0.11.0

Typedefs
kdbnotificationinternal.h File Reference
Notification

Elektra-Notification structures and declarations for developing notification and transport plugins. More...

`#include "kdb.h"`
`#include "kdbnotification.h"`
`#include "kdbplugin.h"`

## Typedefs
typedef int(* | ElektraNotificationPluginRegisterCallback) (Plugin *handle, Key *key, ElektraNotificationChangeCallback callback, void *context)
| Subscribe for updates via callback when a given key value is changed.
typedef int(* | ElektraNotificationPluginRegisterCallbackSameOrBelow) (Plugin *handle, Key *key, ElektraNotificationChangeCallback callback, void *context)
| Subscribe for updates via callback when a given key or a key below is changed.
typedef void(* | ElektraNotificationSetConversionErrorCallback) (Plugin *handle, ElektraNotificationConversionErrorCallback callback, void *context)
| Allow setting a callback that is called when a value conversion failed.
typedef struct _ElektraNotificationCallbackContext | ElektraNotificationCallbackContext
| Context for notification callbacks.
typedef void(* | ElektraNotificationCallback) (Key *key, ElektraNotificationCallbackContext *context)
| Notify notification library of changes to a key.
typedef void(* | ElektraNotificationKdbUpdate) (KDB *kdb, Key *changedKey)
| Used by notification plugins to get values from the key database.

## Detailed Description

Elektra-Notification structures and declarations for developing notification and transport plugins.

Only available in Elektra's source.

Only used by elektra-notification library, notification plugins (e.g. internalnotification) and transport plugins.

Copyright
  BSD License (see LICENSE.md or https://www.libelektra.org)

## Typedef Documentation

## ◆ ElektraNotificationCallback

typedef void(* ElektraNotificationCallback) (Key *key, ElektraNotificationCallbackContext *context)

Notify notification library of changes to a key.

This callback is provided by the `internalnotification` plugin and for use by notification transport plugins.

Parameters

  key | changed key
  context | additional data

## ◆ ElektraNotificationKdbUpdate

typedef void(* ElektraNotificationKdbUpdate) (KDB *kdb, Key *changedKey)

Used by notification plugins to get values from the key database.

Parameters

  kdb | kdb handle
  changedKey | which key was updated

## ◆ ElektraNotificationPluginRegisterCallback

typedef int(* ElektraNotificationPluginRegisterCallback) (Plugin *handle, Key *key, ElektraNotificationChangeCallback callback, void *context)

Subscribe for updates via callback when a given key value is changed.

Exported as "registerCallback" by notification plugins.

Parameters

  handle | plugin handle
  key | key to watch for changes
  callback | callback function
  context | user supplied context passed to callback function

Return values

  1 | on success
  0 | on failure

## ◆ ElektraNotificationPluginRegisterCallbackSameOrBelow

typedef int(* ElektraNotificationPluginRegisterCallbackSameOrBelow) (Plugin *handle, Key *key, ElektraNotificationChangeCallback callback, void *context)

Subscribe for updates via callback when a given key or a key below is changed.

Exported as "registerCallbackSameOrBelow" by notification plugins.

Parameters

  handle | plugin handle
  key | key to watch for changes
  callback | callback function
  context | user supplied context passed to callback function

Return values

  1 | on success
  0 | on failure

## ◆ ElektraNotificationSetConversionErrorCallback

typedef void(* ElektraNotificationSetConversionErrorCallback) (Plugin *handle, ElektraNotificationConversionErrorCallback callback, void *context)

Allow setting a callback that is called when a value conversion failed.

Exported as "setConversionErrorCallback" notification plugins.

Parameters

  kdb | kdb handle
  callback | callback
  context | context