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(), _SMARTCARD_EXTENSION::_CardCapabilities::AvailableProtocols, and _SMARTCARD_EXTENSION::CardCapabilities.

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(), _SMARTCARD_EXTENSION::CardCapabilities, and _SMARTCARD_EXTENSION::_CardCapabilities::CurrentProtocol.

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 IFD_NOT_SUPPORTED, IFD_PROTOCOL_NOT_SUPPORTED, IFD_SUCCESS, IFDSetPTS(), Log2, Log3, SCARD_PROTOCOL_T0, SCARD_PROTOCOL_T1, SET_PROTOCOL_PPS_FAILED, and SET_PROTOCOL_WRONG_ARGUMENT.

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:


Generated on Mon Jan 2 15:39:09 2012 for pcsc-lite by  doxygen 1.4.7