18 #ifndef PENGINE_UNPACK__H
19 # define PENGINE_UNPACK__H
48 extern const char *
param_value(GHashTable * hash, xmlNode * parent,
const char *name);
55 # if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBCURSES)
56 # if defined(HAVE_NCURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
58 # define CURSES_ENABLED 1
59 # elif defined(HAVE_NCURSES_NCURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
60 # include <ncurses/ncurses.h>
61 # define CURSES_ENABLED 1
62 # elif defined(HAVE_CURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
64 # define CURSES_ENABLED 1
65 # elif defined(HAVE_CURSES_CURSES_H) && !defined(HAVE_INCOMPATIBLE_PRINTW)
66 # include <curses/curses.h>
67 # define CURSES_ENABLED 1
69 # define CURSES_ENABLED 0
72 # define CURSES_ENABLED 0
76 # define status_printw(fmt, args...) printw(fmt, ##args)
78 # define status_printw(fmt, args...) \
79 crm_err("printw support requires ncurses to be available during configure"); \
80 do_crm_log(LOG_WARNING, fmt, ##args);
83 # define status_print(fmt, args...) \
84 if(options & pe_print_html) { \
85 FILE *stream = print_data; \
86 fprintf(stream, fmt, ##args); \
87 } else if(options & pe_print_ncurses) { \
88 status_printw(fmt, ##args); \
89 } else if(options & pe_print_printf) { \
90 FILE *stream = print_data; \
91 fprintf(stream, fmt, ##args); \
92 } else if(options & pe_print_xml) { \
93 FILE *stream = print_data; \
94 fprintf(stream, fmt, ##args); \
95 } else if(options & pe_print_log) { \
96 int log_level = *(int*)print_data; \
97 do_crm_log(log_level, fmt, ##args); \
gboolean unpack_remote_status(xmlNode *status, pe_working_set_t *data_set)
gboolean unpack_domains(xmlNode *xml_domains, pe_working_set_t *data_set)
gboolean unpack_lrm_resources(node_t *node, xmlNode *lrm_state, pe_working_set_t *data_set)
gint sort_op_by_callid(gconstpointer a, gconstpointer b)
gboolean unpack_config(xmlNode *config, pe_working_set_t *data_set)
gboolean unpack_nodes(xmlNode *xml_nodes, pe_working_set_t *data_set)
const char * param_value(GHashTable *hash, xmlNode *parent, const char *name)
gboolean determine_online_status(xmlNode *node_state, node_t *this_node, pe_working_set_t *data_set)
gboolean add_node_attrs(xmlNode *attrs, node_t *node, gboolean overwrite, pe_working_set_t *data_set)
gboolean unpack_resources(xmlNode *xml_resources, pe_working_set_t *data_set)
gboolean unpack_tags(xmlNode *xml_tags, pe_working_set_t *data_set)
gboolean unpack_remote_nodes(xmlNode *xml_resources, pe_working_set_t *data_set)
gboolean unpack_status(xmlNode *status, pe_working_set_t *data_set)