LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
logicalaccess::PCSCConnection Class Reference

#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
 

Detailed Description

Abstract away a PCSC connection.

Constructor & Destructor Documentation

◆ PCSCConnection()

logicalaccess::PCSCConnection::PCSCConnection ( PCSCShareMode  mode,
unsigned long  protocol,
SCARDCONTEXT  context,
const std::string &  device 
)

Establish the PCSC connection

◆ ~PCSCConnection()

logicalaccess::PCSCConnection::~PCSCConnection ( )

Disconnects the PCSC connection

Member Function Documentation

◆ reconnect()

void logicalaccess::PCSCConnection::reconnect ( )

Reconnect the PCSC connection.

Parameters
action_on_reconnectis one the define from the SCard library that control the behaviour of the reconnect.

◆ setDisposition()

void logicalaccess::PCSCConnection::setDisposition ( DWORD  dispo)
inline

Set the action to take on the card in the connected reader on close.

◆ strerror()

std::string logicalaccess::PCSCConnection::strerror ( unsigned int  error_flag)
static

Check for a PCSC error in error_flag.

Return a string corresponding to the error, or an empty string if no error.

Friends And Related Function Documentation

◆ PCSCReaderUnit

friend class PCSCReaderUnit
friend

Member Data Documentation

◆ active_protocol_

DWORD logicalaccess::PCSCConnection::active_protocol_
private

The activated protocol

◆ disposition

DWORD logicalaccess::PCSCConnection::disposition
private

Action to take on the card in the connected reader on close.

◆ handle_

SCARDHANDLE logicalaccess::PCSCConnection::handle_
private

The handle.

◆ protocol_

DWORD logicalaccess::PCSCConnection::protocol_
private

The protocol.

◆ share_mode_

PCSCShareMode logicalaccess::PCSCConnection::share_mode_
private

The share mode.


The documentation for this class was generated from the following files: