pcsc-lite 1.6.4
|
00001 /* 00002 * MUSCLE SmartCard Development ( http://www.linuxnet.com ) 00003 * 00004 * Copyright (C) 1999-2002 00005 * David Corcoran <corcoran@linuxnet.com> 00006 * Copyright (C) 2002-2010 00007 * Ludovic Rousseau <ludovic.rousseau@free.fr> 00008 * 00009 * $Id: eventhandler.h 5047 2010-06-29 14:39:24Z rousseau $ 00010 */ 00011 00018 #ifndef __eventhandler_h__ 00019 #define __eventhandler_h__ 00020 00021 #include <stdint.h> 00022 00023 #ifdef __cplusplus 00024 extern "C" 00025 { 00026 #endif 00027 00032 typedef struct pubReaderStatesList 00033 { 00034 int32_t readerID; 00035 char readerName[MAX_READERNAME]; 00036 uint32_t readerState; 00037 int32_t readerSharing; 00038 00039 UCHAR cardAtr[MAX_ATR_SIZE]; 00040 uint32_t cardAtrLength; 00041 uint32_t cardProtocol; 00042 } 00043 READER_STATE; 00044 00045 LONG EHTryToUnregisterClientForEvent(int32_t filedes); 00046 LONG EHRegisterClientForEvent(int32_t filedes); 00047 LONG EHUnregisterClientForEvent(int32_t filedes); 00048 LONG EHSignalEventToClients(void); 00049 LONG EHInitializeEventStructures(void); 00050 LONG EHSpawnEventHandler(READER_CONTEXT *, 00051 /*@null@*/ RESPONSECODE (*)(DWORD)); 00052 LONG EHDestroyEventHandler(READER_CONTEXT *); 00053 00055 #define SCARD_LAST_CONTEXT 1 00056 00057 #define SCARD_NO_CONTEXT 0 00058 00059 #define SCARD_EXCLUSIVE_CONTEXT -1 00060 00061 #ifdef __cplusplus 00062 } 00063 #endif 00064 00065 #endif /* __eventhandler_h__ */