1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_NVPAIR_INTERNAL__H
11 #define PCMK__CRM_COMMON_NVPAIR_INTERNAL__H
12
13 #include <glib.h>
14 #include <libxml/tree.h>
15
16 #include <crm/common/rules.h>
17 #include <crm/common/iso8601.h>
18 #include <crm/common/strings_internal.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24
25 typedef struct unpack_data_s {
26 GHashTable *values;
27 const char *first_id;
28 pcmk_rule_input_t rule_input;
29
30
31 bool overwrite;
32
33
34 crm_time_t *next_change;
35 } pcmk__nvpair_unpack_t;
36
37
38
39
40
41
42
43
44
45 #define pcmk__insert_meta(obj, name, value) do { \
46 if (pcmk__str_eq((value), "#default", pcmk__str_casei)) { \
47 \
48 pcmk__config_warn("Support for setting meta-attributes " \
49 "(such as %s) to the explicit value " \
50 "'#default' is deprecated and will be " \
51 "removed in a future release", (name)); \
52 } else if ((value) != NULL) { \
53 pcmk__insert_dup((obj)->meta, (name), (value)); \
54 } \
55 } while (0)
56
57 int pcmk__xe_get_datetime(const xmlNode *xml, const char *attr, crm_time_t **t);
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif