Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

atrhandler.h

Go to the documentation of this file.
/*
 * MUSCLE SmartCard Development ( http://www.linuxnet.com )
 *
 * Copyright (C) 1999
 *  David Corcoran <corcoran@linuxnet.com>
 *
 * $Id: atrhandler.h 2891 2008-04-21 13:14:46Z rousseau $
 */

/**
 * @file
 * @brief This keeps track of smartcard protocols, timing issues
 * and Answer to Reset ATR handling.
 */

#ifndef __atrhandler_h__
#define __atrhandler_h__

#ifdef __cplusplus
extern "C"
{
#endif

#define SCARD_CONVENTION_DIRECT  0x0001
#define SCARD_CONVENTION_INVERSE 0x0002

00027       typedef struct _SMARTCARD_EXTENSION
      {

00030             struct _ATR
            {
                  DWORD Length;
                  UCHAR Value[MAX_ATR_SIZE];
                  DWORD HistoryLength;
                  UCHAR HistoryValue[MAX_ATR_SIZE];
            }
            ATR;

00039             struct _CardCapabilities
            {
                  UCHAR AvailableProtocols;
                  UCHAR CurrentProtocol;
                  UCHAR Convention;
            }
            CardCapabilities;
      }
      SMARTCARD_EXTENSION, *PSMARTCARD_EXTENSION;

      /*
       * Decodes the ATR and fills the structure
       */

      short ATRDecodeAtr(PSMARTCARD_EXTENSION psExtension,
            PUCHAR pucAtr, DWORD dwLength);

#ifdef __cplusplus
}
#endif

#endif                                          /* __atrhandler_h__ */

Generated by  Doxygen 1.6.0   Back to index