Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

Classes | Defines | Typedefs | Functions | Variables

winscard_svc.c File Reference

This demarshalls functions over the message queue and keeps track of clients and their handles. More...

#include "config.h"
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include "pcscd.h"
#include "winscard.h"
#include "debuglog.h"
#include "winscard_msg.h"
#include "winscard_svc.h"
#include "sys_generic.h"
#include "utils.h"
#include "readerfactory.h"
#include "eventhandler.h"
#include "simclist.h"
Include dependency graph for winscard_svc.c:

Go to the source code of this file.

Classes

struct  _psContext

Defines

#define READ_BODY(v)
#define WRITE_BODY(v)   WRITE_BODY_WITH_COMMAND(CommandsText[header.command], v)
#define WRITE_BODY_WITH_COMMAND(command, v)

Typedefs

typedef struct _psContext SCONTEXT

Functions

void ContextsDeinitialize (void)
LONG ContextsInitialize (int customMaxThreadCounter, int customMaxThreadCardHandles)
static int contextsListhContext_seeker (const void *el, const void *key)
static void ContextThread (LPVOID pdwIndex)
LONG CreateContextThread (uint32_t *pdwClientID)
 Creates threads to handle messages received from Clients.
static LONG MSGAddContext (SCARDCONTEXT, SCONTEXT *)
static LONG MSGAddHandle (SCARDCONTEXT, SCARDHANDLE, SCONTEXT *)
static LONG MSGCheckHandleAssociation (SCARDHANDLE, SCONTEXT *)
static LONG MSGCleanupClient (SCONTEXT *)
static LONG MSGRemoveContext (SCARDCONTEXT, SCONTEXT *)
static LONG MSGRemoveHandle (SCARDHANDLE, SCONTEXT *)
LONG MSGSignalClient (uint32_t filedes, LONG rv)

Variables

char AutoExit
 Represents an Application Context on the Server side.
static const char * CommandsText []
 Handles messages received from Clients.
static int contextMaxCardHandles = PCSC_MAX_CONTEXT_CARD_HANDLES
static int contextMaxThreadCounter = PCSC_MAX_CONTEXT_THREADS
static list_t contextsList
pthread_mutex_t contextsList_lock
READER_STATE readerStates [PCSCLITE_MAX_READERS_CONTEXTS]

Detailed Description

This demarshalls functions over the message queue and keeps track of clients and their handles.

Each Client message is deald by creating a thread (CreateContextThread). The thread establishes reands and demarshalls the message and calls the appropriate function to threat it.

Definition in file winscard_svc.c.


Generated by  Doxygen 1.6.0   Back to index