pacemaker  2.1.8-3980678f03
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
14 extern "C" {
15 #endif
16 
17 #include <glib.h>
18 
19 typedef struct {
20  char *summary;
22 
23  gboolean version;
24  gboolean quiet;
25  unsigned int verbosity;
26 
27  char *output_ty;
28  char *output_dest;
30 
43 pcmk__new_common_args(const char *summary);
44 
64 GOptionContext *
65 pcmk__build_arg_context(pcmk__common_args_t *common_args, const char *fmts,
66  GOptionGroup **output_group, const char *param_string);
67 
75 void
76 pcmk__free_arg_context(GOptionContext *context);
77 
87 void pcmk__add_main_args(GOptionContext *context, const GOptionEntry entries[]);
88 
101 void pcmk__add_arg_group(GOptionContext *context, const char *name,
102  const char *header, const char *desc,
103  const GOptionEntry entries[]);
104 
116 gchar *pcmk__quote_cmdline(gchar **argv);
117 
161 gchar **
162 pcmk__cmdline_preproc(char *const *argv, const char *special);
163 
182 G_GNUC_PRINTF(3, 4)
183 gboolean
184 pcmk__force_args(GOptionContext *context, GError **error, const char *format, ...);
185 
186 #ifdef __cplusplus
187 }
188 #endif
189 
190 #endif
pcmk__common_args_t * pcmk__new_common_args(const char *summary)
Definition: cmdline.c:28
const char * name
Definition: cib.c:26
void pcmk__add_arg_group(GOptionContext *context, const char *name, const char *header, const char *desc, const GOptionEntry entries[])
Definition: cmdline.c:132
void pcmk__add_main_args(GOptionContext *context, const GOptionEntry entries[])
Definition: cmdline.c:124
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:115
gboolean pcmk__force_args(GOptionContext *context, GError **error, const char *format,...)
Definition: cmdline.c:356
unsigned int verbosity
gchar ** pcmk__cmdline_preproc(char *const *argv, const char *special)
Definition: cmdline.c:213
gchar * pcmk__quote_cmdline(gchar **argv)
Definition: cmdline.c:163