pcsc-lite 2.3.0
|
This keeps track of a list of currently available reader structures. More...
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdatomic.h>
#include <stdbool.h>
#include "misc.h"
#include "pcscd.h"
#include "debuglog.h"
#include "readerfactory.h"
#include "dyn_generic.h"
#include "sys_generic.h"
#include "eventhandler.h"
#include "ifdwrapper.h"
#include "hotplug.h"
#include "configfile.h"
#include "utils.h"
Go to the source code of this file.
Macros | |
#define | GET_ADDRESS_OPTIONALv2(s, code) |
#define | GET_ADDRESSv2(s) |
#define | GET_ADDRESS_OPTIONALv3(s, code) |
#define | GET_ADDRESSv3(s) |
Functions | |
static LONG | removeReader (READER_CONTEXT *sReader) |
static int | RDR_CLIHANDLES_seeker (const void *el, const void *key) |
LONG | _RefReader (READER_CONTEXT *sReader) |
LONG | _UnrefReader (READER_CONTEXT *sReader) |
LONG | RFAllocateReaderSpace (unsigned int customMaxReaderHandles) |
LONG | RFAddReader (const char *readerNameLong, int port, const char *library, const char *device) |
LONG | RFRemoveReader (const char *readerName, int port, int flags) |
LONG | RFSetReaderName (READER_CONTEXT *rContext, const char *readerName, const char *libraryName, int port) |
LONG | RFReaderInfo (const char *readerName, READER_CONTEXT **sReader) |
LONG | RFReaderInfoById (SCARDHANDLE hCard, READER_CONTEXT **sReader) |
LONG | RFLoadReader (READER_CONTEXT *rContext) |
LONG | RFBindFunctions (READER_CONTEXT *rContext) |
LONG | RFUnBindFunctions (READER_CONTEXT *rContext) |
LONG | RFUnloadReader (READER_CONTEXT *rContext) |
LONG | RFCheckSharing (SCARDHANDLE hCard, READER_CONTEXT *rContext) |
LONG | RFLockSharing (SCARDHANDLE hCard, READER_CONTEXT *rContext) |
LONG | RFUnlockSharing (SCARDHANDLE hCard, READER_CONTEXT *rContext) |
LONG | RFUnlockAllSharing (SCARDHANDLE hCard, READER_CONTEXT *rContext) |
LONG | RFInitializeReader (READER_CONTEXT *rContext) |
void | RFUnInitializeReader (READER_CONTEXT *rContext) |
SCARDHANDLE | RFCreateReaderHandle (READER_CONTEXT *rContext) |
LONG | RFAddReaderHandle (READER_CONTEXT *rContext, SCARDHANDLE hCard) |
LONG | RFRemoveReaderHandle (READER_CONTEXT *rContext, SCARDHANDLE hCard) |
void | RFSetReaderEventState (READER_CONTEXT *rContext, DWORD dwEvent) |
LONG | RFCheckReaderEventState (READER_CONTEXT *rContext, SCARDHANDLE hCard) |
LONG | RFClearReaderEventState (READER_CONTEXT *rContext, SCARDHANDLE hCard) |
LONG | RFCheckReaderStatus (READER_CONTEXT *rContext) |
void | RFCleanupReaders (void) |
int | RFGetPowerState (READER_CONTEXT *rContext) |
Wait until all connected readers have a chance to power up a possibly inserted card. | |
void | RFSetPowerState (READER_CONTEXT *rContext, int value) |
Variables | |
static READER_CONTEXT * | sReadersContexts [PCSCLITE_MAX_READERS_CONTEXTS] |
READER_STATE | readerStates [PCSCLITE_MAX_READERS_CONTEXTS] |
static int | maxReaderHandles = PCSC_MAX_READER_HANDLES |
static DWORD | dwNumReadersContexts = 0 |
static pthread_mutex_t | LockMutex = PTHREAD_MUTEX_INITIALIZER |
int16_t | ReaderEvents = 1 |
This keeps track of a list of currently available reader structures.
Definition in file readerfactory.c.
#define GET_ADDRESS_OPTIONALv2 | ( | s, | |
code ) |
#define GET_ADDRESS_OPTIONALv3 | ( | s, | |
code ) |
#define GET_ADDRESSv2 | ( | s | ) |
#define GET_ADDRESSv3 | ( | s | ) |
LONG _RefReader | ( | READER_CONTEXT * | sReader | ) |
Definition at line 99 of file readerfactory.c.
LONG _UnrefReader | ( | READER_CONTEXT * | sReader | ) |
Definition at line 109 of file readerfactory.c.
|
static |
Definition at line 80 of file readerfactory.c.
|
static |
Definition at line 641 of file readerfactory.c.
LONG RFAddReader | ( | const char * | readerNameLong, |
int | port, | ||
const char * | library, | ||
const char * | device ) |
Definition at line 154 of file readerfactory.c.
LONG RFAddReaderHandle | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard ) |
Definition at line 1214 of file readerfactory.c.
LONG RFAllocateReaderSpace | ( | unsigned int | customMaxReaderHandles | ) |
Definition at line 122 of file readerfactory.c.
LONG RFBindFunctions | ( | READER_CONTEXT * | rContext | ) |
Definition at line 899 of file readerfactory.c.
LONG RFCheckReaderEventState | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard ) |
Definition at line 1319 of file readerfactory.c.
LONG RFCheckReaderStatus | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1376 of file readerfactory.c.
LONG RFCheckSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext ) |
Definition at line 1024 of file readerfactory.c.
void RFCleanupReaders | ( | void | ) |
Definition at line 1384 of file readerfactory.c.
LONG RFClearReaderEventState | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard ) |
Definition at line 1357 of file readerfactory.c.
SCARDHANDLE RFCreateReaderHandle | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1184 of file readerfactory.c.
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.
LONG RFInitializeReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1097 of file readerfactory.c.
LONG RFLoadReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 882 of file readerfactory.c.
LONG RFLockSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext ) |
Definition at line 1032 of file readerfactory.c.
LONG RFReaderInfo | ( | const char * | readerName, |
READER_CONTEXT ** | sReader ) |
Definition at line 829 of file readerfactory.c.
LONG RFReaderInfoById | ( | SCARDHANDLE | hCard, |
READER_CONTEXT ** | sReader ) |
Definition at line 855 of file readerfactory.c.
LONG RFRemoveReader | ( | const char * | readerName, |
int | port, | ||
int | flags ) |
Definition at line 577 of file readerfactory.c.
LONG RFRemoveReaderHandle | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard ) |
Definition at line 1257 of file readerfactory.c.
void RFSetPowerState | ( | READER_CONTEXT * | rContext, |
int | value ) |
Definition at line 1602 of file readerfactory.c.
void RFSetReaderEventState | ( | READER_CONTEXT * | rContext, |
DWORD | dwEvent ) |
Definition at line 1286 of file readerfactory.c.
LONG RFSetReaderName | ( | READER_CONTEXT * | rContext, |
const char * | readerName, | ||
const char * | libraryName, | ||
int | port ) |
Definition at line 713 of file readerfactory.c.
LONG RFUnBindFunctions | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1001 of file readerfactory.c.
void RFUnInitializeReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1155 of file readerfactory.c.
LONG RFUnloadReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1009 of file readerfactory.c.
LONG RFUnlockAllSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext ) |
Definition at line 1081 of file readerfactory.c.
LONG RFUnlockSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext ) |
Definition at line 1048 of file readerfactory.c.
|
static |
Definition at line 70 of file readerfactory.c.
|
static |
Definition at line 75 of file readerfactory.c.
|
static |
Definition at line 69 of file readerfactory.c.
int16_t ReaderEvents = 1 |
Definition at line 76 of file readerfactory.c.
READER_STATE readerStates[PCSCLITE_MAX_READERS_CONTEXTS] |
Definition at line 68 of file readerfactory.c.
|
static |
Definition at line 67 of file readerfactory.c.