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

Formatted output for pacemaker tools. More...

#include <stdbool.h>
#include <stdio.h>
#include <libxml/tree.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__output_s
 This structure contains everything that makes up a single output formatter. More...
 

Macros

#define PCMK__API_VERSION   "1.0"
 
#define PCMK__OUTPUT_OPTIONS(fmts)
 

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
 

Functions

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, crm_exit_t exit_status)
 
int pcmk__output_new (pcmk__output_t **out, const char *fmt_name, const char *filename, char **argv)
 
bool pcmk__parse_output_args (const char *argname, char *argvalue, char **output_ty, char **output_dest)
 
int pcmk__register_format (const char *fmt_name, pcmk__output_factory_t create)
 
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__xml_add_node (pcmk__output_t *out, xmlNodePtr node)
 
void pcmk__xml_push_parent (pcmk__output_t *out, xmlNodePtr node)
 
void pcmk__xml_pop_parent (pcmk__output_t *out)
 

Detailed Description

Formatted output for pacemaker tools.

Definition in file output.h.

Macro Definition Documentation

#define PCMK__API_VERSION   "1.0"

Definition at line 29 of file output.h.

#define PCMK__OUTPUT_OPTIONS (   fmts)
Value:
{ "output-as", required_argument, NULL, 0, \
"Specify the format for output, one of: " fmts \
}, \
{ "output-to", required_argument, NULL, 0, \
"Specify the destination for formatted output, \"-\" for stdout or a filename" \
}

Definition at line 35 of file output.h.

Typedef Documentation

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

Definition at line 71 of file output.h.

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

Definition at line 55 of file output.h.

Definition at line 43 of file output.h.

Function Documentation

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

Definition at line 117 of file output.c.

void pcmk__indented_printf ( pcmk__output_t out,
const char *  format,
  ... 
)
pcmk__output_t* pcmk__mk_text_output ( char **  argv)

Definition at line 172 of file output_text.c.

pcmk__output_t* pcmk__mk_xml_output ( char **  argv)

Definition at line 200 of file output_xml.c.

void pcmk__output_free ( pcmk__output_t out,
crm_exit_t  exit_status 
)

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 33 of file output.c.

bool pcmk__parse_output_args ( const char *  argname,
char *  argvalue,
char **  output_ty,
char **  output_dest 
)

Definition at line 85 of file output.c.

int pcmk__register_format ( const char *  fmt_name,
pcmk__output_factory_t  create 
)

Definition at line 103 of file output.c.

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

Definition at line 135 of file output.c.

void pcmk__register_messages ( pcmk__output_t out,
pcmk__message_entry_t table 
)

Definition at line 141 of file output.c.

void void pcmk__xml_add_node ( pcmk__output_t out,
xmlNodePtr  node 
)

Definition at line 230 of file output_xml.c.

void pcmk__xml_pop_parent ( pcmk__output_t out)

Definition at line 250 of file output_xml.c.

void pcmk__xml_push_parent ( pcmk__output_t out,
xmlNodePtr  node 
)

Definition at line 240 of file output_xml.c.