pacemaker  2.1.2-ada5c3b36
Scalable High-Availability cluster resource manager
Data Fields
pcmk__output_s Struct Reference

This structure contains everything that makes up a single output formatter. More...

#include <include/crm/common/output_internal.h>

Data Fields

const char * fmt_name
 The name of this output formatter. More...
 
bool quiet
 Should this formatter supress most output? More...
 
gchar * request
 A copy of the request that generated this output. More...
 
FILE * dest
 Where output should be written. More...
 
GHashTable * messages
 Custom messages that are currently registered on this formatter. More...
 
void * priv
 Implementation-specific private data. More...
 
bool(* init )(pcmk__output_t *out)
 
void(* free_priv )(pcmk__output_t *out)
 
void(* finish )(pcmk__output_t *out, crm_exit_t exit_status, bool print, void **copy_dest)
 
void(* reset )(pcmk__output_t *out)
 
void(* register_message )(pcmk__output_t *out, const char *message_id, pcmk__message_fn_t fn)
 
int(* message )(pcmk__output_t *out, const char *message_id,...)
 
void(* subprocess_output )(pcmk__output_t *out, int exit_status, const char *proc_stdout, const char *proc_stderr)
 
void(* version )(pcmk__output_t *out, bool extended)
 
int(* info )(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
 
int(*) void(* err )(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2
 
int(*) void(*) void(* output_xml )(pcmk__output_t *out, const char *name, const char *buf)
 
void(* begin_list )(pcmk__output_t *out, const char *singular_noun, const char *plural_noun, const char *format,...) G_GNUC_PRINTF(4
 
void(*) void(* list_item )(pcmk__output_t *out, const char *name, const char *format,...) G_GNUC_PRINTF(3
 
void(*) void(*) void(* increment_list )(pcmk__output_t *out)
 
void(* end_list )(pcmk__output_t *out)
 
bool(* is_quiet )(pcmk__output_t *out)
 
void(* spacer )(pcmk__output_t *out)
 
void(* progress )(pcmk__output_t *out, bool end)
 
void(* prompt )(const char *prompt, bool echo, char **dest)
 

Detailed Description

This structure contains everything that makes up a single output formatter.

Instances of this structure may be created by calling pcmk__output_new() with the name of the desired formatter. They should later be freed with pcmk__output_free().

Definition at line 169 of file output_internal.h.

Field Documentation

◆ begin_list

void(* pcmk__output_s::begin_list) (pcmk__output_t *out, const char *singular_noun, const char *plural_noun, const char *format,...) G_GNUC_PRINTF(4

Definition at line 414 of file output_internal.h.

◆ dest

FILE* pcmk__output_s::dest

Where output should be written.

This could be a file handle, or stdout or stderr. This is really only useful internally.

Definition at line 199 of file output_internal.h.

◆ end_list

void(* pcmk__output_s::end_list) (pcmk__output_t *out)

Definition at line 454 of file output_internal.h.

◆ err

int(*) void(* pcmk__output_s::err) (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2

Definition at line 383 of file output_internal.h.

◆ finish

void(* pcmk__output_s::finish) (pcmk__output_t *out, crm_exit_t exit_status, bool print, void **copy_dest)

Definition at line 279 of file output_internal.h.

◆ fmt_name

const char* pcmk__output_s::fmt_name

The name of this output formatter.

Definition at line 173 of file output_internal.h.

◆ free_priv

void(* pcmk__output_s::free_priv) (pcmk__output_t *out)

Definition at line 243 of file output_internal.h.

◆ increment_list

void(*) void(*) void(* pcmk__output_s::increment_list) (pcmk__output_t *out)

Definition at line 442 of file output_internal.h.

◆ info

int(* pcmk__output_s::info) (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2

Definition at line 369 of file output_internal.h.

◆ init

bool(* pcmk__output_s::init) (pcmk__output_t *out)

Definition at line 232 of file output_internal.h.

◆ is_quiet

bool(* pcmk__output_s::is_quiet) (pcmk__output_t *out)

Definition at line 467 of file output_internal.h.

◆ list_item

void(*) void(* pcmk__output_s::list_item) (pcmk__output_t *out, const char *name, const char *format,...) G_GNUC_PRINTF(3

Definition at line 427 of file output_internal.h.

◆ message

int(* pcmk__output_s::message) (pcmk__output_t *out, const char *message_id,...)

Definition at line 328 of file output_internal.h.

◆ messages

GHashTable* pcmk__output_s::messages

Custom messages that are currently registered on this formatter.

Keys are the string message IDs, values are pcmk__message_fn_t function pointers.

Definition at line 207 of file output_internal.h.

◆ output_xml

int(*) void(*) void(* pcmk__output_s::output_xml) (pcmk__output_t *out, const char *name, const char *buf)

Definition at line 393 of file output_internal.h.

◆ priv

void* pcmk__output_s::priv

Implementation-specific private data.

Each individual formatter may have some private data useful in its implementation. This points to that data. Callers should not rely on its contents or structure.

Definition at line 216 of file output_internal.h.

◆ progress

void(* pcmk__output_s::progress) (pcmk__output_t *out, bool end)

Definition at line 487 of file output_internal.h.

◆ prompt

void(* pcmk__output_s::prompt) (const char *prompt, bool echo, char **dest)

Definition at line 505 of file output_internal.h.

◆ quiet

bool pcmk__output_s::quiet

Should this formatter supress most output?

Note
This setting is not respected by all formatters. In general, machine-readable output formats will not support this while user-oriented formats will. Callers should use is_quiet() to test whether to print or not.

Definition at line 183 of file output_internal.h.

◆ register_message

void(* pcmk__output_s::register_message) (pcmk__output_t *out, const char *message_id, pcmk__message_fn_t fn)

Definition at line 310 of file output_internal.h.

◆ request

gchar* pcmk__output_s::request

A copy of the request that generated this output.

In the case of command line usage, this would be the command line arguments. For other use cases, it could be different.

Definition at line 191 of file output_internal.h.

◆ reset

void(* pcmk__output_s::reset) (pcmk__output_t *out)

Definition at line 297 of file output_internal.h.

◆ spacer

void(* pcmk__output_s::spacer) (pcmk__output_t *out)

Definition at line 475 of file output_internal.h.

◆ subprocess_output

void(* pcmk__output_s::subprocess_output) (pcmk__output_t *out, int exit_status, const char *proc_stdout, const char *proc_stderr)

Definition at line 339 of file output_internal.h.

◆ version

void(* pcmk__output_s::version) (pcmk__output_t *out, bool extended)

Definition at line 350 of file output_internal.h.


The documentation for this struct was generated from the following file: