1 /* gpgconf.h - Global definitions for gpgconf
2 * Copyright (C) 2003 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * GnuPG is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * GnuPG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
23 #include "../common/util.h"
25 /* We keep all global options in the structure OPT. */
28 int verbose; /* Verbosity level. */
29 int quiet; /* Be extra quiet. */
30 int dry_run; /* Don't change any persistent data. */
31 int runtime; /* Make changes active at runtime. */
32 int null; /* Option -0 active. */
33 char *outfile; /* Name of output file. */
35 int component; /* The active component. */
40 /*-- gpgconf-comp.c --*/
42 /* Initialize the components. */
43 void gc_components_init (void);
45 /* Percent-Escape special characters. The string is valid until the
46 next invocation of the function. */
47 char *gc_percent_escape (const char *src);
50 void gc_error (int status, int errnum, const char *fmt, ...);
52 /* Launch given component. */
53 gpg_error_t gc_component_launch (int component);
55 /* Kill given component. */
56 void gc_component_kill (int component);
58 /* Reload given component. */
59 void gc_component_reload (int component);
61 /* List all components that are available. */
62 void gc_component_list_components (estream_t out);
64 /* List all programs along with their status. */
65 void gc_check_programs (estream_t out);
67 /* Find the component with the name NAME. Returns -1 if not
69 int gc_component_find (const char *name);
71 /* Retrieve the currently active options and their defaults from all
72 involved backends for this component. */
73 void gc_component_retrieve_options (int component);
75 /* List all options of the component COMPONENT. */
76 void gc_component_list_options (int component, estream_t out);
78 /* Read the modifications from IN and apply them. */
79 void gc_component_change_options (int component, estream_t in, estream_t out,
82 /* Check the options of a single component. Returns 0 if everything
84 int gc_component_check_options (int component, estream_t out,
85 const char *conf_file);
87 /* Process global configuration file. */
88 int gc_process_gpgconf_conf (const char *fname, int update, int defaults,
91 /* Apply a profile. */
92 gpg_error_t gc_apply_profile (const char *fname);