root/include/crm/common/rules_internal.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2004-2024 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #ifndef PCMK__CRM_COMMON_RULES_INTERNAL__H
  11 #define PCMK__CRM_COMMON_RULES_INTERNAL__H
  12 
  13 #include <regex.h>                      // regmatch_t
  14 #include <libxml/tree.h>                // xmlNode
  15 
  16 #include <crm/common/rules.h>           // enum expression_type, etc.
  17 #include <crm/common/iso8601.h>         // crm_time_t
  18 
  19 enum pcmk__combine {
  20     pcmk__combine_unknown,
  21     pcmk__combine_and,
  22     pcmk__combine_or,
  23 };
  24 
  25 enum expression_type pcmk__condition_type(const xmlNode *condition);
  26 char *pcmk__replace_submatches(const char *string, const char *match,
  27                                const regmatch_t submatches[], int nmatches);
  28 enum pcmk__combine pcmk__parse_combine(const char *combine);
  29 
  30 int pcmk__evaluate_date_expression(const xmlNode *date_expression,
  31                                    const crm_time_t *now,
  32                                    crm_time_t *next_change);
  33 int pcmk__evaluate_condition(xmlNode *expr, const pcmk_rule_input_t *rule_input,
  34                              crm_time_t *next_change);
  35 int pcmk__evaluate_rules(xmlNode *xml, const pcmk_rule_input_t *rule_input,
  36                          crm_time_t *next_change);
  37 
  38 #endif // PCMK__CRM_COMMON_RULES_INTERNAL__H

/* [previous][next][first][last][top][bottom][index][help] */