LibLogicalAccess
2.5.0
An Open Source RFID Library
|
#include <pcsc_connection.hpp>
Public Member Functions | |
PCSCConnection (PCSCShareMode mode, unsigned long protocol, SCARDCONTEXT context, const std::string &device) | |
~PCSCConnection () | |
void | reconnect () |
void | setDisposition (DWORD dispo) |
Static Public Member Functions | |
static std::string | strerror (unsigned int error_flag) |
Private Attributes | |
SCARDHANDLE | handle_ |
PCSCShareMode | share_mode_ |
DWORD | protocol_ |
DWORD | active_protocol_ |
DWORD | disposition |
Friends | |
class | PCSCReaderUnit |
Abstract away a PCSC connection.
logicalaccess::PCSCConnection::PCSCConnection | ( | PCSCShareMode | mode, |
unsigned long | protocol, | ||
SCARDCONTEXT | context, | ||
const std::string & | device | ||
) |
Establish the PCSC connection
logicalaccess::PCSCConnection::~PCSCConnection | ( | ) |
Disconnects the PCSC connection
void logicalaccess::PCSCConnection::reconnect | ( | ) |
Reconnect the PCSC connection.
action_on_reconnect | is one the define from the SCard library that control the behaviour of the reconnect. |
|
inline |
Set the action to take on the card in the connected reader on close.
|
static |
Check for a PCSC error in error_flag.
Return a string corresponding to the error, or an empty string if no error.
|
friend |
|
private |
The activated protocol
|
private |
Action to take on the card in the connected reader on close.
|
private |
The handle.
|
private |
The protocol.
|
private |
The share mode.