chiark / gitweb /
gpg agent threading bugs: Add some `xxx' comments.
[gnupg2.git] / common / status.h
1 /* status.h - Status codes
2  *      Copyright (C) 2007 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_STATUS_H
31 #define GNUPG_COMMON_STATUS_H
32
33 enum
34   {
35     STATUS_ENTER,
36     STATUS_LEAVE,
37     STATUS_ABORT,
38
39     STATUS_GOODSIG,
40     STATUS_BADSIG,
41     STATUS_ERRSIG,
42
43     STATUS_BADARMOR,
44
45     STATUS_TRUST_UNDEFINED,
46     STATUS_TRUST_NEVER,
47     STATUS_TRUST_MARGINAL,
48     STATUS_TRUST_FULLY,
49     STATUS_TRUST_ULTIMATE,
50
51     STATUS_NEED_PASSPHRASE,
52     STATUS_VALIDSIG,
53     STATUS_SIG_ID,
54     STATUS_ENC_TO,
55     STATUS_NODATA,
56     STATUS_BAD_PASSPHRASE,
57     STATUS_NO_PUBKEY,
58     STATUS_NO_SECKEY,
59     STATUS_NEED_PASSPHRASE_SYM,
60     STATUS_DECRYPTION_INFO,
61     STATUS_DECRYPTION_FAILED,
62     STATUS_DECRYPTION_OKAY,
63     STATUS_MISSING_PASSPHRASE,
64     STATUS_GOOD_PASSPHRASE,
65     STATUS_GOODMDC,
66     STATUS_BADMDC,
67     STATUS_ERRMDC,
68
69     STATUS_IMPORTED,
70     STATUS_IMPORT_OK,
71     STATUS_IMPORT_PROBLEM,
72     STATUS_IMPORT_RES,
73     STATUS_IMPORT_CHECK,
74
75     STATUS_EXPORTED,
76     STATUS_EXPORT_RES,
77
78     STATUS_FILE_START,
79     STATUS_FILE_DONE,
80     STATUS_FILE_ERROR,
81
82     STATUS_BEGIN_DECRYPTION,
83     STATUS_END_DECRYPTION,
84     STATUS_BEGIN_ENCRYPTION,
85     STATUS_END_ENCRYPTION,
86     STATUS_BEGIN_SIGNING,
87
88     STATUS_DELETE_PROBLEM,
89
90     STATUS_GET_BOOL,
91     STATUS_GET_LINE,
92     STATUS_GET_HIDDEN,
93     STATUS_GOT_IT,
94
95     STATUS_PROGRESS,
96     STATUS_SIG_CREATED,
97     STATUS_SESSION_KEY,
98     STATUS_NOTATION_NAME,
99     STATUS_NOTATION_FLAGS,
100     STATUS_NOTATION_DATA,
101     STATUS_POLICY_URL,
102     STATUS_KEY_CREATED,
103     STATUS_USERID_HINT,
104     STATUS_UNEXPECTED,
105     STATUS_INV_RECP,
106     STATUS_INV_SGNR,
107     STATUS_NO_RECP,
108     STATUS_NO_SGNR,
109     STATUS_KEY_CONSIDERED,
110
111     STATUS_ALREADY_SIGNED,
112     STATUS_KEYEXPIRED,
113     STATUS_KEYREVOKED,
114     STATUS_EXPSIG,
115     STATUS_EXPKEYSIG,
116
117     STATUS_ATTRIBUTE,
118
119     STATUS_REVKEYSIG,
120
121     STATUS_NEWSIG,
122     STATUS_SIG_SUBPACKET,
123
124     STATUS_PLAINTEXT,
125     STATUS_PLAINTEXT_LENGTH,
126     STATUS_KEY_NOT_CREATED,
127     STATUS_NEED_PASSPHRASE_PIN,
128
129     STATUS_CARDCTRL,
130     STATUS_SC_OP_FAILURE,
131     STATUS_SC_OP_SUCCESS,
132
133     STATUS_BACKUP_KEY_CREATED,
134
135     STATUS_PKA_TRUST_BAD,
136     STATUS_PKA_TRUST_GOOD,
137
138     STATUS_TOFU_USER,
139     STATUS_TOFU_STATS,
140     STATUS_TOFU_STATS_SHORT,
141     STATUS_TOFU_STATS_LONG,
142
143     STATUS_TRUNCATED,
144     STATUS_MOUNTPOINT,
145     STATUS_BLOCKDEV,
146
147     STATUS_PINENTRY_LAUNCHED,
148
149     STATUS_PLAINTEXT_FOLLOWS,   /* Used by g13-syshelp  */
150
151     STATUS_ERROR,
152     STATUS_WARNING,
153     STATUS_SUCCESS,
154     STATUS_FAILURE,
155
156     STATUS_INQUIRE_MAXLEN
157   };
158
159
160 const char *get_status_string (int code);
161 const char *get_inv_recpsgnr_code (gpg_error_t err);
162
163
164 #endif /*GNUPG_COMMON_STATUS_H*/