61 const char *p = strrchr(fn, c_maildir_field_delimiter);
118 struct stat st_lastchanged = { 0 };
129 if (c_maildir_header_cache_verify)
130 rc = stat(fn, &st_lastchanged);
132 if ((rc == 0) && (st_lastchanged.st_mtime <= hce.
uidvalidity))
const char * cs_subset_path(const struct ConfigSubset *sub, const char *name)
Get a path config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
const char * cc_maildir_field_delimiter(void)
Get the cached value of $maildir_field_delimiter.
Convenience wrapper for the core headers.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
void email_free(struct Email **ptr)
Free an Email.
Structs that make up an email.
void maildir_edata_free(void **ptr)
Free the private Email data - Implements Email::edata_free() -.
struct HeaderCache * hcache_open(const char *path, const char *folder, hcache_namer_t namer, bool create)
Multiplexor for StoreOps::open.
int hcache_delete_email(struct HeaderCache *hc, const char *key, size_t keylen)
Multiplexor for StoreOps::delete_record.
void hcache_close(struct HeaderCache **ptr)
Multiplexor for StoreOps::close.
struct HCacheEntry hcache_fetch_email(struct HeaderCache *hc, const char *key, size_t keylen, uint32_t uidvalidity)
Multiplexor for StoreOps::fetch.
int hcache_store_email(struct HeaderCache *hc, const char *key, size_t keylen, struct Email *e, uint32_t uidvalidity)
Multiplexor for StoreOps::store.
Header cache multiplexor.
struct MaildirEmailData * maildir_edata_new(void)
Create a new MaildirEmailData object.
static size_t maildir_hcache_keylen(const char *fn)
Calculate the length of the Maildir path.
int maildir_hcache_store(struct HeaderCache *hc, struct Email *e)
Save an Email to the Header Cache.
struct Email * maildir_hcache_read(struct HeaderCache *hc, struct Email *e, const char *fn)
Read an Email from the Header Cache.
struct HeaderCache * maildir_hcache_open(struct Mailbox *m)
Open the Header Cache.
int maildir_hcache_delete(struct HeaderCache *hc, struct Email *e)
Delete an Email from the Header Cache.
void maildir_hcache_close(struct HeaderCache **ptr)
Close the Header Cache.
static const char * maildir_hcache_key(struct Email *e)
Get the header cache key for an Email.
void maildir_parse_flags(struct Email *e, const char *path)
Parse Maildir file flags.
Convenience wrapper for the library headers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
The envelope/body of an email.
void * edata
Driver-specific data.
bool old
Email is seen, but unread.
void(* edata_free)(void **ptr)
char * path
Path of Email (for local Mailboxes)
Wrapper for Email retrieved from the header cache.
uint32_t uidvalidity
IMAP-specific UIDVALIDITY.
struct Email * email
Retrieved email.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.