fslock.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id$
00005     begin       : Wed Mar 24 2004
00006     copyright   : (C) 2004 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
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  /* defgroup */
00107 
00108 #endif
00109 
00110 
00111 
00112 
00113 
00114 
00115 

Generated on Wed Sep 3 15:21:58 2008 for gwenhywfar by  doxygen 1.5.6