1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_RULES_INTERNAL__H
11 #define PCMK__CRM_COMMON_RULES_INTERNAL__H
12
13 #include <regex.h>
14 #include <libxml/tree.h>
15
16 #include <crm/common/rules.h>
17 #include <crm/common/iso8601.h>
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 enum pcmk__combine {
24 pcmk__combine_unknown,
25 pcmk__combine_and,
26 pcmk__combine_or,
27 };
28
29 enum expression_type pcmk__condition_type(const xmlNode *condition);
30 char *pcmk__replace_submatches(const char *string, const char *match,
31 const regmatch_t submatches[], int nmatches);
32 enum pcmk__combine pcmk__parse_combine(const char *combine);
33
34 int pcmk__evaluate_date_expression(const xmlNode *date_expression,
35 const crm_time_t *now,
36 crm_time_t *next_change);
37 int pcmk__evaluate_condition(xmlNode *expr, const pcmk_rule_input_t *rule_input,
38 crm_time_t *next_change);
39
40 #ifdef __cplusplus
41 }
42 #endif
43
44 #endif