This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
/
internalnotification.h
48 lines (38 loc) · 1.7 KB
/
internalnotification.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* @file
*
* @brief Header for internalnotification plugin
*
* @copyright BSD License (see doc/COPYING or http://www.libelektra.org)
*
*/
#ifndef ELEKTRA_PLUGIN_INTERNALNOTIFICATION_H
#define ELEKTRA_PLUGIN_INTERNALNOTIFICATION_H
#include <kdbchangetracking.h>
#include <kdbnotification.h>
#include <kdbnotificationinternal.h>
#include <kdbplugin.h>
int elektraInternalnotificationGet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraInternalnotificationCommit (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraInternalnotificationClose (Plugin * handle, Key * errorKey);
int elektraInternalnotificationOpen (Plugin * handle, Key * errorKey);
Plugin * ELEKTRA_PLUGIN_EXPORT;
// Not exported by plugin; used for testing
void elektraInternalnotificationNotifyChangedKeys (Plugin * plugin, const ElektraDiff * diff);
void elektraInternalnotificationDoUpdate (Key * changedKey, ElektraNotificationCallbackContext * context);
#define INTERNALNOTIFICATION_REGISTER_NAME(TYPE_NAME) elektraInternalnotificationRegister##TYPE_NAME
#define INTERNALNOTIFICATION_EXPORT_FUNCTION(TYPE_NAME) \
keyNew ("system:/elektra/modules/internalnotification/exports/register" #TYPE_NAME, KEY_FUNC, \
INTERNALNOTIFICATION_REGISTER_NAME (TYPE_NAME), KEY_END)
/**
* Structure containing conversion context
* @internal
*/
struct _ElektraInternalnotificationConversionContext
{
void * variable;
ElektraNotificationConversionErrorCallback errorCallback;
void * errorCallbackContext;
};
typedef struct _ElektraInternalnotificationConversionContext _ElektraInternalnotificationConversionContext;
#endif