pacemaker  2.0.4-2deceaa
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
output.h File Reference

Formatted output for pacemaker tools. More...

#include <stdbool.h>
#include <stdio.h>
#include <libxml/tree.h>
#include <libxml/HTMLtree.h>
#include <glib.h>
#include <crm/common/results.h>
Include dependency graph for output.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcmk__message_entry_s
 
struct  pcmk__supported_format_s
 
struct  pcmk__output_s
 This structure contains everything that makes up a single output formatter. More...
 

Macros

#define PCMK__API_VERSION   "2.2"
 
#define PCMK__SUPPORTED_FORMAT_HTML   { "html", pcmk__mk_html_output, pcmk__html_output_entries }
 
#define PCMK__SUPPORTED_FORMAT_LOG   { "log", pcmk__mk_log_output, pcmk__log_output_entries }
 
#define PCMK__SUPPORTED_FORMAT_NONE   { "none", pcmk__mk_none_output, pcmk__none_output_entries }
 
#define PCMK__SUPPORTED_FORMAT_TEXT   { "text", pcmk__mk_text_output, pcmk__text_output_entries }
 
#define PCMK__SUPPORTED_FORMAT_XML   { "xml", pcmk__mk_xml_output, pcmk__xml_output_entries }
 

Typedefs

typedef struct pcmk__output_s pcmk__output_t
 
typedef pcmk__output_t *(* pcmk__output_factory_t )(char **argv)
 
typedef int(* pcmk__message_fn_t )(pcmk__output_t *out, va_list args)
 
typedef struct
pcmk__message_entry_s 
pcmk__message_entry_t
 
typedef struct
pcmk__supported_format_s 
pcmk__supported_format_t
 

Functions

pcmk__output_tpcmk__mk_html_output (char **argv)
 
pcmk__output_tpcmk__mk_log_output (char **argv)
 
pcmk__output_tpcmk__mk_none_output (char **argv)
 
pcmk__output_tpcmk__mk_text_output (char **argv)
 
pcmk__output_tpcmk__mk_xml_output (char **argv)
 
int pcmk__call_message (pcmk__output_t *out, const char *message_id,...)
 
void pcmk__output_free (pcmk__output_t *out)
 
int pcmk__output_new (pcmk__output_t **out, const char *fmt_name, const char *filename, char **argv)
 
int pcmk__register_format (GOptionGroup *group, const char *name, pcmk__output_factory_t create, GOptionEntry *options)
 
void pcmk__register_formats (GOptionGroup *group, pcmk__supported_format_t *table)
 
void pcmk__unregister_formats (void)
 
void pcmk__register_message (pcmk__output_t *out, const char *message_id, pcmk__message_fn_t fn)
 
void pcmk__register_messages (pcmk__output_t *out, pcmk__message_entry_t *table)
 
