Use liblockfile, no need for dotlock anymore.
[apps/madmutt.git] / lib-mx / hcache.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 2004 Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
4  * Copyright (C) 2004 Tobias Werth <sitowert@stud.uni-erlangen.de>
5  * Copyright (C) 2004 Brian Fundakowski Feldman <green@FreeBSD.org>
6  *
7  * This file is part of mutt-ng, see http://www.muttng.org/.
8  * It's licensed under the GNU General Public License,
9  * please see the file GPL in the top level source directory.
10  */
11 #ifndef _MUTT_HCACHE_H
12 #define _MUTT_HCACHE_H
13
14 #ifdef USE_HCACHE
15 typedef struct hcache_t hcache_t;
16
17 hcache_t *mutt_hcache_open(const char *folder);
18 void mutt_hcache_close(hcache_t **db);
19
20 HEADER *mutt_hcache_restore(const void *d, HEADER **oh);
21 void *mutt_hcache_fetch(hcache_t *db, const char *filename,
22                         ssize_t (*keylen)(const char *fn));
23 int mutt_hcache_store(hcache_t *db, const char *filename, HEADER *h,
24                       long uid_validity,
25                       ssize_t (*keylen)(const char *fn));
26 int mutt_hcache_delete(hcache_t *db, const char *filename,
27                        ssize_t (*keylen)(const char *fn));
28 #endif /* USE_HCACHE */
29
30 #endif /* !_MUTT_HCACHE_H */