cm_card_l.h File Reference

#include <chipcard3/chipcard3.h>
#include "common/card.h"
#include <time.h>

Include dependency graph for cm_card_l.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void LCCM_Card_extend (LCCO_CARD *cd)
void LCCM_Card_unextend (LCCO_CARD *cd)
int LCCM_Card_RequestLock (LCCO_CARD *cd, GWEN_TYPE_UINT32 clid, int duration, int maxLocks)
int LCCM_Card_CheckRequest (LCCO_CARD *cd, GWEN_TYPE_UINT32 clid)
int LCCM_Card_Unlock (LCCO_CARD *cd, GWEN_TYPE_UINT32 clid)
int LCCM_Card_RemoveRequest (LCCO_CARD *cd, GWEN_TYPE_UINT32 clid)
void LCCM_Card_RemoveAllClientRequests (LCCO_CARD *cd, GWEN_TYPE_UINT32 clid)
int LCCM_Card_HasLockRequests (const LCCO_CARD *cd)
int LCCM_Card_CheckAccess (LCCO_CARD *cd, GWEN_TYPE_UINT32 clid)
time_t LCCM_Card_GetUnusedSince (const LCCO_CARD *cd)
LC_CARD_STATUS LCCM_Card_GetLastStatus (const LCCO_CARD *cd)
void LCCM_Card_SetLastStatus (LCCO_CARD *cd, LC_CARD_STATUS st)
int LCCM_Card_GetReaderIsInUse (const LCCO_CARD *cd)
void LCCM_Card_SetReaderIsInUse (LCCO_CARD *cd, int i)
time_t LCCM_Card_GetLastAdTime (const LCCO_CARD *cd)
void LCCM_Card_SetLastAdTime (LCCO_CARD *cd, time_t t)
GWEN_TYPE_UINT32 LCCM_Card_GetReaderLockId (const LCCO_CARD *cd)
void LCCM_Card_SetReaderLockId (LCCO_CARD *cd, GWEN_TYPE_UINT32 i)


Function Documentation

void LCCM_Card_extend ( LCCO_CARD cd  ) 

void LCCM_Card_unextend ( LCCO_CARD cd  ) 

int LCCM_Card_RequestLock ( LCCO_CARD cd,
GWEN_TYPE_UINT32  clid,
int  duration,
int  maxLocks 
)

Request a lock on the card. The locking time will be at most the number of seconds given in the parameter duration.

Returns:
0 if ok, !=0 on error
Parameters:
duration maximum number of seconds the lock will hold
maxLocks maximum number of locks allowed for this client

int LCCM_Card_CheckRequest ( LCCO_CARD cd,
GWEN_TYPE_UINT32  clid 
)

Returns:
-1 on error, 0 if request granted, 1 of not

int LCCM_Card_Unlock ( LCCO_CARD cd,
GWEN_TYPE_UINT32  clid 
)

Removes a lock applied by the combination of LCCM_Card_RequestLock and LCCM_Card_CheckRequest.

int LCCM_Card_RemoveRequest ( LCCO_CARD cd,
GWEN_TYPE_UINT32  clid 
)

Removes a lock request from the list of waiting requests. The request to be removed MUST NOT be the currently active one (use LCCM_Card_Unlock in this case).

Returns:
0 if ok, !=0 on error

void LCCM_Card_RemoveAllClientRequests ( LCCO_CARD cd,
GWEN_TYPE_UINT32  clid 
)

Removes all lock requests for the given client. If the client already acquired a lock on this card then it will be removed (thus unlocking the card for use by other clients).

int LCCM_Card_HasLockRequests ( const LCCO_CARD cd  ) 

int LCCM_Card_CheckAccess ( LCCO_CARD cd,
GWEN_TYPE_UINT32  clid 
)

time_t LCCM_Card_GetUnusedSince ( const LCCO_CARD cd  ) 

LC_CARD_STATUS LCCM_Card_GetLastStatus ( const LCCO_CARD cd  ) 

void LCCM_Card_SetLastStatus ( LCCO_CARD cd,
LC_CARD_STATUS  st 
)

int LCCM_Card_GetReaderIsInUse ( const LCCO_CARD cd  ) 

void LCCM_Card_SetReaderIsInUse ( LCCO_CARD cd,
int  i 
)

time_t LCCM_Card_GetLastAdTime ( const LCCO_CARD cd  ) 

void LCCM_Card_SetLastAdTime ( LCCO_CARD cd,
time_t  t 
)

GWEN_TYPE_UINT32 LCCM_Card_GetReaderLockId ( const LCCO_CARD cd  ) 

void LCCM_Card_SetReaderLockId ( LCCO_CARD cd,
GWEN_TYPE_UINT32  i 
)


Generated on Wed Dec 3 19:29:32 2008 for libchipcard2 by  doxygen 1.5.6