libchipcard 5.0.0

client.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     begin       : Mon Mar 01 2004
00003     copyright   : (C) 2004-2010 by Martin Preuss
00004     email       : martin@libchipcard.de
00005 
00006  ***************************************************************************
00007  *          Please see toplevel file COPYING for license details           *
00008  ***************************************************************************/
00009 
00010 
00011 #ifndef CHIPCARD_CLIENT_CLIENT_H
00012 #define CHIPCARD_CLIENT_CLIENT_H
00013 
00014 
00018 
00019 #include <gwenhywfar/inherit.h>
00020 #include <chipcard/chipcard.h>
00021 
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 #define LC_DEFAULT_SHORT_TIMEOUT     10
00028 #define LC_DEFAULT_LONG_TIMEOUT      30
00029 #define LC_DEFAULT_VERY_LONG_TIMEOUT 60
00030 
00031 
00032 
00033 typedef struct LC_CLIENT LC_CLIENT;
00034 GWEN_INHERIT_FUNCTION_LIB_DEFS(LC_CLIENT, CHIPCARD_API)
00035 
00036 
00037 
00040 typedef enum {
00041   LC_Client_ResultOk=0,
00042   LC_Client_ResultWait,
00043   LC_Client_ResultIpcError,
00044   LC_Client_ResultCmdError,
00045   LC_Client_ResultDataError,
00046   LC_Client_ResultAborted,
00047   LC_Client_ResultInvalid,
00048   LC_Client_ResultInternal,
00049   LC_Client_ResultGeneric,
00050   LC_Client_ResultNoData,
00051   LC_Client_ResultCardRemoved,
00052   LC_Client_ResultNotSupported,
00053   LC_Client_ResultCfgError,
00054   LC_Client_ResultNotFound,
00055   LC_Client_ResultIoError,
00056   LC_Client_ResultBadPin,
00057   LC_Client_ResultDontExecute,
00058 } LC_CLIENT_RESULT;
00059 
00060 
00064 typedef enum {
00065   LC_Client_CmdTargetCard=0,
00066   LC_Client_CmdTargetReader
00067 } LC_CLIENT_CMDTARGET;
00068 
00069 
00070 
00071 #ifdef __cplusplus
00072 }
00073 #endif
00074 
00075 
00076 #include <chipcard/card.h>
00077 
00078 
00079 #ifdef __cplusplus
00080 extern "C" {
00081 #endif
00082 
00083 
00090 
00096 CHIPCARD_API
00097 LC_CLIENT *LC_Client_new(const char *programName, const char *programVersion);
00098 
00103 CHIPCARD_API
00104 void LC_Client_free(LC_CLIENT *cl);
00105 
00112 CHIPCARD_API
00113 LC_CLIENT_RESULT LC_Client_Init(LC_CLIENT *cl);
00114 
00119 CHIPCARD_API
00120 LC_CLIENT_RESULT LC_Client_Fini(LC_CLIENT *cl);
00121 
00122 
00123 
00124 CHIPCARD_API
00125 LC_CLIENT_RESULT LC_Client_Start(LC_CLIENT *cl);
00126 
00127 CHIPCARD_API
00128 LC_CLIENT_RESULT LC_Client_Stop(LC_CLIENT *cl);
00129 
00130 
00131 CHIPCARD_API
00132 LC_CLIENT_RESULT LC_Client_GetNextCard(LC_CLIENT *cl, LC_CARD **pCard, int timeout);
00133 
00134 CHIPCARD_API
00135 LC_CLIENT_RESULT LC_Client_ReleaseCard(LC_CLIENT *cl, LC_CARD *card);
00136 
00137 
00144 /*{@*/
00145 CHIPCARD_API
00146 const char *LC_Client_GetProgramName(const LC_CLIENT *cl);
00147 
00148 CHIPCARD_API
00149 const char *LC_Client_GetProgramVersion(const LC_CLIENT *cl);
00150 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 
00161 #endif /* CHIPCARD_CLIENT_CLIENT_H */
00162 
00163 
00164