Avoid catch-22 with README.main not being distributed but having the
[gnupg.git] / common / session-env.h
blob031fe1d7c8c29dc736c9d2e496e5a0f1f4819b51
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 * 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 <http://www.gnu.org/licenses/>.
20 #ifndef GNUPG_COMMON_SESSION_ENV_H
21 #define GNUPG_COMMON_SESSION_ENV_H
23 struct session_environment_s;
24 typedef struct session_environment_s *session_env_t;
26 const char *session_env_list_stdenvnames (int *iterator,
27 const char **r_assname);
29 session_env_t session_env_new (void);
30 void session_env_release (session_env_t se);
32 gpg_error_t session_env_putenv (session_env_t se, const char *string);
33 gpg_error_t session_env_setenv (session_env_t se,
34 const char *name, const char *value);
36 char *session_env_getenv (session_env_t se, const char *name);
37 char *session_env_getenv_or_default (session_env_t se, const char *name,
38 int *r_default);
39 char *session_env_listenv (session_env_t se, int *iterator,
40 const char **r_value, int *r_default);
43 #endif /*GNUPG_COMMON_SESSION_ENV_H*/