pcsc-lite 2.0.1
|
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 | IDENTITY_SHIFT 16 |
#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 |
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 | ) |
#define IDENTITY_SHIFT 16 |
Definition at line 80 of file readerfactory.c.
LONG _RefReader | ( | READER_CONTEXT * | sReader | ) |
Definition at line 102 of file readerfactory.c.
LONG _UnrefReader | ( | READER_CONTEXT * | sReader | ) |
Definition at line 112 of file readerfactory.c.
|
static |
Definition at line 83 of file readerfactory.c.
|
static |
Definition at line 632 of file readerfactory.c.
LONG RFAddReader | ( | const char * | readerNameLong, |
int | port, | ||
const char * | library, | ||
const char * | device | ||
) |
Definition at line 157 of file readerfactory.c.
LONG RFAddReaderHandle | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard | ||
) |
Definition at line 1205 of file readerfactory.c.
LONG RFAllocateReaderSpace | ( | unsigned int | customMaxReaderHandles | ) |
Definition at line 125 of file readerfactory.c.
LONG RFBindFunctions | ( | READER_CONTEXT * | rContext | ) |
Definition at line 890 of file readerfactory.c.
LONG RFCheckReaderEventState | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard | ||
) |
Definition at line 1310 of file readerfactory.c.
LONG RFCheckReaderStatus | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1367 of file readerfactory.c.
LONG RFCheckSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext | ||
) |
Definition at line 1015 of file readerfactory.c.
void RFCleanupReaders | ( | void | ) |
Definition at line 1375 of file readerfactory.c.
LONG RFClearReaderEventState | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard | ||
) |
Definition at line 1348 of file readerfactory.c.
SCARDHANDLE RFCreateReaderHandle | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1175 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 1585 of file readerfactory.c.
LONG RFInitializeReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1088 of file readerfactory.c.
LONG RFLoadReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 873 of file readerfactory.c.
LONG RFLockSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext | ||
) |
Definition at line 1023 of file readerfactory.c.
LONG RFReaderInfo | ( | const char * | readerName, |
READER_CONTEXT ** | sReader | ||
) |
Definition at line 820 of file readerfactory.c.
LONG RFReaderInfoById | ( | SCARDHANDLE | hCard, |
READER_CONTEXT ** | sReader | ||
) |
Definition at line 846 of file readerfactory.c.
LONG RFRemoveReader | ( | const char * | readerName, |
int | port, | ||
int | flags | ||
) |
Definition at line 574 of file readerfactory.c.
LONG RFRemoveReaderHandle | ( | READER_CONTEXT * | rContext, |
SCARDHANDLE | hCard | ||
) |
Definition at line 1248 of file readerfactory.c.
void RFSetPowerState | ( | READER_CONTEXT * | rContext, |
int | value | ||
) |
Definition at line 1593 of file readerfactory.c.
void RFSetReaderEventState | ( | READER_CONTEXT * | rContext, |
DWORD | dwEvent | ||
) |
Definition at line 1277 of file readerfactory.c.
LONG RFSetReaderName | ( | READER_CONTEXT * | rContext, |
const char * | readerName, | ||
const char * | libraryName, | ||
int | port | ||
) |
Definition at line 704 of file readerfactory.c.
LONG RFUnBindFunctions | ( | READER_CONTEXT * | rContext | ) |
Definition at line 992 of file readerfactory.c.
void RFUnInitializeReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1146 of file readerfactory.c.
LONG RFUnloadReader | ( | READER_CONTEXT * | rContext | ) |
Definition at line 1000 of file readerfactory.c.
LONG RFUnlockAllSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext | ||
) |
Definition at line 1072 of file readerfactory.c.
LONG RFUnlockSharing | ( | SCARDHANDLE | hCard, |
READER_CONTEXT * | rContext | ||
) |
Definition at line 1039 of file readerfactory.c.
|
static |
Definition at line 73 of file readerfactory.c.
|
static |
Definition at line 78 of file readerfactory.c.
|
static |
Definition at line 72 of file readerfactory.c.
READER_STATE readerStates[PCSCLITE_MAX_READERS_CONTEXTS] |
Definition at line 71 of file readerfactory.c.
|
static |
Definition at line 70 of file readerfactory.c.