New functions to compute an ssh style fingerprint.
[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_RSA_OR_IDEA,
36
37     STATUS_TRUST_UNDEFINED,
38     STATUS_TRUST_NEVER,
39     STATUS_TRUST_MARGINAL,
40     STATUS_TRUST_FULLY,
41     STATUS_TRUST_ULTIMATE,
42
43     STATUS_NEED_PASSPHRASE,
44     STATUS_VALIDSIG,
45     STATUS_SIG_ID,
46     STATUS_ENC_TO,
47     STATUS_NODATA,
48     STATUS_BAD_PASSPHRASE,
49     STATUS_NO_PUBKEY,
50     STATUS_NO_SECKEY,
51     STATUS_NEED_PASSPHRASE_SYM,
52     STATUS_DECRYPTION_INFO,
53     STATUS_DECRYPTION_FAILED,
54     STATUS_DECRYPTION_OKAY,
55     STATUS_MISSING_PASSPHRASE,
56     STATUS_GOOD_PASSPHRASE,
57     STATUS_GOODMDC,
58     STATUS_BADMDC,
59     STATUS_ERRMDC,
60     STATUS_IMPORTED,
61     STATUS_IMPORT_OK,
62     STATUS_IMPORT_PROBLEM,
63     STATUS_IMPORT_RES,
64     STATUS_IMPORT_CHECK,
65
66     STATUS_FILE_START,
67     STATUS_FILE_DONE,
68     STATUS_FILE_ERROR,
69
70     STATUS_BEGIN_DECRYPTION,
71     STATUS_END_DECRYPTION,
72     STATUS_BEGIN_ENCRYPTION,
73     STATUS_END_ENCRYPTION,
74     STATUS_BEGIN_SIGNING,
75
76     STATUS_DELETE_PROBLEM,
77
78     STATUS_GET_BOOL,
79     STATUS_GET_LINE,
80     STATUS_GET_HIDDEN,
81     STATUS_GOT_IT,
82
83     STATUS_PROGRESS,
84     STATUS_SIG_CREATED,
85     STATUS_SESSION_KEY,
86     STATUS_NOTATION_NAME,
87     STATUS_NOTATION_DATA,
88     STATUS_POLICY_URL,
89     STATUS_BEGIN_STREAM,
90     STATUS_END_STREAM,
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_SIGEXPIRED,
103     STATUS_EXPSIG,
104     STATUS_EXPKEYSIG,
105
106     STATUS_ATTRIBUTE,
107
108     STATUS_REVKEYSIG,
109
110     STATUS_NEWSIG,
111     STATUS_SIG_SUBPACKET,
112
113     STATUS_PLAINTEXT,
114     STATUS_PLAINTEXT_LENGTH,
115     STATUS_KEY_NOT_CREATED,
116     STATUS_NEED_PASSPHRASE_PIN,
117
118     STATUS_CARDCTRL,
119     STATUS_SC_OP_FAILURE,
120     STATUS_SC_OP_SUCCESS,
121
122     STATUS_BACKUP_KEY_CREATED,
123
124     STATUS_PKA_TRUST_BAD,
125     STATUS_PKA_TRUST_GOOD,
126
127     STATUS_TRUNCATED,
128     STATUS_MOUNTPOINT,
129
130     STATUS_ERROR,
131     STATUS_SUCCESS
132 };
133
134
135 const char *get_status_string (int code);
136 const char *get_inv_recpsgnr_code (gpg_error_t err);
137
138
139 #endif /*GNUPG_COMMON_STATUS_H*/