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 <stdbool.h>
14 #include <glib.h>
15 #include <libxml/tree.h>
16
17 #include <crm/common/rules.h>
18 #include <crm/common/iso8601.h>
19 #include <crm/common/strings_internal.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25
26 typedef struct unpack_data_s {
27 GHashTable *values;
28 const char *first_id;
29 pcmk_rule_input_t rule_input;
30
31
32
33
34
35
36 bool overwrite;
37
38
39 crm_time_t *next_change;
40 } pcmk__nvpair_unpack_t;
41
42 gint pcmk__cmp_nvpair_blocks(gconstpointer a, gconstpointer b,
43 gpointer user_data);
44
45 void pcmk__unpack_nvpair_block(gpointer data, gpointer user_data);
46
47
48
49
50
51
52
53
54
55
56 #define pcmk__insert_meta(obj, name, value) do { \
57 if (pcmk__str_eq((value), "#default", pcmk__str_casei)) { \
58 \
59 pcmk__config_warn("Support for setting meta-attributes " \
60 "(such as %s) to the explicit value " \
61 "'#default' is deprecated and will be " \
62 "removed in a future release", (name)); \
63 } else if ((value) != NULL) { \
64 pcmk__insert_dup((obj)->meta, (name), (value)); \
65 } \
66 } while (0)
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif