1 /* session-env.h - Definitions for session environment functions
2 * Copyright (C) 2009 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of either
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.
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.
19 * or both in parallel, as here.
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.
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/>.
30 #ifndef GNUPG_COMMON_SESSION_ENV_H
31 #define GNUPG_COMMON_SESSION_ENV_H
33 struct session_environment_s;
34 typedef struct session_environment_s *session_env_t;
36 const char *session_env_list_stdenvnames (int *iterator,
37 const char **r_assname);
39 session_env_t session_env_new (void);
40 void session_env_release (session_env_t se);
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);
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,
49 char *session_env_listenv (session_env_t se, int *iterator,
50 const char **r_value, int *r_default);
53 #endif /*GNUPG_COMMON_SESSION_ENV_H*/