1 /* shareddefs.h - Constants and helpers useful for all modules
2 * Copyright (C) 2013 Free Software Foundation, Inc.
4 * This file is free software; you can redistribute it and/or modify
5 * it under the terms of either
7 * - the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at
9 * your option) any later version.
13 * - the GNU General Public License as published by the Free
14 * Software Foundation; either version 2 of the License, or (at
15 * your option) any later version.
17 * or both in parallel, as here.
19 * This file is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see <https://www.gnu.org/licenses/>.
28 #ifndef GNUPG_COMMON_SHAREDDEFS_H
29 #define GNUPG_COMMON_SHAREDDEFS_H
31 /* Values for the pinentry mode. */
34 PINENTRY_MODE_ASK = 0, /* Ask via pinentry (default). */
35 PINENTRY_MODE_CANCEL, /* Always return a cancel error. */
36 PINENTRY_MODE_ERROR, /* Return error code for no pinentry. */
37 PINENTRY_MODE_LOOPBACK /* Use an inquiry to get the value. */
43 int parse_pinentry_mode (const char *value);
44 const char *str_pinentry_mode (pinentry_mode_t mode);
48 #endif /*GNUPG_COMMON_SHAREDDEFS_H*/