forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.h
56 lines (43 loc) · 1 KB
/
type.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
49
50
51
52
53
54
55
56
/**
* @file
*
* @brief
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#ifndef ELEKTRA_PLUGIN_TYPE_H
#define ELEKTRA_PLUGIN_TYPE_H
#include <stdbool.h>
#include <kdbplugin.h>
#include <kdbtypes.h>
#ifdef __cplusplus
extern "C" {
namespace ckdb
{
#endif
typedef struct _Type Type;
struct boolean_pair
{
const char * trueValue;
const char * falseValue;
};
typedef struct
{
kdb_long_long_t booleanRestore;
struct boolean_pair * booleans;
kdb_long_long_t booleanCount;
} TypeData;
int elektraTypeOpen (Plugin * handle, Key * errorKey);
int elektraTypeGet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraTypeSet (Plugin * handle, KeySet * ks, Key * parentKey);
int elektraTypeClose (Plugin * handle, Key * errorKey);
int elektraTypeCheckConf (Key * errorKey, KeySet * conf);
bool elektraTypeCheckType (const Key * key);
bool elektraTypeValidateKey (Plugin * handle, Key * key, Key * errorKey);
Plugin * ELEKTRA_PLUGIN_EXPORT;
#ifdef __cplusplus
}
};
#endif
#endif