fslock.h
Go to the documentation of this file.
/***************************************************************************
$RCSfile$
-------------------
cvs : $Id$
begin : Wed Mar 24 2004
copyright : (C) 2004 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWEN_FSLOCK_H
#define GWEN_FSLOCK_H
#ifdef __cplusplus
extern "C" {
#endif
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>
typedef struct GWEN_FSLOCK GWEN_FSLOCK;
GWEN_LIST_FUNCTION_LIB_DEFS(GWEN_FSLOCK, GWEN_FSLock, GWENHYWFAR_API)
GWEN_LIST2_FUNCTION_LIB_DEFS(GWEN_FSLOCK, GWEN_FSLock, GWENHYWFAR_API)
typedef enum {
GWEN_FSLock_TypeUnknown=0,
GWEN_FSLock_TypeFile,
GWEN_FSLock_TypeDir
} GWEN_FSLOCK_TYPE;
typedef enum {
GWEN_FSLock_ResultOk=0,
GWEN_FSLock_ResultError,
GWEN_FSLock_ResultTimeout,
GWEN_FSLock_ResultBusy,
GWEN_FSLock_ResultNoLock,
GWEN_FSLock_ResultUserAbort
} GWEN_FSLOCK_RESULT;
#include <gwenhywfar/db.h>
#include <gwenhywfar/gui.h>
GWENHYWFAR_API
GWEN_FSLOCK *GWEN_FSLock_new(const char *fname, GWEN_FSLOCK_TYPE t);
GWENHYWFAR_API
void GWEN_FSLock_free(GWEN_FSLOCK *fl);
GWENHYWFAR_API
void GWEN_FSLock_Attach(GWEN_FSLOCK *fl);
GWENHYWFAR_API
GWEN_FSLOCK_RESULT GWEN_FSLock_Lock(GWEN_FSLOCK *fl, int timeout, uint32_t gid);
GWENHYWFAR_API
GWEN_FSLOCK_RESULT GWEN_FSLock_Unlock(GWEN_FSLOCK *fl);
GWENHYWFAR_API
const char *GWEN_FSLock_GetName(const GWEN_FSLOCK *fl);
#ifdef __cplusplus
}
#endif
/* defgroup */
#endif
db.h
GWEN_FSLock_free
GWENHYWFAR_API void GWEN_FSLock_free(GWEN_FSLOCK *fl)
GWEN_FSLock_GetName
GWENHYWFAR_API const char * GWEN_FSLock_GetName(const GWEN_FSLOCK *fl)
GWEN_FSLOCK
struct GWEN_FSLOCK GWEN_FSLOCK
Definition fslock.h:59
GWEN_FSLock_Attach
GWENHYWFAR_API void GWEN_FSLock_Attach(GWEN_FSLOCK *fl)
GWEN_FSLock_new
GWENHYWFAR_API GWEN_FSLOCK * GWEN_FSLock_new(const char *fname, GWEN_FSLOCK_TYPE t)
GWEN_FSLOCK_RESULT
GWEN_FSLOCK_RESULT
Definition fslock.h:71
GWEN_FSLock_ResultTimeout
@ GWEN_FSLock_ResultTimeout
Definition fslock.h:74
GWEN_FSLock_ResultOk
@ GWEN_FSLock_ResultOk
Definition fslock.h:72
GWEN_FSLock_ResultBusy
@ GWEN_FSLock_ResultBusy
Definition fslock.h:75
GWEN_FSLock_ResultNoLock
@ GWEN_FSLock_ResultNoLock
Definition fslock.h:76
GWEN_FSLock_ResultUserAbort
@ GWEN_FSLock_ResultUserAbort
Definition fslock.h:77
GWEN_FSLock_ResultError
@ GWEN_FSLock_ResultError
Definition fslock.h:73
GWEN_FSLock_Lock
GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Lock(GWEN_FSLOCK *fl, int timeout, uint32_t gid)
GWEN_FSLOCK_TYPE
GWEN_FSLOCK_TYPE
Definition fslock.h:64
GWEN_FSLock_TypeDir
@ GWEN_FSLock_TypeDir
Definition fslock.h:67
GWEN_FSLock_TypeFile
@ GWEN_FSLock_TypeFile
Definition fslock.h:66
GWEN_FSLock_TypeUnknown
@ GWEN_FSLock_TypeUnknown
Definition fslock.h:65
GWEN_FSLock_Unlock
GWENHYWFAR_API GWEN_FSLOCK_RESULT GWEN_FSLock_Unlock(GWEN_FSLOCK *fl)
gui.h
gwenhywfarapi.h
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
list1.h
GWEN_LIST_FUNCTION_LIB_DEFS
#define GWEN_LIST_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list1.h:349
list2.h
This file contains some macros concerning lists.
GWEN_LIST2_FUNCTION_LIB_DEFS
#define GWEN_LIST2_FUNCTION_LIB_DEFS(t, pr, decl)
Definition list2.h:56
types.h