void pcmk__indented_printf (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
 
void void pcmk__indented_vprintf (pcmk__output_t *out, const char *format, va_list args) G_GNUC_PRINTF(2
 
void void xmlNodePtr pcmk__output_xml_create_parent (pcmk__output_t *out, const char *name)
 
void pcmk__output_xml_add_node (pcmk__output_t *out, xmlNodePtr node)
 
xmlNodePtr pcmk__output_create_xml_node (pcmk__output_t *out, const char *name)
 
xmlNodePtr pcmk__output_create_xml_text_node (pcmk__output_t *out, const char *name, const char *content)
 
void pcmk__output_xml_push_parent (pcmk__output_t *out, xmlNodePtr node)
 
void pcmk__output_xml_pop_parent (pcmk__output_t *out)
 
xmlNodePtr pcmk__output_xml_peek_parent (pcmk__output_t *out)
 
xmlNodePtr pcmk__output_create_html_node (pcmk__output_t *out, const char *element_name, const char *id, const char *class_name, const char *text)
 

Variables

GOptionEntry pcmk__html_output_entries []
 
GOptionEntry pcmk__log_output_entries []
 
GOptionEntry pcmk__none_output_entries []
 
GOptionEntry pcmk__text_output_entries []
 
GOptionEntry pcmk__xml_output_entries []
 
void G_GNUC_NULL_TERMINATED
 

Detailed Description

Formatted output for pacemaker tools.

Definition in file output.h.

Macro Definition Documentation

#define PCMK__API_VERSION   "2.2"

Definition at line 30 of file output.h.

#define PCMK__SUPPORTED_FORMAT_HTML   { "html", pcmk__mk_html_output, pcmk__html_output_entries }

Definition at line 139 of file output.h.

#define PCMK__SUPPORTED_FORMAT_LOG   { "log", pcmk__mk_log_output, pcmk__log_output_entries }

Definition at line 140 of file output.h.

#define PCMK__SUPPORTED_FORMAT_NONE   { "none", pcmk__mk_none_output, pcmk__none_output_entries }

Definition at line 141 of file output.h.

#define PCMK__SUPPORTED_FORMAT_TEXT   { "text", pcmk__mk_text_output, pcmk__text_output_entries }

Definition at line 142 of file output.h.

#define PCMK__SUPPORTED_FORMAT_XML   { "xml", pcmk__mk_xml_output, pcmk__xml_output_entries }

Definition at line 143 of file output.h.

Typedef Documentation

typedef int(* pcmk__message_fn_t)(pcmk__output_t *out, va_list args)

Definition at line 60 of file output.h.

typedef pcmk__output_t*(* pcmk__output_factory_t)(char **argv)

Definition at line 44 of file output.h.

Definition at line 32 of file output.h.

Function Documentation

int pcmk__call_message ( pcmk__output_t out,
const char *  message_id,
  ... 
)

Definition at line 116 of file output.c.

void pcmk__indented_printf ( pcmk__output_t out,
const char *  format,
  ... 
)
void void pcmk__indented_vprintf ( pcmk__output_t out,
const char *  format,
va_list  args 
)
pcmk__output_t* pcmk__mk_html_output ( char **  argv)

Definition at line 355 of file output_html.c.

pcmk__output_t* pcmk__mk_log_output ( char **  argv)

Definition at line 220 of file output_log.c.

pcmk__output_t* pcmk__mk_none_output ( char **  argv)

Definition at line 93 of file output_none.c.

pcmk__output_t* pcmk__mk_text_output ( char **  argv)

Definition at line 238 of file output_text.c.

pcmk__output_t* pcmk__mk_xml_output ( char **  argv)

Definition at line 320 of file output_xml.c.

xmlNodePtr pcmk__output_create_html_node ( pcmk__output_t out,
const char *  element_name,
const char *  id,
const char *  class_name,
const char *  text 
)

Definition at line 389 of file output_html.c.

xmlNodePtr pcmk__output_create_xml_node ( pcmk__output_t out,
const char *  name 
)

Definition at line 371 of file output_xml.c.

xmlNodePtr pcmk__output_create_xml_text_node ( pcmk__output_t out,
const char *  name,
const char *  content 
)

Definition at line 380 of file output_xml.c.

void pcmk__output_free ( pcmk__output_t out)

Definition at line 19 of file output.c.

int pcmk__output_new ( pcmk__output_t **  out,
const char *  fmt_name,
const char *  filename,
char **  argv 
)

Definition at line 31 of file output.c.

void pcmk__output_xml_add_node ( pcmk__output_t out,
xmlNodePtr  node 
)

Definition at line 361 of file output_xml.c.

void void xmlNodePtr pcmk__output_xml_create_parent ( pcmk__output_t out,
const char *  name 
)

Definition at line 354 of file output_xml.c.

xmlNodePtr pcmk__output_xml_peek_parent ( pcmk__output_t out)

Definition at line 407 of file output_xml.c.

void pcmk__output_xml_pop_parent ( pcmk__output_t out)

Definition at line 397 of file output_xml.c.

void pcmk__output_xml_push_parent ( pcmk__output_t out,
xmlNodePtr  node 
)

Definition at line 387 of file output_xml.c.

int pcmk__register_format ( GOptionGroup *  group,
const char *  name,
pcmk__output_factory_t  create,
GOptionEntry *  options 
)

Definition at line 77 of file output.c.

void pcmk__register_formats ( GOptionGroup *  group,
pcmk__supported_format_t table 
)

Definition at line 96 of file output.c.

void pcmk__register_message ( pcmk__output_t out,
const char *  message_id,
pcmk__message_fn_t  fn 
)

Definition at line 134 of file output.c.

void pcmk__register_messages ( pcmk__output_t out,
pcmk__message_entry_t table 
)

Definition at line 140 of file output.c.

void pcmk__unregister_formats ( void  )

Definition at line 109 of file output.c.

Variable Documentation

void G_GNUC_NULL_TERMINATED

Definition at line 715 of file output.h.

GOptionEntry pcmk__html_output_entries[]

Definition at line 41 of file output_html.c.

GOptionEntry pcmk__log_output_entries[]

Definition at line 22 of file output_log.c.

GOptionEntry pcmk__none_output_entries[]

Definition at line 15 of file output_none.c.

GOptionEntry pcmk__text_output_entries[]

Definition at line 18 of file output_text.c.

GOptionEntry pcmk__xml_output_entries[]

Definition at line 27 of file output_xml.c.