cm_card_l.h File Reference

#include <chipcard/chipcard.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, uint32_t clid, int duration, int maxLocks)
int LCCM_Card_CheckRequest (LCCO_CARD *cd, uint32_t clid)
int LCCM_Card_Unlock (LCCO_CARD *cd, uint32_t clid)
int LCCM_Card_RemoveRequest (LCCO_CARD *cd, uint32_t clid)
void LCCM_Card_RemoveAllClientRequests (LCCO_CARD *cd, uint32_t clid)
int LCCM_Card_HasLockRequests (const LCCO_CARD *cd)
int LCCM_Card_CheckAccess (LCCO_CARD *cd, uint32_t 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)
uint32_t LCCM_Card_GetReaderLockId (const LCCO_CARD *cd)
void LCCM_Card_SetReaderLockId (LCCO_CARD *cd, uint32_t i)

Function Documentation

void LCCM_Card_extend ( LCCO_CARD cd  ) 
void LCCM_Card_unextend ( LCCO_CARD cd  ) 
int LCCM_Card_RequestLock ( LCCO_CARD cd,
uint32_t  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,
uint32_t  clid 
)
Returns:
-1 on error, 0 if request granted, 1 of not
int LCCM_Card_Unlock ( LCCO_CARD cd,
uint32_t  clid 
)

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

int LCCM_Card_RemoveRequest ( LCCO_CARD cd,
uint32_t  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,
uint32_t  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,
uint32_t  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 
)
uint32_t LCCM_Card_GetReaderLockId ( const LCCO_CARD cd  ) 
void LCCM_Card_SetReaderLockId ( LCCO_CARD cd,
uint32_t  i 
)
Generated on Mon Jul 5 23:17:11 2010 for libchipcard by  doxygen 1.6.3