gnupg/common/dotlock.h

36 lines
1.2 KiB
C
Raw Normal View History

/* dotlock.h - dotfile locking declarations
* Copyright (C) 2000, 2001, 2006, 2011 Free Software Foundation, Inc.
2003-01-09 13:36:05 +01:00
*
* This file is part of JNLIB, which is a subsystem of GnuPG.
2003-01-09 13:36:05 +01:00
*
2006-10-02 13:54:35 +02:00
* JNLIB is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
2007-07-04 21:49:40 +02:00
* published by the Free Software Foundation; either version 3 of
2006-10-02 13:54:35 +02:00
* the License, or (at your option) any later version.
2003-01-09 13:36:05 +01:00
*
2006-10-02 13:54:35 +02:00
* JNLIB 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.
2003-01-09 13:36:05 +01:00
*
2006-10-02 13:54:35 +02:00
* You should have received a copy of the GNU Lesser General Public
2007-07-04 21:49:40 +02:00
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
2003-01-09 13:36:05 +01:00
*/
#ifndef LIBJNLIB_DOTLOCK_H
#define LIBJNLIB_DOTLOCK_H
/* See dotlock.c for a description. */
2003-01-09 13:36:05 +01:00
struct dotlock_handle;
typedef struct dotlock_handle *dotlock_t;
2003-01-09 13:36:05 +01:00
void dotlock_disable (void);
dotlock_t dotlock_create (const char *file_to_lock);
void dotlock_destroy ( dotlock_t h );
int dotlock_take (dotlock_t h, long timeout);
int dotlock_release (dotlock_t h);
void dotlock_remove_lockfiles (void);
2003-01-09 13:36:05 +01:00
#endif /*LIBJNLIB_DOTLOCK_H*/