Elektra  0.8.23
Typedefs
kdbnotificationinternal.h File Reference

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

#include "kdb.h"
#include "kdbnotification.h"
#include "kdbplugin.h"
Include dependency graph for kdbnotificationinternal.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef int(* ElektraNotificationPluginRegisterInt) (Plugin *handle, Key *key, int *variable)
 Subscribe for automatic updates to a given integer variable when the given key value is changed. More...
 
typedef int(* ElektraNotificationPluginRegisterCallback) (Plugin *handle, Key *key, ElektraNotificationChangeCallback callback)
 Subscribe for updates via callback when a given key value is changed. More...
 
typedef struct _ElektraNotificationCallbackContext ElektraNotificationCallbackContext
 Context for notification callbacks.
 
typedef void(* ElektraNotificationCallback) (Key *key, ElektraNotificationCallbackContext *context)
 Notify notification library of changes to a key. More...
 
typedef void(* ElektraNotificationOpenNotification) (Plugin *handle, KeySet *parameters)
 Initialize plugin's notification capabilities. More...
 
typedef void(* ElektraNotificationCloseNotification) (Plugin *handle, KeySet *parameters)
 Teardown plugin's notification capabilities. More...
 

Detailed Description

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

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

Typedef Documentation

◆ ElektraNotificationCallback

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

Notify notification library of changes to a key.

This callback is passed by elektraNotificationOpen to plugins exporting a openNotification function.

Parameters
keychanged key
contextcontext passed by ElektraNotificationOpenNotification

◆ ElektraNotificationCloseNotification

typedef void(* ElektraNotificationCloseNotification) (Plugin *handle, KeySet *parameters)

Teardown plugin's notification capabilities.

Exported as "closeNotification" by transport plugins.

Parameters
handleplugin handle
parametersunused

◆ ElektraNotificationOpenNotification

typedef void(* ElektraNotificationOpenNotification) (Plugin *handle, KeySet *parameters)

Initialize plugin's notification capabilities.

Exported as "openNotification" by transport plugins.

Parameters
handleplugin handle
parameterscontains the keys "/callback" (ElektraNotificationCallback * ) and "/context" (ElektraNotificationCallbackContext *).

◆ ElektraNotificationPluginRegisterCallback

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

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

Parameters
handleplugin handle
keykey to watch for changes
callbackcallback function
Return values
1on success
0on failure

◆ ElektraNotificationPluginRegisterInt

typedef int(* ElektraNotificationPluginRegisterInt) (Plugin *handle, Key *key, int *variable)

Subscribe for automatic updates to a given integer variable when the given key value is changed.

Parameters
handleplugin handle
keykey to watch for changes
variableinteger variable
Return values
1on success
0on failure