#include <gwenhywfar/types.h>


Go to the source code of this file.
Typedefs | |
| typedef struct LCS_LOCKMANAGER | LCS_LOCKMANAGER |
Functions | |
| LCS_LOCKMANAGER * | LCS_LockManager_new (const char *objectTypeName) |
| void | LCS_LockManager_free (LCS_LOCKMANAGER *lm) |
| const char * | LCS_LockManager_GetObjectTypeName (const LCS_LOCKMANAGER *lm) |
| uint32_t | LCS_LockManager_RequestLock (LCS_LOCKMANAGER *lm, uint32_t clid, int duration, int maxLocks) |
| int | LCS_LockManager_RequestLockWithId (LCS_LOCKMANAGER *lm, uint32_t lockid, uint32_t clid, int duration, int maxLocks) |
| uint32_t | LCS_LockManager_GetNextRequestId () |
| int | LCS_LockManager_CheckRequest (LCS_LOCKMANAGER *lm, uint32_t reqid) |
| int | LCS_LockManager_Unlock (LCS_LOCKMANAGER *lm, uint32_t reqid) |
| int | LCS_LockManager_RemoveRequest (LCS_LOCKMANAGER *lm, uint32_t reqid) |
| void | LCS_LockManager_RemoveAllClientRequests (LCS_LOCKMANAGER *lm, uint32_t clid) |
| int | LCS_LockManager_HasLockRequests (const LCS_LOCKMANAGER *lm) |
| int | LCS_LockManager_CheckAccess (LCS_LOCKMANAGER *lm, uint32_t reqid) |
| typedef struct LCS_LOCKMANAGER LCS_LOCKMANAGER |
| LCS_LOCKMANAGER* LCS_LockManager_new | ( | const char * | objectTypeName | ) |
| objectTypeName | just for debugging (e.g. "Reader", "Card") |
| void LCS_LockManager_free | ( | LCS_LOCKMANAGER * | lm | ) |
| const char* LCS_LockManager_GetObjectTypeName | ( | const LCS_LOCKMANAGER * | lm | ) |
| uint32_t LCS_LockManager_RequestLock | ( | LCS_LOCKMANAGER * | lm, | |
| 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.
| duration | maximum number of seconds the lock will hold | |
| maxLocks | maximum number of locks allowed for this client |
| int LCS_LockManager_RequestLockWithId | ( | LCS_LOCKMANAGER * | lm, | |
| uint32_t | lockid, | |||
| 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.
| duration | maximum number of seconds the lock will hold | |
| maxLocks | maximum number of locks allowed for this client |
| uint32_t LCS_LockManager_GetNextRequestId | ( | ) |
| int LCS_LockManager_CheckRequest | ( | LCS_LOCKMANAGER * | lm, | |
| uint32_t | reqid | |||
| ) |
| int LCS_LockManager_Unlock | ( | LCS_LOCKMANAGER * | lm, | |
| uint32_t | reqid | |||
| ) |
Removes a lock applied by the combination of LCS_LockManager_RequestLock and LCS_LockManager_CheckRequest.
| int LCS_LockManager_RemoveRequest | ( | LCS_LOCKMANAGER * | lm, | |
| uint32_t | reqid | |||
| ) |
Removes a lock request from the list of waiting requests. The request to be removed MUST NOT be the currently active one (use LCS_LockManager_Unlock in this case).
| void LCS_LockManager_RemoveAllClientRequests | ( | LCS_LOCKMANAGER * | lm, | |
| 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 LCS_LockManager_HasLockRequests | ( | const LCS_LOCKMANAGER * | lm | ) |
| int LCS_LockManager_CheckAccess | ( | LCS_LOCKMANAGER * | lm, | |
| uint32_t | reqid | |||
| ) |