1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
/*****************************************************************
/
/ File : ifdhandler.h
/ Author : David Corcoran
/ Date : November 7, 1998
/ Purpose: This provides reader specific low-level calls.
/ See http://www.linuxnet.com for more information.
/ License: See file LICENSE
/
******************************************************************/
#ifndef _IFD_Handler_h_
#define _IFD_Handler_h_
#include "pcscdefines.h"
#include "defines.h"
/* List of Data Structures available to IFD_Handler */
struct SCARD_IO_HEADER {
DWORD Protocol;
DWORD Length;
};
/* The list of tags should be alot more but
this is all I use in the meantime */
#define TAG_IFD_ATR 0x0303
/* List of Defines available to IFD_Handler */
#define IFD_POWER_UP 500
#define IFD_POWER_DOWN 501
#define IFD_RESET 502
#define IFD_SUCCESS 0
#define IFD_ERROR_TAG 600
#define IFD_ERROR_SET_FAILURE 601
#define IFD_ERROR_VALUE_READ_ONLY 602
#define IFD_NEGOTIATE_PTS11 603
#define IFD_NEGOTIATE_PTS22 604
#define IFD_ERROR_PTS_FAILURE 605
#define IFD_ERROR_NOT_SUPPORTED 606
#define IFD_PROTOCOL_NOT_SUPPORTED 607
#define IFD_ERROR_POWER_ACTION 608
#define IFD_ERROR_SWALLOW 609
#define IFD_ERROR_EJECT 610
#define IFD_ERROR_CONFISCATE 611
#define IFD_COMMUNICATION_ERROR 612
#define IFD_RESPONSE_TIMEOUT 613
#define IFD_NOT_SUPPORTED 614
/* Extension of the Specification */
#define IFD_ICC_PRESENT 615
#define IFD_ICC_NOT_PRESENT 616
/* List of Defined Functions Available to IFD_Handler */
RESPONSECODE IO_Create_Channel (
DWORD ChannelID
);
RESPONSECODE IO_Close_Channel ();
RESPONSECODE IFD_Get_Capabilities (
DWORD Tag,
BYTE Value[]
);
RESPONSECODE IFD_Set_Capabilities (
DWORD Tag,
BYTE Value[]
);
RESPONSECODE IFD_Set_Protocol_Parameters (
DWORD ProtocolType,
BYTE SelectionFlags,
BYTE PTS1,
BYTE PTS2,
BYTE PTS3
);
RESPONSECODE IFD_Power_ICC (
DWORD ActionRequested
);
RESPONSECODE IFD_Swallow_ICC();
RESPONSECODE IFD_Eject_ICC();
RESPONSECODE IFD_Confiscate_ICC();
/* Added to make life much easier */
RESPONSECODE IFD_Transmit_to_ICC (
struct SCARD_IO_HEADER SendPci,
BYTE CommandData[],
DWORD CommandSize,
BYTE ResponseData[],
DWORD *ResponseSize,
struct SCARD_IO_HEADER *RecvPci
);
RESPONSECODE IFD_Is_ICC_Present();
RESPONSECODE IFD_Is_ICC_Absent();
#endif
|