pcsc-lite 2.3.0
readerfactory.h File Reference

This keeps track of a list of currently available reader structures. More...

#include <inttypes.h>
#include <pthread.h>
#include "ifdhandler.h"
#include "pcscd.h"
#include "simclist.h"

Go to the source code of this file.

Data Structures

struct  SerialReader
 
struct  FctMap_V2
 
struct  FctMap_V3
 
struct  RdrCliHandles
 
struct  ReaderContext
 

Macros

#define REF_READER(reader)   { LONG rv; Log2(PCSC_LOG_DEBUG, "RefReader() count was: %d", reader->reference); rv = _RefReader(reader); if (rv != SCARD_S_SUCCESS) return rv; }
 
#define UNREF_READER(reader)   {Log2(PCSC_LOG_DEBUG, "UnrefReader() count was: %d", reader->reference); _UnrefReader(reader);}
 
#define REMOVE_READER_NO_FLAG   0
 
#define REMOVE_READER_FLAG_REMOVED   1
 

Typedefs

typedef struct FctMap_V2 FCT_MAP_V2
 
typedef struct FctMap_V3 FCT_MAP_V3
 
typedef struct RdrCliHandles RDR_CLIHANDLES
 
typedef struct ReaderContext READER_CONTEXT
 

Functions

LONG _RefReader (READER_CONTEXT *sReader)
 
LONG _UnrefReader (READER_CONTEXT *sReader)
 
LONG RFAllocateReaderSpace (unsigned int)
 
LONG RFAddReader (const char *, int, const char *, const char *)
 
LONG RFRemoveReader (const char *, int, int)
 
LONG RFSetReaderName (READER_CONTEXT *, const char *, const char *, int)
 
LONG RFReaderInfo (const char *, struct ReaderContext **)
 
LONG RFReaderInfoById (SCARDHANDLE, struct ReaderContext **)
 
LONG RFCheckSharing (SCARDHANDLE, READER_CONTEXT *)
 
LONG RFLockSharing (SCARDHANDLE, READER_CONTEXT *)
 
LONG RFUnlockSharing (SCARDHANDLE, READER_CONTEXT *)
 
LONG RFUnlockAllSharing (SCARDHANDLE, READER_CONTEXT *)
 
LONG RFLoadReader (READER_CONTEXT *)
 
LONG RFBindFunctions (READER_CONTEXT *)
 
LONG RFUnBindFunctions (READER_CONTEXT *)
 
LONG RFUnloadReader (READER_CONTEXT *)
 
LONG RFInitializeReader (READER_CONTEXT *)
 
void RFUnInitializeReader (READER_CONTEXT *)
 
SCARDHANDLE RFCreateReaderHandle (READER_CONTEXT *)
 
LONG RFAddReaderHandle (READER_CONTEXT *, SCARDHANDLE)
 
LONG RFRemoveReaderHandle (READER_CONTEXT *, SCARDHANDLE)
 
void RFSetReaderEventState (READER_CONTEXT *, DWORD)
 
LONG RFCheckReaderEventState (READER_CONTEXT *, SCARDHANDLE)
 
LONG RFClearReaderEventState (READER_CONTEXT *, SCARDHANDLE)
 
LONG RFCheckReaderStatus (READER_CONTEXT *)
 
void RFCleanupReaders (void)
 
void RFWaitForReaderInit (void)
 
int RFStartSerialReaders (const char *readerconf)
 
void RFReCheckReaderConf (void)
 
int RFGetPowerState (READER_CONTEXT *)
 Wait until all connected readers have a chance to power up a possibly inserted card.
 
void RFSetPowerState (READER_CONTEXT *, int value)
 

Detailed Description

This keeps track of a list of currently available reader structures.

Definition in file readerfactory.h.

Macro Definition Documentation

◆ REF_READER

#define REF_READER ( reader)    { LONG rv; Log2(PCSC_LOG_DEBUG, "RefReader() count was: %d", reader->reference); rv = _RefReader(reader); if (rv != SCARD_S_SUCCESS) return rv; }

Definition at line 145 of file readerfactory.h.

◆ REMOVE_READER_FLAG_REMOVED

#define REMOVE_READER_FLAG_REMOVED   1

Definition at line 179 of file readerfactory.h.

◆ REMOVE_READER_NO_FLAG

#define REMOVE_READER_NO_FLAG   0

Definition at line 178 of file readerfactory.h.

◆ UNREF_READER

#define UNREF_READER ( reader)    {Log2(PCSC_LOG_DEBUG, "UnrefReader() count was: %d", reader->reference); _UnrefReader(reader);}

Definition at line 146 of file readerfactory.h.

Typedef Documentation

◆ FCT_MAP_V2

typedef struct FctMap_V2 FCT_MAP_V2

Definition at line 74 of file readerfactory.h.

◆ FCT_MAP_V3

typedef struct FctMap_V3 FCT_MAP_V3

Definition at line 96 of file readerfactory.h.

◆ RDR_CLIHANDLES

typedef struct RdrCliHandles RDR_CLIHANDLES

