00001 /*************************************************************************** 00002 $RCSfile: ctdriver_ctapi.h,v $ 00003 ------------------- 00004 cvs : $Id: ctdriver_ctapi.h,v 1.2 2003/02/17 04:17:48 aquamaniac Exp $ 00005 begin : Mon Dec 09 2002 00006 copyright : (C) 2002 by Martin Preuss 00007 email : martin@libchipcard.de 00008 00009 *************************************************************************** 00010 * * 00011 * This library is free software; you can redistribute it and/or * 00012 * modify it under the terms of the GNU Lesser General Public * 00013 * License as published by the Free Software Foundation; either * 00014 * version 2.1 of the License, or (at your option) any later version. * 00015 * * 00016 * This library is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00019 * Lesser General Public License for more details. * 00020 * * 00021 * You should have received a copy of the GNU Lesser General Public * 00022 * License along with this library; if not, write to the Free Software * 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 00024 * MA 02111-1307 USA * 00025 * * 00026 ***************************************************************************/ 00027 00028 00029 #ifndef CTDRIVER_CTAPI_H 00030 #define CTDRIVER_CTAPI_H "$Id" 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 00037 #include <ctcore.h> 00038 #include <chameleon/libloader.h> 00039 00040 00041 #define CTDRIVER_CTAPI_DAD_CT 1 00042 #define CTDRIVER_CTAPI_SAD_HOST 2 00043 00044 00045 typedef char (*CTDCTAPIINITPTR) (unsigned short Ctn, unsigned short pn); 00046 typedef char (*CTDCTAPICLOSEPTR)(unsigned short Ctn); 00047 typedef char (*CTDCTAPIDATAPTR) (unsigned short Ctn, 00048 unsigned char *dad, 00049 unsigned char *sad, 00050 unsigned short lc, 00051 unsigned char *cmd, 00052 unsigned short *lr, 00053 unsigned char *rsp); 00054 00055 typedef struct CTDRIVERCTAPI_DRIVERDATASTRUCT CTDRIVERCTAPI_DRIVERDATA; 00056 typedef struct CTDRIVERCTAPI_READERDATASTRUCT CTDRIVERCTAPI_READERDATA; 00057 00058 struct CTDRIVERCTAPI_DRIVERDATASTRUCT { 00059 CTDCTAPIINITPTR init; 00060 CTDCTAPICLOSEPTR close; 00061 CTDCTAPIDATAPTR data; 00062 unsigned int terminalIds; 00063 CHLIBLOADERHANDLE libHandle; 00064 CONFIGGROUP *ports; 00065 }; 00066 00067 00068 struct CTDRIVERCTAPI_READERDATASTRUCT { 00069 int ctn; 00070 int isProcessorCard; 00071 }; 00072 00073 00074 ERRORCODE CTDriver_CTAPI_Open(CTDRIVERTABLE *dt, 00075 CTREADERDESCRIPTION *rd, 00076 CONFIGGROUP *ddescr); 00077 00078 ERRORCODE CTDriver_CTAPI_Close(CTDRIVERTABLE *dt); 00079 00080 00081 #ifdef __cplusplus 00082 } 00083 #endif 00084 00085 00086 #endif /* CTDRIVER_CTAPI_H */ 00087 00088