1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_NVPAIR__H
11 #define PCMK__CRM_COMMON_NVPAIR__H
12
13 #include <sys/time.h>
14 #include <glib.h>
15 #include <libxml/tree.h>
16
17 #include <crm/crm.h>
18 #include <crm/common/iso8601.h>
19 #include <crm/common/rules.h>
20
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26
27
28
29
30
31
32 typedef struct pcmk_nvpair_s {
33 char *name;
34 char *value;
35 } pcmk_nvpair_t;
36
37 GSList *pcmk_prepend_nvpair(GSList *nvpairs, const char *name, const char *value);
38 void pcmk_free_nvpairs(GSList *nvpairs);
39
40 xmlNode *crm_create_nvpair_xml(xmlNode *parent, const char *id,
41 const char *name, const char *value);
42 void hash2field(gpointer key, gpointer value, gpointer user_data);
43 void hash2metafield(gpointer key, gpointer value, gpointer user_data);
44 void hash2smartfield(gpointer key, gpointer value, gpointer user_data);
45 GHashTable *xml2list(const xmlNode *parent);
46
47 void pcmk_unpack_nvpair_blocks(const xmlNode *xml, const char *element_name,
48 const char *first_id,
49 const pcmk_rule_input_t *rule_input,
50 GHashTable *values, crm_time_t *next_change);
51
52 char *crm_meta_name(const char *field);
53 const char *crm_meta_value(GHashTable *hash, const char *field);
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
60 #include <crm/common/nvpair_compat.h>
61 #endif
62
63 #endif