Definition at line 104 of file readerfactory.h.

◆ READER_CONTEXT

typedef struct ReaderContext READER_CONTEXT

Definition at line 140 of file readerfactory.h.

Function Documentation

◆ _RefReader()

LONG _RefReader ( READER_CONTEXT * sReader)

Definition at line 99 of file readerfactory.c.

◆ _UnrefReader()

LONG _UnrefReader ( READER_CONTEXT * sReader)

Definition at line 109 of file readerfactory.c.

◆ RFAddReader()

LONG RFAddReader ( const char * readerNameLong,
int port,
const char * library,
const char * device )

Definition at line 154 of file readerfactory.c.

◆ RFAddReaderHandle()

LONG RFAddReaderHandle ( READER_CONTEXT * rContext,
SCARDHANDLE hCard )

Definition at line 1214 of file readerfactory.c.

◆ RFAllocateReaderSpace()

LONG RFAllocateReaderSpace ( unsigned int customMaxReaderHandles)

Definition at line 122 of file readerfactory.c.

◆ RFBindFunctions()

LONG RFBindFunctions ( READER_CONTEXT * rContext)

Definition at line 899 of file readerfactory.c.

◆ RFCheckReaderEventState()

LONG RFCheckReaderEventState ( READER_CONTEXT * rContext,
SCARDHANDLE hCard )

Definition at line 1319 of file readerfactory.c.

◆ RFCheckReaderStatus()

LONG RFCheckReaderStatus ( READER_CONTEXT * rContext)

Definition at line 1376 of file readerfactory.c.

◆ RFCheckSharing()

LONG RFCheckSharing ( SCARDHANDLE hCard,
READER_CONTEXT * rContext )

Definition at line 1024 of file readerfactory.c.

◆ RFCleanupReaders()

void RFCleanupReaders ( void )

Definition at line 1384 of file readerfactory.c.

◆ RFClearReaderEventState()

LONG RFClearReaderEventState ( READER_CONTEXT * rContext,
SCARDHANDLE hCard )

Definition at line 1357 of file readerfactory.c.

◆ RFCreateReaderHandle()

SCARDHANDLE RFCreateReaderHandle ( READER_CONTEXT * rContext)

Definition at line 1184 of file readerfactory.c.

◆ RFGetPowerState()

int RFGetPowerState ( READER_CONTEXT * rContext)

Wait until all connected readers have a chance to power up a possibly inserted card.

Definition at line 1594 of file readerfactory.c.

◆ RFInitializeReader()

LONG RFInitializeReader ( READER_CONTEXT * rContext)

Definition at line 1097 of file readerfactory.c.

◆ RFLoadReader()

LONG RFLoadReader ( READER_CONTEXT * rContext)

Definition at line 882 of file readerfactory.c.

◆ RFLockSharing()

LONG RFLockSharing ( SCARDHANDLE hCard,
READER_CONTEXT * rContext )

Definition at line 1032 of file readerfactory.c.

◆ RFReaderInfo()

LONG RFReaderInfo ( const char * readerName,
struct ReaderContext ** sReader )

Definition at line 829 of file readerfactory.c.

◆ RFReaderInfoById()

LONG RFReaderInfoById ( SCARDHANDLE hCard,
struct ReaderContext ** sReader )

Definition at line 855 of file readerfactory.c.

◆ RFRemoveReader()

LONG RFRemoveReader ( const char * readerName,
int port,
int flags )

Definition at line 577 of file readerfactory.c.

◆ RFRemoveReaderHandle()

LONG RFRemoveReaderHandle ( READER_CONTEXT * rContext,
SCARDHANDLE hCard )

Definition at line 1257 of file readerfactory.c.

◆ RFSetPowerState()

void RFSetPowerState ( READER_CONTEXT * rContext,
int value )

Definition at line 1602 of file readerfactory.c.

◆ RFSetReaderEventState()

void RFSetReaderEventState ( READER_CONTEXT * rContext,
DWORD dwEvent )

Definition at line 1286 of file readerfactory.c.

◆ RFSetReaderName()

LONG RFSetReaderName ( READER_CONTEXT * rContext,
const char * readerName,
const char * libraryName,
int port )

Definition at line 713 of file readerfactory.c.

◆ RFUnBindFunctions()

LONG RFUnBindFunctions ( READER_CONTEXT * rContext)

Definition at line 1001 of file readerfactory.c.

◆ RFUnInitializeReader()

void RFUnInitializeReader ( READER_CONTEXT * rContext)

Definition at line 1155 of file readerfactory.c.

◆ RFUnloadReader()

LONG RFUnloadReader ( READER_CONTEXT * rContext)

Definition at line 1009 of file readerfactory.c.

◆ RFUnlockAllSharing()

LONG RFUnlockAllSharing ( SCARDHANDLE hCard,
READER_CONTEXT * rContext )

Definition at line 1081 of file readerfactory.c.

◆ RFUnlockSharing()

LONG RFUnlockSharing ( SCARDHANDLE hCard,
READER_CONTEXT * rContext )

Definition at line 1048 of file readerfactory.c.