fslock.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef GWEN_FSLOCK_H
00030 #define GWEN_FSLOCK_H
00031
00047
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051
00052
00053 typedef struct GWEN_FSLOCK GWEN_FSLOCK;
00054
00055 typedef enum {
00056 GWEN_FSLock_TypeUnknown=0,
00057 GWEN_FSLock_TypeFile,
00058 GWEN_FSLock_TypeDir
00059 } GWEN_FSLOCK_TYPE;
00060
00061
00062 typedef enum {
00063 GWEN_FSLock_ResultOk=0,
00064 GWEN_FSLock_ResultError,
00065 GWEN_FSLock_ResultTimeout,
00066 GWEN_FSLock_ResultBusy,
00067 GWEN_FSLock_ResultNoLock,
00068 GWEN_FSLock_ResultUserAbort
00069 } GWEN_FSLOCK_RESULT;
00070
00071
00072 #include <gwenhywfar/gwenhywfarapi.h>
00073 #include <gwenhywfar/types.h>
00074 #include <gwenhywfar/db.h>
00075 #include <gwenhywfar/gui.h>
00076
00077
00078 GWENHYWFAR_API
00079 GWEN_FSLOCK *GWEN_FSLock_new(const char *fname, GWEN_FSLOCK_TYPE t);
00080 GWENHYWFAR_API
00081 void GWEN_FSLock_free(GWEN_FSLOCK *fl);
00082
00091 GWENHYWFAR_API
00092 GWEN_FSLOCK_RESULT GWEN_FSLock_Lock(GWEN_FSLOCK *fl, int timeout, uint32_t gid);
00093
00098 GWENHYWFAR_API
00099 GWEN_FSLOCK_RESULT GWEN_FSLock_Unlock(GWEN_FSLOCK *fl);
00100
00101
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105
00107
00108 #endif
00109
00110
00111
00112
00113
00114
00115