This structure contains everything that makes up a single output formatter.
More...
#include <include/crm/common/output.h>
|
const char * | fmt_name |
| The name of this output formatter. More...
|
|
char * | request |
| A copy of the request that generated this output. More...
|
|
bool | supports_quiet |
| Does this formatter support a special quiet mode? 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) |
|
void(* | info )(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2 |
|
void(*) void(* | err )(pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2 |
|
void(*) 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) |
|
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 150 of file output.h.
◆ 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 |
◆ 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 179 of file output.h.
◆ end_list
◆ err
void(*) void(* pcmk__output_s::err) (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2 |
◆ finish
◆ fmt_name
const char* pcmk__output_s::fmt_name |
The name of this output formatter.
Definition at line 154 of file output.h.
◆ free_priv
◆ increment_list
void(*) void(*) void(* pcmk__output_s::increment_list) (pcmk__output_t *out) |
◆ info
void(* pcmk__output_s::info) (pcmk__output_t *out, const char *format,...) G_GNUC_PRINTF(2 |
◆ init
◆ list_item
void(*) void(* pcmk__output_s::list_item) (pcmk__output_t *out, const char *name, const char *format,...) G_GNUC_PRINTF(3 |
◆ message
int(* pcmk__output_s::message) (pcmk__output_t *out, const char *message_id,...) |
◆ 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 187 of file output.h.
◆ output_xml
void(*) void(*) void(* pcmk__output_s::output_xml) (pcmk__output_t *out, const char *name, const char *buf) |
◆ 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 196 of file output.h.
◆ register_message
◆ request
char* 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 162 of file output.h.
◆ reset
◆ subprocess_output
void(* pcmk__output_s::subprocess_output) (pcmk__output_t *out, int exit_status, const char *proc_stdout, const char *proc_stderr) |
◆ supports_quiet
bool pcmk__output_s::supports_quiet |
Does this formatter support a special quiet mode?
In this mode, most output can be supressed but some information is still displayed to an interactive user. In general, machine-readable output formats will not support this while user-oriented formats will.
Definition at line 171 of file output.h.
◆ version
The documentation for this struct was generated from the following file: