pacemaker  2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
cmdline_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019-2021 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, GOptionEntry entries[]);
88 
101 void pcmk__add_arg_group(GOptionContext *context, const char *name,
102  const char *header, const char *desc,
103  GOptionEntry entries[]);
104 
144 gchar **
145 pcmk__cmdline_preproc(char **argv, const char *special);
146 
165 G_GNUC_PRINTF(3, 4)
166 gboolean
167 pcmk__force_args(GOptionContext *context, GError **error, const char *format, ...);
168 
169 #ifdef __cplusplus
170 }
171 #endif
172 
173 #endif
pcmk__common_args_t * pcmk__new_common_args(const char *summary)
Definition: cmdline.c:28
gchar ** pcmk__cmdline_preproc(char **argv, const char *special)
Definition: cmdline.c:148
const char * name
Definition: cib.c:24
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
gboolean pcmk__force_args(GOptionContext *context, GError **error, const char *format,...)
Definition: cmdline.c:278
void pcmk__add_arg_group(GOptionContext *context, const char *name, const char *header, const char *desc, GOptionEntry entries[])
Definition: cmdline.c:134
unsigned int verbosity
void pcmk__add_main_args(GOptionContext *context, GOptionEntry entries[])
Definition: cmdline.c:126