Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

ctcore.h File Reference

#include <chameleon/error.h>
#include <chameleon/conf.h>
#include <ctcore_public.h>

Go to the source code of this file.

Defines

#define CT_READERS_PER_CLIENT   16

Typedefs

typedef CTREADERSTRUCT CTREADERTABLE
typedef CTDRIVERSTRUCT CTDRIVERTABLE
typedef CTCLIENTSTRUCT CTCLIENTTABLE
typedef CTCORESTRUCT CTCORETABLE
typedef ERRORCODE(* CTDRIVER_ALLOCTERMPTR )(CTREADERTABLE *rt)
typedef ERRORCODE(* CTDRIVER_RELEASETERMPTR )(CTREADERTABLE *rt)
typedef ERRORCODE(* CTDRIVER_CONNTERMPTR )(CTREADERTABLE *rt, char *atrbuffer, int *atrbufferlen)
typedef ERRORCODE(* CTDRIVER_DISCONNTERMPTR )(CTREADERTABLE *rt)
typedef ERRORCODE(* CTDRIVER_STATUSPTR )(CTREADERTABLE *rt, char *atrbuffer, int *atrbufferlen)
typedef ERRORCODE(* CTDRIVER_COMMANDPTR )(CTREADERTABLE *rt, const char *sendBuffer, int sendBufferLength, char *recvBuffer, int *recvBufferLength)
typedef CTREADERDESCRIPTION *(* CTDRIVER_ENUMTERMSPTR )(CTDRIVERTABLE *dt)
typedef ERRORCODE(* CTDRIVER_CLOSEPTR )(CTDRIVERTABLE *dt)

Functions

CTREADERTABLE * CTCore_Reader_new ()
void CTCore_Reader_free (CTREADERTABLE *rt)
CTDRIVERTABLE * CTCore_Driver_new ()
void CTCore_Driver_free (CTDRIVERTABLE *dt)
CTCLIENTTABLE * CTCore_Client_new ()
void CTCore_Client_free (CTCLIENTTABLE *ct)
CTCORETABLE * CTCore_new ()
void CTCore_free (CTCORETABLE *ct)
int CTCore_RegisterClient (CTCORETABLE *ct)
void CTCore_UnregisterClient (CTCORETABLE *ct, int id)
int CTCore_GetClientReaderId (CTCORETABLE *ct, int id, int tid)
int CTCore_AllocTerminal (CTCORETABLE *ct, int cid, int tid, CTREADERDESCRIPTION **descr)
void CTCore_ReleaseTerminal (CTCORETABLE *ct, int cid, int tid)
ERRORCODE CTCore_ConnectTerminal (CTCORETABLE *ct, int cid, int tid, char *atrbuffer, int *atrbufferlen)
ERRORCODE CTCore_DisconnectTerminal (CTCORETABLE *ct, int cid, int tid)
ERRORCODE CTCore_CommandTerminal (CTCORETABLE *ct, int cid, int tid, const char *sendBuffer, int sendBufferLength, char *recvBuffer, int *recvBufferLength)
ERRORCODE CTCore_Init (CTCORETABLE *ct, CONFIGGROUP *driverDescriptions)
ERRORCODE CTCore_Fini (CTCORETABLE *ct)
ERRORCODE CTCore_AddReader (CTCORETABLE *ct, CTREADERDESCRIPTION *rd)
ERRORCODE CTCore_ModuleInit ()
ERRORCODE CTCore_ModuleFini ()
void CTCore_WalkTerminals (CTCORETABLE *ct)
ERRORCODE CTCore_CheckReaderStatus (CTCORETABLE *ct, int cid, int tid, unsigned int *status, char *atrbuffer, int *atrbufferlen)
ERRORCODE CTCore_GetReaderStatus (CTCORETABLE *ct, int cid, int tid, unsigned int *status, char *atrbuffer, int *atrbufferlen)


Define Documentation

#define CT_READERS_PER_CLIENT   16
 


Typedef Documentation

typedef struct CTCLIENTSTRUCT CTCLIENTTABLE
 

typedef struct CTCORESTRUCT CTCORETABLE
 

typedef ERRORCODE(* CTDRIVER_ALLOCTERMPTR)(CTREADERTABLE *rt)
 

typedef ERRORCODE(* CTDRIVER_CLOSEPTR)(CTDRIVERTABLE *dt)
 

typedef ERRORCODE(* CTDRIVER_COMMANDPTR)(CTREADERTABLE *rt, const char *sendBuffer, int sendBufferLength, char *recvBuffer, int *recvBufferLength)
 

