gwenhywfar  5.11.1beta
fslock.h
Go to the documentation of this file.
1 /***************************************************************************
2  $RCSfile$
3  -------------------
4  cvs : $Id$
5  begin : Wed Mar 24 2004
6  copyright : (C) 2004 by Martin Preuss
7  email : martin@libchipcard.de
8 
9  ***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24  * MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 
29 #ifndef GWEN_FSLOCK_H
30 #define GWEN_FSLOCK_H
31 
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 
54 #include <gwenhywfar/types.h>
55 #include <gwenhywfar/list1.h>
56 #include <gwenhywfar/list2.h>
57 
58 
59 typedef struct GWEN_FSLOCK GWEN_FSLOCK;
62 
63 
64 typedef enum {
69 
70 
71 typedef enum {
79 
80 
81 #include <gwenhywfar/db.h>
82 #include <gwenhywfar/gui.h>
83 
84 
89 
92 
102 GWEN_FSLOCK_RESULT GWEN_FSLock_Lock(GWEN_FSLOCK *fl, int timeout, uint32_t gid);
103 
110 
111 
113 const char *GWEN_FSLock_GetName(const GWEN_FSLOCK *fl);
114 
115 #ifdef __cplusplus
116 }
117 #endif
118  /* defgroup */
120 
121 #endif
122 
123 
124 
125 
126 
127 
128 
GWENHYWFAR_API void GWEN_FSLock_free(GWEN_FSLOCK *fl)
struct GWEN_FSLOCK GWEN_FSLOCK
Definition: fslock.h:59
GWENHYWFAR_API void GWEN_FSLock_Attach(GWEN_FSLOCK *fl)
GWENHYWFAR_API const char * GWEN_FSLock_GetName(const GWEN_FSLOCK *fl)
GWENHYWFAR_API GWEN_FSLOCK * GWEN_FSLock_new(const char *fname, GWEN_FSLOCK_TYPE t)
GWEN_FSLOCK_RESULT
Definition: fslock.h:71
@ GWEN_FSLock_ResultTimeout
Definition: fslock.h:74
@ GWEN_FSLock_ResultOk
Definition: fslock.h:72
@ GWEN_FSLock_ResultBusy
Definition: fslock.h:75
@ GWEN_FSLock_ResultNoLock
Definition: fslock.h:76
@ GWEN_FSLock_ResultUserAbort
Definition: fslock.h:77
@ GWEN_FSLock_ResultError
Definition: fslock.h:73
GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Lock(GWEN_FSLOCK *fl, int timeout, uint32_t gid)
GWEN_FSLOCK_TYPE
Definition: fslock.h:64
@ GWEN_FSLock_TypeDir
Definition: fslock.h:67
@ GWEN_FSLock_TypeFile
Definition: fslock.h:66
@ GWEN_FSLock_TypeUnknown
Definition: fslock.h:65
GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Unlock(GWEN_FSLOCK *fl)
#define GWENHYWFAR_API
Definition: gwenhywfarapi.h:67
#define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl)
Definition: list1.h:348
This file contains some macros concerning lists.
#define GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, decl)
Definition: list2.h:56