root/lib/pengine/pe_status_private.h

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

INCLUDED FROM


   1 /*
   2  * Copyright 2018-2020 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 PE_STATUS_PRIVATE__H
  11 #  define PE_STATUS_PRIVATE__H
  12 
  13 /* This header is for the sole use of libpe_status, so that functions can be
  14  * declared with G_GNUC_INTERNAL for efficiency.
  15  */
  16 
  17 #  if CURSES_ENABLED
  18 #    define status_printw(fmt, args...) printw(fmt, ##args)
  19 #  else
  20 #    define status_printw(fmt, args...) \
  21    crm_err("printw support requires ncurses to be available during configure"); \
  22    do_crm_log(LOG_WARNING, fmt, ##args);
  23 #  endif
  24 
  25 #  define status_print(fmt, args...)           \
  26    if(options & pe_print_html) {           \
  27        FILE *stream = print_data;      \
  28        fprintf(stream, fmt, ##args);       \
  29    } else if(options & pe_print_ncurses) {     \
  30        status_printw(fmt, ##args);     \
  31    } else if(options & pe_print_printf) {      \
  32        FILE *stream = print_data;      \
  33        fprintf(stream, fmt, ##args);       \
  34    } else if(options & pe_print_xml) {     \
  35        FILE *stream = print_data;      \
  36        fprintf(stream, fmt, ##args);       \
  37    } else if(options & pe_print_log) {     \
  38        int log_level = *(int*)print_data;  \
  39        do_crm_log(log_level, fmt, ##args); \
  40    }
  41 
  42 G_GNUC_INTERNAL
  43 pe_resource_t *pe__create_clone_child(pe_resource_t *rsc,
  44                                       pe_working_set_t *data_set);
  45 
  46 G_GNUC_INTERNAL
  47 void pe__force_anon(const char *standard, pe_resource_t *rsc, const char *rid,
  48                     pe_working_set_t *data_set);
  49 
  50 G_GNUC_INTERNAL
  51 gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set);
  52 
  53 G_GNUC_INTERNAL
  54 gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set);
  55 
  56 G_GNUC_INTERNAL
  57 gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set);
  58 
  59 G_GNUC_INTERNAL
  60 gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set);
  61 
  62 G_GNUC_INTERNAL
  63 gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set);
  64 
  65 G_GNUC_INTERNAL
  66 gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set);
  67 
  68 #endif  // PE_STATUS_PRIVATE__H

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