common/iobuf.c: Combine iobuf_open, iobuf_create and iobuf_openrw.
[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     STATUS_IMPORTED,
59     STATUS_IMPORT_OK,
60     STATUS_IMPORT_PROBLEM,
61     STATUS_IMPORT_RES,
62     STATUS_IMPORT_CHECK,
63
64     STATUS_FILE_START,
65     STATUS_FILE_DONE,
66     STATUS_FILE_ERROR,
67
68     STATUS_BEGIN_DECRYPTION,
69     STATUS_END_DECRYPTION,
70     STATUS_BEGIN_ENCRYPTION,
71     STATUS_END_ENCRYPTION,
72     STATUS_BEGIN_SIGNING,
73
74     STATUS_DELETE_PROBLEM,
75
76     STATUS_GET_BOOL,
77     STATUS_GET_LINE,
78     STATUS_GET_HIDDEN,
79     STATUS_GOT_IT,
80
81     STATUS_PROGRESS,
82     STATUS_SIG_CREATED,
83     STATUS_SESSION_KEY,
84     STATUS_NOTATION_NAME,
85     STATUS_NOTATION_DATA,
86     STATUS_POLICY_URL,
87     STATUS_KEY_CREATED,
88     STATUS_USERID_HINT,
89     STATUS_UNEXPECTED,
90     STATUS_INV_RECP,
91     STATUS_INV_SGNR,
92     STATUS_NO_RECP,
93     STATUS_NO_SGNR,
94
95     STATUS_ALREADY_SIGNED,
96     STATUS_KEYEXPIRED,
97     STATUS_KEYREVOKED,
98     STATUS_EXPSIG,
99     STATUS_EXPKEYSIG,
100
101     STATUS_ATTRIBUTE,
102
103     STATUS_REVKEYSIG,
104
105     STATUS_NEWSIG,
106     STATUS_SIG_SUBPACKET,
107
108     STATUS_PLAINTEXT,
109     STATUS_PLAINTEXT_LENGTH,
110     STATUS_KEY_NOT_CREATED,
111     STATUS_NEED_PASSPHRASE_PIN,
112
113     STATUS_CARDCTRL,
114     STATUS_SC_OP_FAILURE,
115     STATUS_SC_OP_SUCCESS,
116
117     STATUS_BACKUP_KEY_CREATED,
118
119     STATUS_PKA_TRUST_BAD,
120     STATUS_PKA_TRUST_GOOD,
121
122     STATUS_TRUNCATED,
123     STATUS_MOUNTPOINT,
124
125     STATUS_PINENTRY_LAUNCHED,
126
127     STATUS_ERROR,
128     STATUS_SUCCESS,
129
130     STATUS_INQUIRE_MAXLEN,
131 };
132
133
134 const char *get_status_string (int code);
135 const char *get_inv_recpsgnr_code (gpg_error_t err);
136
137
138 #endif /*GNUPG_COMMON_STATUS_H*/