root/include/crm/common/scores.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_SCORES__H
  11 #define PCMK__CRM_COMMON_SCORES__H
  12 
  13 #include <stdbool.h>        // bool
  14 
  15 #ifdef __cplusplus
  16 extern "C" {
  17 #endif
  18 
  19 /**
  20  * \file
  21  * \brief Pacemaker APIs related to scores
  22  * \ingroup core
  23  */
  24 
  25 //! Integer score to use to represent "infinity"
  26 #define PCMK_SCORE_INFINITY 1000000
  27 
  28 int pcmk_parse_score(const char *score_s, int *score, int default_score);
  29 const char *pcmk_readable_score(int score);
  30 bool pcmk_str_is_infinity(const char *s);
  31 bool pcmk_str_is_minus_infinity(const char *s);
  32 
  33 #ifdef __cplusplus
  34 }
  35 #endif
  36 
  37 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
  38 #include <crm/common/scores_compat.h>
  39 #endif
  40 
  41 #endif // PCMK__CRM_COMMON_SCORES__H

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