common,gpg: Fix processing of search descriptions ending in '!'.
[gnupg.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  * 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.
10  *
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.
15  *
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/>.
18  */
19
20 #ifndef GNUPG_COMMON_STATUS_H
21 #define GNUPG_COMMON_STATUS_H
22
23 enum
24   {
25     STATUS_ENTER,
26     STATUS_LEAVE,
27     STATUS_ABORT,
28
29     STATUS_GOODSIG,
30     STATUS_BADSIG,
31     STATUS_ERRSIG,
32
33     STATUS_BADARMOR,
34
35     STATUS_TRUST_UNDEFINED,
36     STATUS_TRUST_NEVER,
37     STATUS_TRUST_MARGINAL,
38     STATUS_TRUST_FULLY,
39     STATUS_TRUST_ULTIMATE,
40
41     STATUS_NEED_PASSPHRASE,
42     STATUS_VALIDSIG,
43     STATUS_SIG_ID,
44     STATUS_ENC_TO,
45     STATUS_NODATA,
46     STATUS_BAD_PASSPHRASE,
47     STATUS_NO_PUBKEY,
48     STATUS_NO_SECKEY,
49     STATUS_NEED_PASSPHRASE_SYM,
50     STATUS_DECRYPTION_INFO,
51     STATUS_DECRYPTION_FAILED,
52     STATUS_DECRYPTION_OKAY,
53     STATUS_MISSING_PASSPHRASE,
54     STATUS_GOOD_PASSPHRASE,
55     STATUS_GOODMDC,
56     STATUS_BADMDC,
57     STATUS_ERRMDC,
58
59     STATUS_IMPORTED,
60     STATUS_IMPORT_OK,
61     STATUS_IMPORT_PROBLEM,
62     STATUS_IMPORT_RES,
63     STATUS_IMPORT_CHECK,
64
65     STATUS_EXPORTED,
66     STATUS_EXPORT_RES,
67
68     STATUS_FILE_START,
69     STATUS_FILE_DONE,
70     STATUS_FILE_ERROR,
71
72     STATUS_BEGIN_DECRYPTION,
73     STATUS_END_DECRYPTION,
74     STATUS_BEGIN_ENCRYPTION,
75     STATUS_END_ENCRYPTION,
76     STATUS_BEGIN_SIGNING,
77
78     STATUS_DELETE_PROBLEM,
79
80     STATUS_GET_BOOL,
81     STATUS_GET_LINE,
82     STATUS_GET_HIDDEN,
83     STATUS_GOT_IT,
84
85     STATUS_PROGRESS,
86     STATUS_SIG_CREATED,
87     STATUS_SESSION_KEY,
88     STATUS_NOTATION_NAME,
89     STATUS_NOTATION_DATA,
90     STATUS_POLICY_URL,
91     STATUS_KEY_CREATED,
92     STATUS_USERID_HINT,
93     STATUS_UNEXPECTED,
94     STATUS_INV_RECP,
95     STATUS_INV_SGNR,
96     STATUS_NO_RECP,
97     STATUS_NO_SGNR,
98
99     STATUS_ALREADY_SIGNED,
100     STATUS_KEYEXPIRED,
101     STATUS_KEYREVOKED,
102     STATUS_EXPSIG,
103     STATUS_EXPKEYSIG,
104
105     STATUS_ATTRIBUTE,
106
107     STATUS_REVKEYSIG,
108
109     STATUS_NEWSIG,
110     STATUS_SIG_SUBPACKET,
111
112     STATUS_PLAINTEXT,
113     STATUS_PLAINTEXT_LENGTH,
114     STATUS_KEY_NOT_CREATED,
115     STATUS_NEED_PASSPHRASE_PIN,
116
117     STATUS_CARDCTRL,
118     STATUS_SC_OP_FAILURE,
119     STATUS_SC_OP_SUCCESS,
120
121     STATUS_BACKUP_KEY_CREATED,
122
123     STATUS_PKA_TRUST_BAD,
124     STATUS_PKA_TRUST_GOOD,
125
126     STATUS_TRUNCATED,
127     STATUS_MOUNTPOINT,
128
129     STATUS_PINENTRY_LAUNCHED,
130
131     STATUS_PLAINTEXT_FOLLOWS,   /* Used by g13-syshelp  */
132
133     STATUS_ERROR,
134     STATUS_SUCCESS,
135     STATUS_FAILURE,
136
137     STATUS_INQUIRE_MAXLEN
138   };
139
140
141 const char *get_status_string (int code);
142 const char *get_inv_recpsgnr_code (gpg_error_t err);
143
144
145 #endif /*GNUPG_COMMON_STATUS_H*/