gwenhywfar 5.12.0
fslock.h File Reference
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/gui.h>
Include dependency graph for fslock.h:

Go to the source code of this file.

Typedefs

typedef struct GWEN_FSLOCK GWEN_FSLOCK

Enumerations

enum  GWEN_FSLOCK_RESULT {
  GWEN_FSLock_ResultOk =0 , GWEN_FSLock_ResultError , GWEN_FSLock_ResultTimeout , GWEN_FSLock_ResultBusy ,
  GWEN_FSLock_ResultNoLock , GWEN_FSLock_ResultUserAbort
}
enum  GWEN_FSLOCK_TYPE { GWEN_FSLock_TypeUnknown =0 , GWEN_FSLock_TypeFile , GWEN_FSLock_TypeDir }

Functions

GWENHYWFAR_API void GWEN_FSLock_Attach (GWEN_FSLOCK *fl)
GWENHYWFAR_API void GWEN_FSLock_free (GWEN_FSLOCK *fl)
GWENHYWFAR_API const char * GWEN_FSLock_GetName (const GWEN_FSLOCK *fl)
GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Lock (GWEN_FSLOCK *fl, int timeout, uint32_t gid)
GWENHYWFAR_API GWEN_FSLOCKGWEN_FSLock_new (const char *fname, GWEN_FSLOCK_TYPE t)
GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Unlock (GWEN_FSLOCK *fl)

Typedef Documentation

◆ GWEN_FSLOCK

typedef struct GWEN_FSLOCK GWEN_FSLOCK

Definition at line 59 of file fslock.h.

Enumeration Type Documentation

◆ GWEN_FSLOCK_RESULT

Enumerator
GWEN_FSLock_ResultOk 
GWEN_FSLock_ResultError 
GWEN_FSLock_ResultTimeout 
GWEN_FSLock_ResultBusy 
GWEN_FSLock_ResultNoLock 
GWEN_FSLock_ResultUserAbort 

Definition at line 71 of file fslock.h.

◆ GWEN_FSLOCK_TYPE

Enumerator
GWEN_FSLock_TypeUnknown 
GWEN_FSLock_TypeFile 
GWEN_FSLock_TypeDir 

Definition at line 64 of file fslock.h.

Function Documentation

◆ GWEN_FSLock_Attach()

GWENHYWFAR_API void GWEN_FSLock_Attach ( GWEN_FSLOCK * fl)

References GWENHYWFAR_API.

◆ GWEN_FSLock_free()

◆ GWEN_FSLock_GetName()

GWENHYWFAR_API const char * GWEN_FSLock_GetName ( const GWEN_FSLOCK * fl)

Referenced by GWEN_ConfigMgrDir_FindLock(), and GWEN_ConfigMgrDir_FreeData().

Here is the caller graph for this function:

◆ GWEN_FSLock_Lock()

GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Lock ( GWEN_FSLOCK * fl,
int timeout,
uint32_t gid )

This function tries to acquire a lock for the given file/folder. It waits if necessary (using GWEN_Gui_ProgressStart) while waiting.

Parameters
flfslock object
timeouttimeout in milliseconds (special values are GWEN_TIMEOUT_NONE (which does not wait at all) and GWEN_TIMEOUT_FOREVER (which waits forever).

References GWENHYWFAR_API.

Referenced by _addLogLineToFile(), _writeLinesToFile(), GWEN_ConfigMgrDir__GetUniqueId(), GWEN_ConfigMgrDir__UpdateLastUniqueId(), GWEN_ConfigMgrDir_DeleteGroup(), GWEN_ConfigMgrDir_LockGroup(), GWEN_Crypt_TokenFile__OpenFile(), GWEN_DB_WriteFile(), GWEN_DBIO_ExportToFile(), GWEN_DBIO_ImportFromFile(), GWEN_PasswordStore_GetPassword(), GWEN_PasswordStore_GetTokenList(), and GWEN_PasswordStore_SetPassword().

Here is the caller graph for this function:

◆ GWEN_FSLock_new()

◆ GWEN_FSLock_Unlock()