prothandler.h File Reference

This handles protocol defaults, PTS, etc. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SET_PROTOCOL_WRONG_ARGUMENT   -1
#define SET_PROTOCOL_PPS_FAILED   -2

Functions

UCHAR PHGetDefaultProtocol (PUCHAR, DWORD)
 Get the default protocol used immediately after reset.
UCHAR PHGetAvailableProtocols (PUCHAR, DWORD)
 Get the protocols supported by the card.
DWORD PHSetProtocol (struct ReaderContext *, DWORD, UCHAR, UCHAR)
 Determine which protocol to use.


Detailed Description

This handles protocol defaults, PTS, etc.

Definition in file prothandler.h.


Function Documentation

UCHAR PHGetAvailableProtocols ( PUCHAR  pucAtr,
DWORD  dwLength 
)

Get the protocols supported by the card.

These protocols are returned from the function as bit masks.

Definition at line 55 of file prothandler.c.

References ATRDecodeAtr().

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:

UCHAR PHGetDefaultProtocol ( PUCHAR  pucAtr,
DWORD  dwLength 
)

Get the default protocol used immediately after reset.

This protocol is returned from the function.

Definition at line 35 of file prothandler.c.

References ATRDecodeAtr().

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:

DWORD PHSetProtocol ( struct ReaderContext *  rContext,
DWORD  dwPreferred,
UCHAR  ucAvailable,
UCHAR  ucDefault 
)

Determine which protocol to use.

SCardConnect has a DWORD dwPreferredProtocols that is a bitmask of what protocols to use. Basically, if T=N where N is not zero will be used first if it is available in ucAvailable. Otherwise it will always default to T=0.

IFDSetPTS() is _always_ called so that the driver can initialise its data

Definition at line 80 of file prothandler.c.

References IFDSetPTS(), SCARD_PROTOCOL_T0, and SCARD_PROTOCOL_T1.

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:


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