pacemaker 2.1.5-a3f44794f94
Scalable High-Availability cluster resource manager
cmdline_internal.h
Go to the documentation of this file.
1/*
2 * Copyright 2019-2022 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__CMDLINE_INTERNAL__H
11#define PCMK__CMDLINE_INTERNAL__H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include <glib.h>
18
19typedef struct {
20 char *summary;
22
23 gboolean version;
24 gboolean quiet;
25 unsigned int verbosity;
26
27 char *output_ty;
30
43pcmk__new_common_args(const char *summary);
44
64GOptionContext *
65pcmk__build_arg_context(pcmk__common_args_t *common_args, const char *fmts,
66 GOptionGroup **output_group, const char *param_string);
67
75void
76pcmk__free_arg_context(GOptionContext *context);
77
87void pcmk__add_main_args(GOptionContext *context, const GOptionEntry entries[]);
88
101void pcmk__add_arg_group(GOptionContext *context, const char *name,
102 const char *header, const char *desc,
103 const GOptionEntry entries[]);
104
116gchar *pcmk__quote_cmdline(gchar **argv);
117
157gchar **
158pcmk__cmdline_preproc(char *const *argv, const char *special);
159
178G_GNUC_PRINTF(3, 4)
179gboolean
180pcmk__force_args(GOptionContext *context, GError **error, const char *format, ...);
181
182#ifdef __cplusplus
183}
184#endif
185
186#endif
const char * name
Definition: cib.c:24
pcmk__common_args_t * pcmk__new_common_args(const char *summary)
Definition: cmdline.c:28
void pcmk__add_arg_group(GOptionContext *context, const char *name, const char *header, const char *desc, const GOptionEntry entries[])
Definition: cmdline.c:134
GOptionContext * pcmk__build_arg_context(pcmk__common_args_t *common_args, const char *fmts, GOptionGroup **output_group, const char *param_string)
Definition: cmdline.c:63
void pcmk__free_arg_context(GOptionContext *context)
Definition: cmdline.c:117
gchar * pcmk__quote_cmdline(gchar **argv)
Definition: cmdline.c:165
void pcmk__add_main_args(GOptionContext *context, const GOptionEntry entries[])
Definition: cmdline.c:126
gchar ** pcmk__cmdline_preproc(char *const *argv, const char *special)
Definition: cmdline.c:215
gboolean pcmk__force_args(GOptionContext *context, GError **error, const char *format,...)
Definition: cmdline.c:345
unsigned int verbosity