7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen#ifndef DOVEADM_PRINT_PRIVATE_H
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen#define DOVEADM_PRINT_PRIVATE_H
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen#include "doveadm-print.h"
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainenstruct doveadm_print_header {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen const char *key;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen const char *title;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen enum doveadm_print_header_flags flags;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen};
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainenstruct doveadm_print_vfuncs {
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen const char *name;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen void (*init)(void);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen void (*deinit)(void);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen void (*header)(const struct doveadm_print_header *hdr);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen void (*print)(const char *value);
528bfe84f996046645103de898564ef5bcb5edadTimo Sirainen void (*print_stream)(const unsigned char *value, size_t size);
09304bdc1e5e416aa343802732a15064f49495ccTimo Sirainen void (*flush)(void);
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen};
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainenextern struct doveadm_print_vfuncs doveadm_print_flow_vfuncs;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainenextern struct doveadm_print_vfuncs doveadm_print_tab_vfuncs;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainenextern struct doveadm_print_vfuncs doveadm_print_table_vfuncs;
528bfe84f996046645103de898564ef5bcb5edadTimo Sirainenextern struct doveadm_print_vfuncs doveadm_print_pager_vfuncs;
3cd674e541f2f930d2ae5dbdc6fe2f4d29d8dc04Aki Tuomiextern struct doveadm_print_vfuncs doveadm_print_json_vfuncs;
21e4a561c2983f7ff02c0503c9bad8e4f45cee8aAki Tuomiextern struct doveadm_print_vfuncs doveadm_print_formatted_vfuncs;
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen#endif