chiark / gitweb /
asshelp.c: add a lot of debug logging
[gnupg2.git] / common / session-env.h
1 /* session-env.h - Definitions for session environment functions
2  * Copyright (C) 2009 Free Software Foundation, Inc.
3  *
4  * This file is part of GnuPG.
5  *
6  * This file is free software; you can redistribute it and/or modify
7  * it under the terms of either
8  *
9  *   - the GNU Lesser General Public License as published by the Free
10  *     Software Foundation; either version 3 of the License, or (at
11  *     your option) any later version.
12  *
13  * or
14  *
15  *   - the GNU General Public License as published by the Free
16  *     Software Foundation; either version 2 of the License, or (at
17  *     your option) any later version.
18  *
19  * or both in parallel, as here.
20  *
21  * This file is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, see <https://www.gnu.org/licenses/>.
28  */
29
30 #ifndef GNUPG_COMMON_SESSION_ENV_H
31 #define GNUPG_COMMON_SESSION_ENV_H
32
33 struct session_environment_s;
34 typedef struct session_environment_s *session_env_t;
35
36 const char *session_env_list_stdenvnames (int *iterator,
37                                           const char **r_assname);
38
39 session_env_t session_env_new (void);
40 void session_env_release (session_env_t se);
41
42 gpg_error_t session_env_putenv (session_env_t se, const char *string);
43 gpg_error_t session_env_setenv (session_env_t se,
44                                 const char *name, const char *value);
45
46 char *session_env_getenv (session_env_t se, const char *name);
47 char *session_env_getenv_or_default (session_env_t se, const char *name,
48                                      int *r_default);
49 char *session_env_listenv (session_env_t se, int *iterator,
50                            const char **r_value, int *r_default);
51
52
53 #endif /*GNUPG_COMMON_SESSION_ENV_H*/