atrhandler.h

Go to the documentation of this file.
00001 /*
00002  * MUSCLE SmartCard Development ( http://www.linuxnet.com )
00003  *
00004  * Copyright (C) 1999
00005  *  David Corcoran <corcoran@linuxnet.com>
00006  *
00007  * $Id: atrhandler.h 3260 2009-01-02 15:19:59Z rousseau $
00008  */
00009 
00016 #ifndef __atrhandler_h__
00017 #define __atrhandler_h__
00018 
00019 #ifdef __cplusplus
00020 extern "C"
00021 {
00022 #endif
00023 
00024 #define SCARD_CONVENTION_DIRECT  0x0001
00025 #define SCARD_CONVENTION_INVERSE 0x0002
00026 
00027     typedef struct _SMARTCARD_EXTENSION
00028     {
00029 
00030         struct _ATR
00031         {
00032             DWORD Length;
00033             UCHAR Value[MAX_ATR_SIZE];
00034             DWORD HistoryLength;
00035             UCHAR HistoryValue[MAX_ATR_SIZE];
00036         }
00037         ATR;
00038 
00039         struct _CardCapabilities
00040         {
00041             UCHAR AvailableProtocols;
00042             UCHAR CurrentProtocol;
00043             UCHAR Convention;
00044         }
00045         CardCapabilities;
00046     }
00047     SMARTCARD_EXTENSION, *PSMARTCARD_EXTENSION;
00048 
00049     /*
00050      * Decodes the ATR and fills the structure
00051      */
00052 
00053     short ATRDecodeAtr(/*@out@*/ PSMARTCARD_EXTENSION psExtension,
00054         PUCHAR pucAtr, DWORD dwLength);
00055 
00056 #ifdef __cplusplus
00057 }
00058 #endif
00059 
00060 #endif                          /* __atrhandler_h__ */

Generated on Mon Aug 17 01:00:08 2009 for pcsc-lite by  doxygen 1.5.9