root/tools/crm_mon.h

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

INCLUDED FROM


   1 /*
   2  * Copyright 2019-2021 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 General Public License version 2
   7  * or later (GPLv2+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #include <glib.h>
  11 
  12 #include <crm/common/output_internal.h>
  13 #include <crm/common/curses_internal.h>
  14 #include <crm/pengine/pe_types.h>
  15 #include <crm/stonith-ng.h>
  16 
  17 typedef enum mon_output_format_e {
  18     mon_output_unset,
  19     mon_output_none,
  20     mon_output_monitor,
  21     mon_output_plain,
  22     mon_output_console,
  23     mon_output_xml,
  24     mon_output_legacy_xml,
  25     mon_output_html,
  26     mon_output_cgi
  27 } mon_output_format_t;
  28 
  29 void print_status(pe_working_set_t *data_set, crm_exit_t history_rc,
  30                   stonith_history_t *stonith_history, gboolean fence_history,
  31                   unsigned int section_opts, unsigned int show_opts,
  32                   const char *prefix, GList *unames, GList *resources);
  33 void print_xml_status(pe_working_set_t *data_set, crm_exit_t history_rc,
  34                       stonith_history_t *stonith_history, gboolean fence_history,
  35                       unsigned int section_opts, unsigned int show_opts,
  36                       const char *prefix, GList *unames, GList *resources);
  37 int print_html_status(pe_working_set_t *data_set, crm_exit_t history_rc,
  38                       stonith_history_t *stonith_history, gboolean fence_history,
  39                       unsigned int section_opts, unsigned int show_opts,
  40                       const char *prefix, GList *unames, GList *resources);
  41 
  42 void crm_mon_register_messages(pcmk__output_t *out);
  43 
  44 pcmk__output_t *crm_mon_mk_curses_output(char **argv);
  45 void curses_formatted_printf(pcmk__output_t *out, const char *format, ...) G_GNUC_PRINTF(2, 3);
  46 void curses_formatted_vprintf(pcmk__output_t *out, const char *format, va_list args) G_GNUC_PRINTF(2, 0);
  47 void curses_indented_printf(pcmk__output_t *out, const char *format, ...) G_GNUC_PRINTF(2, 3);
  48 void curses_indented_vprintf(pcmk__output_t *out, const char *format, va_list args) G_GNUC_PRINTF(2, 0);
  49 
  50 void blank_screen(void);
  51 
  52 #if CURSES_ENABLED
  53 extern GOptionEntry crm_mon_curses_output_entries[];
  54 #define CRM_MON_SUPPORTED_FORMAT_CURSES { "console", crm_mon_mk_curses_output, crm_mon_curses_output_entries }
  55 #endif
  56 
  57 pcmk__output_t *crm_mon_mk_xml_output(char **argv);
  58 #define CRM_MON_SUPPORTED_FORMAT_XML { "xml", crm_mon_mk_xml_output, pcmk__xml_output_entries }

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