diff --git a/include/crm/common/resources.h b/include/crm/common/resources.h index 5436394102..5431ddc03a 100644 --- a/include/crm/common/resources.h +++ b/include/crm/common/resources.h @@ -1,100 +1,100 @@ /* * 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_COMMON_RESOURCES__H #define PCMK__CRM_COMMON_RESOURCES__H #include // bool #include // time_t #include // xmlNode #include // gboolean, guint, GList, GHashTable #include // enum rsc_role_e #include // pcmk_resource_t, etc. #ifdef __cplusplus extern "C" { #endif /*! * \file * \brief Scheduler API for resources * \ingroup core */ //! Search options for resources (exact resource ID always matches) enum pe_find { //! Also match clone instance ID from resource history pcmk_rsc_match_history = (1 << 0), //! Also match anonymous clone instances by base name pcmk_rsc_match_anon_basename = (1 << 1), //! Match only clones and their instances, by either clone or instance ID pcmk_rsc_match_clone_only = (1 << 2), //! If matching by node, compare current node instead of assigned node pcmk_rsc_match_current_node = (1 << 3), //! \deprecated Do not use pe_find_inactive = (1 << 4), //! Match clone instances (even unique) by base name as well as exact ID pcmk_rsc_match_basename = (1 << 5), #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) //! \deprecated Use pcmk_rsc_match_history instead pe_find_renamed = pcmk_rsc_match_history, //! \deprecated Use pcmk_rsc_match_anon_basename instead pe_find_anon = pcmk_rsc_match_anon_basename, //! \deprecated Use pcmk_rsc_match_clone_only instead pe_find_clone = pcmk_rsc_match_clone_only, //! \deprecated Use pcmk_rsc_match_current_node instead pe_find_current = pcmk_rsc_match_current_node, //! \deprecated Use pcmk_rsc_match_basename instead pe_find_any = pcmk_rsc_match_basename, #endif }; //! \internal Do not use typedef struct pcmk__resource_private pcmk__resource_private_t; // Implementation of pcmk_resource_t // @COMPAT Make this internal when we can break API backward compatibility //!@{ //! \deprecated Do not use (public access will be removed in a future release) -struct pe_resource_s { +struct pcmk__resource { /* @COMPAT Once all members are moved to pcmk__resource_private_t, * We can make that the pcmk_resource_t implementation and drop this * struct altogether, leaving pcmk_resource_t as an opaque public type. */ pcmk__resource_private_t *private; // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call pcmk_resource_id() instead char *id; // Resource ID in configuration // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Call pcmk_resource_is_managed() instead unsigned long long flags; // Group of enum pcmk__rsc_flags }; //!@} const char *pcmk_resource_id(const pcmk_resource_t *rsc); bool pcmk_resource_is_managed(const pcmk_resource_t *rsc); #ifdef __cplusplus } #endif #endif // PCMK__CRM_COMMON_RESOURCES__H diff --git a/include/crm/common/scheduler_types.h b/include/crm/common/scheduler_types.h index 1620bd05cc..1f972e2c33 100644 --- a/include/crm/common/scheduler_types.h +++ b/include/crm/common/scheduler_types.h @@ -1,39 +1,39 @@ /* * Copyright 2023-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_COMMON_SCHEDULER_TYPES__H #define PCMK__CRM_COMMON_SCHEDULER_TYPES__H #ifdef __cplusplus extern "C" { #endif /*! * \file * \brief Type aliases needed to define scheduler objects * \ingroup core */ //! Node object (including information that may vary depending on resource) typedef struct pcmk__scored_node pcmk_node_t; //! Resource object -typedef struct pe_resource_s pcmk_resource_t; +typedef struct pcmk__resource pcmk_resource_t; //! Action object typedef struct pcmk__action pcmk_action_t; //! Scheduler object typedef struct pe_working_set_s pcmk_scheduler_t; #ifdef __cplusplus } #endif #endif // PCMK__CRM_COMMON_SCHEDULER_TYPES__H diff --git a/include/crm/pengine/pe_types_compat.h b/include/crm/pengine/pe_types_compat.h index 8218e2910f..3e39dbc3a4 100644 --- a/include/crm/pengine/pe_types_compat.h +++ b/include/crm/pengine/pe_types_compat.h @@ -1,56 +1,56 @@ /* * 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_PE_TYPES_COMPAT__H # define PCMK__CRM_PENGINE_PE_TYPES_COMPAT__H #include #ifdef __cplusplus extern "C" { #endif /** * \file * \brief Deprecated Pacemaker scheduler API * \ingroup pengine * \deprecated Do not include this header directly. The scheduler APIs in this * header, and the header itself, will be removed in a future * release. */ // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Do not use #define pe_rsc_managed (1ULL << 1) // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Do not use #define pe_flag_have_quorum pcmk_sched_quorate // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Do not use #define pe_flag_have_stonith_resource pcmk_sched_have_fencing // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Use pcmk_node_t instead typedef struct pcmk__scored_node node_t; // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated use pcmk_resource_t instead -typedef struct pe_resource_s resource_t; +typedef struct pcmk__resource resource_t; // NOTE: sbd (as of at least 1.5.2) uses this //! \deprecated Use pcmk_scheduler_t instead typedef struct pe_working_set_s pe_working_set_t; #ifdef __cplusplus } #endif #endif // PCMK__CRM_PENGINE_PE_TYPES_COMPAT__H