error.h

00001 /*
00002  * Error codes
00003  *
00004  * Copyright (C) 2003, Olaf Kirch <okir@suse.de>
00005  */
00006 
00007 #ifndef OPENCT_ERROR_H
00008 #define OPENCT_ERROR_H
00009 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 
00014 #define IFD_SUCCESS                     0
00015 #define IFD_ERROR_GENERIC               -1
00016 #define IFD_ERROR_TIMEOUT               -2
00017 #define IFD_ERROR_INVALID_SLOT          -3
00018 #define IFD_ERROR_NOT_SUPPORTED         -4
00019 #define IFD_ERROR_COMM_ERROR            -5
00020 #define IFD_ERROR_NO_CARD               -6
00021 #define IFD_ERROR_LOCKED                -7
00022 #define IFD_ERROR_NOLOCK                -8
00023 #define IFD_ERROR_INVALID_ARG           -9
00024 #define IFD_ERROR_NO_MEMORY             -10
00025 #define IFD_ERROR_BUFFER_TOO_SMALL      -11
00026 #define IFD_ERROR_USER_TIMEOUT          -12
00027 #define IFD_ERROR_USER_ABORT            -13
00028 #define IFD_ERROR_PIN_MISMATCH          -14
00029 #define IFD_ERROR_NO_ATR                -15
00030 #define IFD_ERROR_INCOMPATIBLE_DEVICE   -16
00031 #define IFD_ERROR_DEVICE_DISCONNECTED   -17
00032 #define IFD_ERROR_INVALID_ATR           -18
00033 
00034 /* for application/resource manager protocol */
00035 #define IFD_ERROR_INVALID_MSG           -100
00036 #define IFD_ERROR_INVALID_CMD           -101
00037 #define IFD_ERROR_MISSING_ARG           -102
00038 #define IFD_ERROR_NOT_CONNECTED         -103
00039 
00040 /* Specific error codes for proxy protocol */
00041 #define IFD_ERROR_ALREADY_CLAIMED       -200
00042 #define IFD_ERROR_DEVICE_BUSY           -201
00043 #define IFD_ERROR_UNKNOWN_DEVICE        -202
00044 
00045 extern const char *     ct_strerror(int);
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 
00051 #endif /* OPENCT_ERROR_H */

libp11, Copyright (C) 2005 Olaf Kirch <okir@lst.de>OpenSC-Project.org Logo