typedef ERRORCODE(* CTDRIVER_CONNTERMPTR)(CTREADERTABLE *rt, char *atrbuffer, int *atrbufferlen)
 

typedef ERRORCODE(* CTDRIVER_DISCONNTERMPTR)(CTREADERTABLE *rt)
 

typedef CTREADERDESCRIPTION*(* CTDRIVER_ENUMTERMSPTR)(CTDRIVERTABLE *dt)
 

typedef ERRORCODE(* CTDRIVER_RELEASETERMPTR)(CTREADERTABLE *rt)
 

typedef ERRORCODE(* CTDRIVER_STATUSPTR)(CTREADERTABLE *rt, char *atrbuffer, int *atrbufferlen)
 

typedef struct CTDRIVERSTRUCT CTDRIVERTABLE
 

typedef struct CTREADERSTRUCT CTREADERTABLE
 


Function Documentation

ERRORCODE CTCore_AddReader (  CTCORETABLE *  ct,
CTREADERDESCRIPTION *  rd
) 
 

Adds a reader description to the internal list. This functions does not take over ownership of this description ! It makes a copy instead, if appropriate. The given description will be updated (at least the id field).

int CTCore_AllocTerminal (  CTCORETABLE *  ct,
int  cid,
int  tid,
CTREADERDESCRIPTION **  descr
) 
 

Returns:
terminal id (-1 on error)

ERRORCODE CTCore_CheckReaderStatus (  CTCORETABLE *  ct,
int  cid,
int  tid,
unsigned int *  status,
char *  atrbuffer,
int *  atrbufferlen
) 
 

Actually retrieves the reader status from the driver. Use this in test programs to really check the status.

void CTCore_Client_free (  CTCLIENTTABLE *  ct  ) 
 

CTCLIENTTABLE* CTCore_Client_new (   ) 
 

ERRORCODE CTCore_CommandTerminal (  CTCORETABLE *  ct,
int  cid,
int  tid,
const char *  sendBuffer,
int  sendBufferLength,
char *  recvBuffer,
int *  recvBufferLength
) 
 

ERRORCODE CTCore_ConnectTerminal (  CTCORETABLE *  ct,
int  cid,
int  tid,
char *  atrbuffer,
int *  atrbufferlen
) 
 

ERRORCODE CTCore_DisconnectTerminal (  CTCORETABLE *  ct,
int  cid,
int  tid
) 
 

void CTCore_Driver_free (  CTDRIVERTABLE *  dt  ) 
 

CTDRIVERTABLE* CTCore_Driver_new (   ) 
 

ERRORCODE CTCore_Fini (  CTCORETABLE *  ct  ) 
 

void CTCore_free (  CTCORETABLE *  ct  ) 
 

int CTCore_GetClientReaderId (  CTCORETABLE *  ct,
int  id,
int  tid
) 
 

ERRORCODE CTCore_GetReaderStatus (  CTCORETABLE *  ct,
int  cid,
int  tid,
unsigned int *  status,
char *  atrbuffer,
int *  atrbufferlen
) 
 

Returns the last status retrieved upon CTCore_WalkTerminals(). Does no immediate communication with the driver.

ERRORCODE CTCore_Init (  CTCORETABLE *  ct,
CONFIGGROUP *  driverDescriptions
) 
 

Takes over ownership of driverDescriptions if result is ok

ERRORCODE CTCore_ModuleFini (   ) 
 

This must be called once per program. It deinitialized static data (such as unregistering CTCore's error class etc).

ERRORCODE CTCore_ModuleInit (   ) 
 

This must be called once per program. It initialized static data (such as registering CTCore's error class etc).

CTCORETABLE* CTCore_new (   ) 
 

void CTCore_Reader_free (  CTREADERTABLE *  rt  ) 
 

CTREADERTABLE* CTCore_Reader_new (   ) 
 

int CTCore_RegisterClient (  CTCORETABLE *  ct  ) 
 

void CTCore_ReleaseTerminal (  CTCORETABLE *  ct,
int  cid,
int  tid
) 
 

void CTCore_UnregisterClient (  CTCORETABLE *  ct,
int  id
) 
 

void CTCore_WalkTerminals (  CTCORETABLE *  ct  ) 
 

Checks the status of all currently used readers. This especially updates the lastStatus and deltaStatus fields of the readers.


Generated on Sat Feb 11 15:20:28 2006 for libchipcard by  doxygen 1.4.2