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 #include <crm/crm.h>
17
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23
24
25
26
27
28
29 typedef struct pcmk_nvpair_s {
30 char *name;
31 char *value;
32 } pcmk_nvpair_t;
33
34 GSList *pcmk_prepend_nvpair(GSList *nvpairs, const char *name, const char *value);
35 void pcmk_free_nvpairs(GSList *nvpairs);
36
37 xmlNode *crm_create_nvpair_xml(xmlNode *parent, const char *id,
38 const char *name, const char *value);
39 void hash2field(gpointer key, gpointer value, gpointer user_data);
40 void hash2metafield(gpointer key, gpointer value, gpointer user_data);
41 void hash2smartfield(gpointer key, gpointer value, gpointer user_data);
42 GHashTable *xml2list(const xmlNode *parent);
43
44 char *crm_meta_name(const char *field);
45 const char *crm_meta_value(GHashTable *hash, const char *field);
46
47 #ifdef __cplusplus
48 }
49 #endif
50
51 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
52 #include <crm/common/nvpair_compat.h>
53 #endif
54
55 #endif