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_SCORES__H 11 #define PCMK__CRM_COMMON_SCORES__H 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 /** 18 * \file 19 * \brief Pacemaker APIs related to scores 20 * \ingroup core 21 */ 22 23 //! Integer score to use to represent "infinity" 24 #define PCMK_SCORE_INFINITY 1000000 25 26 int pcmk_parse_score(const char *score_s, int *score, int default_score); 27 const char *pcmk_readable_score(int score); 28 int char2score(const char *score); 29 30 #ifdef __cplusplus 31 } 32 #endif 33 34 #endif // PCMK__CRM_COMMON_SCORES__H