#include <gwenhywfar/types.h>


Go to the source code of this file.
| 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 | ) |
| GWEN_TYPE_UINT32 LCS_LockManager_RequestLock | ( | LCS_LOCKMANAGER * | lm, | |
| 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.
| 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, | |
| GWEN_TYPE_UINT32 | lockid, | |||
| 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.
| duration | maximum number of seconds the lock will hold | |
| maxLocks | maximum number of locks allowed for this client |
| GWEN_TYPE_UINT32 LCS_LockManager_GetNextRequestId | ( | ) |
| int LCS_LockManager_CheckRequest | ( | LCS_LOCKMANAGER * | lm, | |
| GWEN_TYPE_UINT32 | reqid | |||
| ) |
| int LCS_LockManager_Unlock | ( | LCS_LOCKMANAGER * | lm, | |
| GWEN_TYPE_UINT32 | reqid | |||
| ) |
Removes a lock applied by the combination of LCS_LockManager_RequestLock and LCS_LockManager_CheckRequest.
| int LCS_LockManager_RemoveRequest | ( | LCS_LOCKMANAGER * | lm, | |
| GWEN_TYPE_UINT32 | 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, | |
| 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 LCS_LockManager_HasLockRequests | ( | const LCS_LOCKMANAGER * | lm | ) |
| int LCS_LockManager_CheckAccess | ( | LCS_LOCKMANAGER * | lm, | |
| GWEN_TYPE_UINT32 | reqid | |||
| ) |
1.5.3