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_PENGINE_RULES_COMPAT__H
11 # define PCMK__CRM_PENGINE_RULES_COMPAT__H
12
13 #include <glib.h> // gboolean, GHashTable
14 #include <libxml/tree.h> // xmlNode
15 #include <crm/common/iso8601.h> // crm_time_t
16 #include <crm/common/roles.h> // enum rsc_role_e
17 #include <crm/pengine/common_compat.h> // pe_rule_eval_data_t
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /**
24 * \file
25 * \brief Deprecated Pacemaker rule API
26 * \ingroup pengine
27 * \deprecated Do not include this header directly. The rule APIs in this
28 * header, and the header itself, will be removed in a future
29 * release.
30 */
31
32 // @COMPAT sbd's configure script checks for this (as of at least 1.5.2)
33 //! \deprecated Use pcmk_evaluate_rule() instead
34 gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role,
35 crm_time_t *now);
36
37 //! \deprecated Use pcmk_unpack_nvpair_blocks() instead
38 void pe_unpack_nvpairs(xmlNode *top, const xmlNode *xml_obj,
39 const char *set_name, GHashTable *node_hash,
40 GHashTable *hash, const char *always_first,
41 gboolean overwrite, crm_time_t *now,
42 crm_time_t *next_change);
43
44 //! \deprecated Use pcmk_unpack_nvpair_blocks() instead
45 void pe_eval_nvpairs(xmlNode *top, const xmlNode *xml_obj, const char *set_name,
46 const pe_rule_eval_data_t *rule_data, GHashTable *hash,
47 const char *always_first, gboolean overwrite,
48 crm_time_t *next_change);
49
50 #ifdef __cplusplus
51 }
52 #endif
53
54 #endif // PCMK__CRM_PENGINE_RULES_COMPAT__H