OpenCT
0.6.20
openct
error.h
1
/*
2
* Error codes
3
*
4
* Copyright (C) 2003, Olaf Kirch <okir@suse.de>
5
*/
6
7
#ifndef OPENCT_ERROR_H
8
#define OPENCT_ERROR_H
9
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
14
#define IFD_SUCCESS 0
15
#define IFD_ERROR_GENERIC -1
16
#define IFD_ERROR_TIMEOUT -2
17
#define IFD_ERROR_INVALID_SLOT -3
18
#define IFD_ERROR_NOT_SUPPORTED -4
19
#define IFD_ERROR_COMM_ERROR -5
20
#define IFD_ERROR_NO_CARD -6
21
#define IFD_ERROR_LOCKED -7
22
#define IFD_ERROR_NOLOCK -8
23
#define IFD_ERROR_INVALID_ARG -9
24
#define IFD_ERROR_NO_MEMORY -10
25
#define IFD_ERROR_BUFFER_TOO_SMALL -11
26
#define IFD_ERROR_USER_TIMEOUT -12
27
#define IFD_ERROR_USER_ABORT -13
28
#define IFD_ERROR_PIN_MISMATCH -14
29
#define IFD_ERROR_NO_ATR -15
30
#define IFD_ERROR_INCOMPATIBLE_DEVICE -16
31
#define IFD_ERROR_DEVICE_DISCONNECTED -17
32
#define IFD_ERROR_INVALID_ATR -18
33
34
/* for application/resource manager protocol */
35
#define IFD_ERROR_INVALID_MSG -100
36
#define IFD_ERROR_INVALID_CMD -101
37
#define IFD_ERROR_MISSING_ARG -102
38
#define IFD_ERROR_NOT_CONNECTED -103
39
40
/* Specific error codes for proxy protocol */
41
#define IFD_ERROR_ALREADY_CLAIMED -200
42
#define IFD_ERROR_DEVICE_BUSY -201
43
#define IFD_ERROR_UNKNOWN_DEVICE -202
44
45
extern
const
char
* ct_strerror(
int
);
46
47
#ifdef __cplusplus
48
}
49
#endif
50
51
#endif
/* OPENCT_ERROR_H */
libp11, Copyright (C) 2005 Olaf Kirch <okir@lst.de>