This source file includes following definitions.
- pcmk__xe_history_key
1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_HISTORY_INTERNAL__H
11 #define PCMK__CRM_COMMON_HISTORY_INTERNAL__H
12
13 #include <stdio.h>
14 #include <libxml/tree.h>
15
16 #include <crm/common/xml.h>
17 #include <crm/common/internal.h>
18 #include <crm/common/xml_element_internal.h>
19 #include <crm/common/xml_names_internal.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25
26
27
28
29
30
31
32
33 static inline const char *
34 pcmk__xe_history_key(const xmlNode *xml)
35 {
36 if (xml == NULL) {
37 return NULL;
38 } else {
39
40
41
42
43 const char *key = crm_element_value(xml, PCMK__XA_OPERATION_KEY);
44
45 return pcmk__str_empty(key)? pcmk__xe_id(xml) : key;
46 }
47 }
48
49 #ifdef __cplusplus
50 }
51 #endif
52
53 #endif