The SCardReader object is used to monitor one PC/SC reader (i.e. wait for card events) More...
Public Member Functions | |
SCardReader (uint Scope, string ReaderName) | |
Create a SCardReader for the given PC/SC scope and reader name. | |
SCardReader (string ReaderName) | |
Create a SCardReader for the given and reader name. | |
void | Release () |
virtual SCardChannel | CreateChannel () |
Create a SCardChannel object from this reader. | |
SCardChannel | GetChannel () |
Create a SCardChannel object from this reader. More... | |
delegate void | StatusChangeCallback (uint ReaderState, CardBuffer CardAtr) |
Definition of the callback that will be called by the background thread launched by StartMonitor() everytime the status of the reader is changed. More... | |
void | StartMonitor (StatusChangeCallback callback) |
Create a background thread to monitor the reader associated to the object. Everytime the status of the reader is changed, the callback is invoked. | |
void | StopMonitor () |
Stop the background thread previously launched by StartMonitor(). | |
bool | Control (CardBuffer cctrl, out CardBuffer rctrl) |
Send a direct command the reader through SCARD.Control() and retrieve its answer. | |
CardBuffer | Control (CardBuffer cctrl) |
Send a direct command the reader through SCARD.Control() and retrieve its answer. | |
bool | Control (CAPDU cctrl, out RAPDU rctrl) |
Send a direct command the reader through SCARD.Control() and retrieve its answer. | |
RAPDU | Control (CAPDU cctrl) |
Send a direct command the reader through SCARD.Control() and retrieve its answer. | |
Protected Member Functions | |
virtual void | StatusChangeMonitor () |
Protected Attributes | |
uint | _last_error |
string | _reader_name |
StatusChangeCallback | _status_change_callback = null |
volatile bool | _status_change_running = false |
Properties | |
uint | Scope [get] |
The PC/SC context handle. See SCARD.CreateContext() | |
string | Name [get] |
The name of the reader. | |
uint | Status [get] |
Current status of the reader. | |
string | StatusAsString [get] |
Current status of the reader, using SCARD.ReaderStatusToString() as formatter. | |
bool | CardPresent [get] |
Is there a card in the reader? | |
bool | CardAvailable [get] |
Is there a card in the reader, and the card has not been connected by another application yet? | |
CardBuffer | CardAtr [get] |
The ATR of the card in the reader. null if no card is present. | |
uint | LastError [get] |
Return the last error encountered by this SCardReader. | |
string | LastErrorAsString [get] |
Return the last error encountered by this SCardChannel, as a string. | |
The SCardReader object is used to monitor one PC/SC reader (i.e. wait for card events)
SCardChannel SpringCard.PCSC.SCardReader.GetChannel | ( | ) |
Create a SCardChannel object from this reader.
delegate void SpringCard.PCSC.SCardReader.StatusChangeCallback | ( | uint | ReaderState, |
CardBuffer | CardAtr | ||
) |
Definition of the callback that will be called by the background thread launched by StartMonitor() everytime the status of the reader is changed.