diff --git a/include/crm/pengine/common.h b/include/crm/pengine/common.h index bc1f50df78..c7e1dc2abc 100644 --- a/include/crm/pengine/common.h +++ b/include/crm/pengine/common.h @@ -1,22 +1,33 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_COMMON__H # define PCMK__CRM_PENGINE_COMMON__H # include # include # include # include +/** + * \file + * \brief Deprecated Pacemaker shared API for scheduler and rules + * \ingroup pengine + * \deprecated Do not include this header directly. The APIs in this + * header, and the header itself, will be removed in a future + * release. + */ + #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) #include +#else +#error Do not include the deprecated header crm/pengine/common.h #endif #endif diff --git a/include/crm/pengine/pe_types.h b/include/crm/pengine/pe_types.h index a5c1200aca..18c11d5dcf 100644 --- a/include/crm/pengine/pe_types.h +++ b/include/crm/pengine/pe_types.h @@ -1,40 +1,40 @@ /* * Copyright 2004-2023 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_PE_TYPES__H # define PCMK__CRM_PENGINE_PE_TYPES__H # include // bool # include // time_t # include // xmlNode # include // gboolean, guint, GList, GHashTable # include # include -# include #ifdef __cplusplus extern "C" { #endif /*! * \file * \brief Data types for cluster status * \ingroup pengine */ #ifdef __cplusplus } #endif #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) +#include #include #endif #endif // PCMK__CRM_PENGINE_PE_TYPES__H diff --git a/include/crm/pengine/rules.h b/include/crm/pengine/rules.h index 24892b78d7..430f10aebc 100644 --- a/include/crm/pengine/rules.h +++ b/include/crm/pengine/rules.h @@ -1,23 +1,23 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_RULES__H # define PCMK__CRM_PENGINE_RULES__H # include # include # include # include -# include #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) +#include #include #endif #endif diff --git a/include/crm/pengine/rules_compat.h b/include/crm/pengine/rules_compat.h index 46644a2ee4..baa331c5e2 100644 --- a/include/crm/pengine/rules_compat.h +++ b/include/crm/pengine/rules_compat.h @@ -1,54 +1,54 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_RULES_COMPAT__H # define PCMK__CRM_PENGINE_RULES_COMPAT__H #include // gboolean, GHashTable #include // xmlNode #include // crm_time_t #include // enum rsc_role_e -#include // pe_rule_eval_data_t +#include // pe_rule_eval_data_t #ifdef __cplusplus extern "C" { #endif /** * \file * \brief Deprecated Pacemaker rule API * \ingroup pengine * \deprecated Do not include this header directly. The rule APIs in this * header, and the header itself, will be removed in a future * release. */ // @COMPAT sbd's configure script checks for this (as of at least 1.5.2) //! \deprecated Use pcmk_evaluate_rule() instead gboolean test_rule(xmlNode *rule, GHashTable *node_hash, enum rsc_role_e role, crm_time_t *now); //! \deprecated Use pcmk_unpack_nvpair_blocks() instead void pe_unpack_nvpairs(xmlNode *top, const xmlNode *xml_obj, const char *set_name, GHashTable *node_hash, GHashTable *hash, const char *always_first, gboolean overwrite, crm_time_t *now, crm_time_t *next_change); //! \deprecated Use pcmk_unpack_nvpair_blocks() instead void pe_eval_nvpairs(xmlNode *top, const xmlNode *xml_obj, const char *set_name, const pe_rule_eval_data_t *rule_data, GHashTable *hash, const char *always_first, gboolean overwrite, crm_time_t *next_change); #ifdef __cplusplus } #endif #endif // PCMK__CRM_PENGINE_RULES_COMPAT__H diff --git a/include/crm/pengine/rules_internal.h b/include/crm/pengine/rules_internal.h index 65e4efcc30..79029c2e96 100644 --- a/include/crm/pengine/rules_internal.h +++ b/include/crm/pengine/rules_internal.h @@ -1,31 +1,30 @@ /* * Copyright 2015-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_RULES_INTERNAL__H #define PCMK__CRM_PENGINE_RULES_INTERNAL__H #include #include #include -#include #include #ifdef __cplusplus extern "C" { #endif GList *pe_unpack_alerts(const xmlNode *alerts); void pe_free_alert_list(GList *alert_list); #ifdef __cplusplus } #endif #endif // PCMK__CRM_PENGINE_RULES_INTERNAL__H diff --git a/include/crm/pengine/status.h b/include/crm/pengine/status.h index d04681d516..80fae41ae4 100644 --- a/include/crm/pengine/status.h +++ b/include/crm/pengine/status.h @@ -1,68 +1,68 @@ /* * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * * This source code is licensed under the GNU Lesser General Public License * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef PCMK__CRM_PENGINE_STATUS__H # define PCMK__CRM_PENGINE_STATUS__H # include // gboolean # include // bool # include // pcmk_is_set() # include -# include # include // pcmk_node_t, pcmk_resource_t, etc. # include #ifdef __cplusplus extern "C" { #endif /*! * \file * \brief Cluster status and scheduling * \ingroup pengine */ const char *rsc_printable_id(const pcmk_resource_t *rsc); // NOTE: sbd (as of at least 1.5.2) uses this gboolean cluster_status(pcmk_scheduler_t *scheduler); // NOTE: sbd (as of at least 1.5.2) uses this pcmk_scheduler_t *pe_new_working_set(void); // NOTE: sbd (as of at least 1.5.2) uses this void pe_free_working_set(pcmk_scheduler_t *scheduler); void set_working_set_defaults(pcmk_scheduler_t *scheduler); void cleanup_calculations(pcmk_scheduler_t *scheduler); // NOTE: sbd (as of at least 1.5.2) uses this void pe_reset_working_set(pcmk_scheduler_t *scheduler); pcmk_resource_t *pe_find_resource(GList *rsc_list, const char *id); pcmk_resource_t *pe_find_resource_with_flags(GList *rsc_list, const char *id, enum pe_find flags); pcmk_node_t *pe_find_node_id(const GList *node_list, const char *id); pcmk_node_t *pe_find_node_any(const GList *node_list, const char *id, const char *node_name); GList *find_operations(const char *rsc, const char *node, gboolean active_filter, pcmk_scheduler_t *scheduler); void calculate_active_ops(const GList *sorted_op_list, int *start_index, int *stop_index); int pe_bundle_replicas(const pcmk_resource_t *rsc); #ifdef __cplusplus } #endif #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) +#include #include #endif #endif