Imported Upstream version 2.1.23
[platform/upstream/gpg2.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_KEY,
61     STATUS_DECRYPTION_INFO,
62     STATUS_DECRYPTION_FAILED,
63     STATUS_DECRYPTION_OKAY,
64     STATUS_MISSING_PASSPHRASE,
65     STATUS_GOOD_PASSPHRASE,
66     STATUS_GOODMDC,
67     STATUS_BADMDC,
68     STATUS_ERRMDC,
69
70     STATUS_IMPORTED,
71     STATUS_IMPORT_OK,
72     STATUS_IMPORT_PROBLEM,
73     STATUS_IMPORT_RES,
74     STATUS_IMPORT_CHECK,
75
76     STATUS_EXPORTED,
77     STATUS_EXPORT_RES,
78
79     STATUS_FILE_START,
80     STATUS_FILE_DONE,
81     STATUS_FILE_ERROR,
82
83     STATUS_BEGIN_DECRYPTION,
84     STATUS_END_DECRYPTION,
85     STATUS_BEGIN_ENCRYPTION,
86     STATUS_END_ENCRYPTION,
87     STATUS_BEGIN_SIGNING,
88
89     STATUS_DELETE_PROBLEM,
90
91     STATUS_GET_BOOL,
92     STATUS_GET_LINE,
93     STATUS_GET_HIDDEN,
94     STATUS_GOT_IT,
95
96     STATUS_PROGRESS,
97     STATUS_SIG_CREATED,
98     STATUS_SESSION_KEY,
99     STATUS_NOTATION_NAME,
100     STATUS_NOTATION_FLAGS,
101     STATUS_NOTATION_DATA,
102     STATUS_POLICY_URL,
103     STATUS_KEY_CREATED,
104     STATUS_USERID_HINT,
105     STATUS_UNEXPECTED,
106     STATUS_INV_RECP,
107     STATUS_INV_SGNR,
108     STATUS_NO_RECP,
109     STATUS_NO_SGNR,
110     STATUS_KEY_CONSIDERED,
111
112     STATUS_ALREADY_SIGNED,
113     STATUS_KEYEXPIRED,
114     STATUS_KEYREVOKED,
115     STATUS_EXPSIG,
116     STATUS_EXPKEYSIG,
117
118     STATUS_ATTRIBUTE,
119
120     STATUS_REVKEYSIG,
121
122     STATUS_NEWSIG,
123     STATUS_SIG_SUBPACKET,
124
125     STATUS_PLAINTEXT,
126     STATUS_PLAINTEXT_LENGTH,
127     STATUS_KEY_NOT_CREATED,
128     STATUS_NEED_PASSPHRASE_PIN,
129
130     STATUS_CARDCTRL,
131     STATUS_SC_OP_FAILURE,
132     STATUS_SC_OP_SUCCESS,
133
134     STATUS_BACKUP_KEY_CREATED,
135
136     STATUS_PKA_TRUST_BAD,
137     STATUS_PKA_TRUST_GOOD,
138
139     STATUS_TOFU_USER,
140     STATUS_TOFU_STATS,
141     STATUS_TOFU_STATS_SHORT,
142     STATUS_TOFU_STATS_LONG,
143
144     STATUS_ENCRYPTION_COMPLIANCE_MODE,
145     STATUS_DECRYPTION_COMPLIANCE_MODE,
146     STATUS_VERIFICATION_COMPLIANCE_MODE,
147
148     STATUS_TRUNCATED,
149     STATUS_MOUNTPOINT,
150     STATUS_BLOCKDEV,
151
152     STATUS_PINENTRY_LAUNCHED,
153
154     STATUS_PLAINTEXT_FOLLOWS,   /* Used by g13-syshelp  */
155
156     STATUS_ERROR,
157     STATUS_WARNING,
158     STATUS_SUCCESS,
159     STATUS_FAILURE,
160
161     STATUS_INQUIRE_MAXLEN
162   };
163
164
165 const char *get_status_string (int code);
166 const char *get_inv_recpsgnr_code (gpg_error_t err);
167
168
169 #endif /*GNUPG_COMMON_STATUS_H*/