chiark / gitweb /
asshelp.c: add a lot of debug logging
[gnupg2.git] / common / shareddefs.h
1 /* shareddefs.h - Constants and helpers useful for all modules
2  * Copyright (C) 2013 Free Software Foundation, Inc.
3  *
4  * This file is free software; you can redistribute it and/or modify
5  * it under the terms of either
6  *
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.
10  *
11  * or
12  *
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.
16  *
17  * or both in parallel, as here.
18  *
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.
23  *
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/>.
26  */
27
28 #ifndef GNUPG_COMMON_SHAREDDEFS_H
29 #define GNUPG_COMMON_SHAREDDEFS_H
30
31 /* Values for the pinentry mode.  */
32 typedef enum
33   {
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.    */
38   }
39 pinentry_mode_t;
40
41
42 /*-- agent-opt.c --*/
43 int parse_pinentry_mode (const char *value);
44 const char *str_pinentry_mode (pinentry_mode_t mode);
45
46
47
48 #endif /*GNUPG_COMMON_SHAREDDEFS_H*/