00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CHIPCARD_SERVER2_CM_CARD_L_H
00016 #define CHIPCARD_SERVER2_CM_CARD_L_H
00017
00018 #include <chipcard/chipcard.h>
00019 #include "common/card.h"
00020 #include <time.h>
00021
00022
00023 void LCCM_Card_extend(LCCO_CARD *cd);
00024 void LCCM_Card_unextend(LCCO_CARD *cd);
00025
00026
00034 int LCCM_Card_RequestLock(LCCO_CARD *cd,
00035 uint32_t clid,
00036 int duration,
00037 int maxLocks);
00038
00042 int LCCM_Card_CheckRequest(LCCO_CARD *cd, uint32_t clid);
00043
00048 int LCCM_Card_Unlock(LCCO_CARD *cd, uint32_t clid);
00049
00050
00057 int LCCM_Card_RemoveRequest(LCCO_CARD *cd, uint32_t clid);
00058
00059
00065 void LCCM_Card_RemoveAllClientRequests(LCCO_CARD *cd,
00066 uint32_t clid);
00067
00068 int LCCM_Card_HasLockRequests(const LCCO_CARD *cd);
00069
00070
00071 int LCCM_Card_CheckAccess(LCCO_CARD *cd, uint32_t clid);
00072
00073
00074 time_t LCCM_Card_GetUnusedSince(const LCCO_CARD *cd);
00075 LC_CARD_STATUS LCCM_Card_GetLastStatus(const LCCO_CARD *cd);
00076 void LCCM_Card_SetLastStatus(LCCO_CARD *cd, LC_CARD_STATUS st);
00077 int LCCM_Card_GetReaderIsInUse(const LCCO_CARD *cd);
00078 void LCCM_Card_SetReaderIsInUse(LCCO_CARD *cd, int i);
00079
00080 time_t LCCM_Card_GetLastAdTime(const LCCO_CARD *cd);
00081 void LCCM_Card_SetLastAdTime(LCCO_CARD *cd, time_t t);
00082
00083
00084 uint32_t LCCM_Card_GetReaderLockId(const LCCO_CARD *cd);
00085 void LCCM_Card_SetReaderLockId(LCCO_CARD *cd, uint32_t i);
00086
00087
00088
00089
00090 #endif
00091