NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
hcache.h
Go to the documentation of this file.
1
23#ifndef MUTT_MAILDIR_HCACHE_H
24#define MUTT_MAILDIR_HCACHE_H
25
26#include <stdlib.h>
27
28struct Email;
29struct HeaderCache;
30struct Mailbox;
31
32#ifdef USE_HCACHE
33
34void maildir_hcache_close (struct HeaderCache **ptr);
35int maildir_hcache_delete(struct HeaderCache *hc, struct Email *e);
36struct HeaderCache *maildir_hcache_open (struct Mailbox *m);
37struct Email * maildir_hcache_read (struct HeaderCache *hc, struct Email *e, const char *fn);
38int maildir_hcache_store (struct HeaderCache *hc, struct Email *e);
39
40#else
41
42static inline void maildir_hcache_close (struct HeaderCache **ptr) {}
43static inline int maildir_hcache_delete(struct HeaderCache *hc, struct Email *e) { return 0; }
44static inline struct HeaderCache *maildir_hcache_open (struct Mailbox *m) { return NULL; }
45static inline struct Email * maildir_hcache_read (struct HeaderCache *hc, struct Email *e, const char *fn) { return NULL; }
46static inline int maildir_hcache_store (struct HeaderCache *hc, struct Email *e) { return 0; }
47
48#endif
49
50#endif /* MUTT_MAILDIR_HCACHE_H */
int maildir_hcache_store(struct HeaderCache *hc, struct Email *e)
Save an Email to the Header Cache.
Definition: hcache.c:155
struct Email * maildir_hcache_read(struct HeaderCache *hc, struct Email *e, const char *fn)
Read an Email from the Header Cache.
Definition: hcache.c:113
struct HeaderCache * maildir_hcache_open(struct Mailbox *m)
Open the Header Cache.
Definition: hcache.c:96
int maildir_hcache_delete(struct HeaderCache *hc, struct Email *e)
Delete an Email from the Header Cache.
Definition: hcache.c:81
void maildir_hcache_close(struct HeaderCache **ptr)
Close the Header Cache.
Definition: hcache.c:69
The envelope/body of an email.
Definition: email.h:39
Header Cache.
Definition: lib.h:86
A mailbox.
Definition: mailbox.h:79