maildir-uidlist.h revision 746a7ec64a09649ed3c96c88b97cdc370a7bbe2f
#ifndef MAILDIR_UIDLIST_H
#define MAILDIR_UIDLIST_H
#define MAILDIR_UIDLIST_NAME "dovecot-uidlist"
struct maildir_mailbox;
struct maildir_uidlist;
struct maildir_uidlist_sync_ctx;
enum maildir_uidlist_sync_flags {
MAILDIR_UIDLIST_SYNC_PARTIAL = 0x01,
};
enum maildir_uidlist_rec_flag {
MAILDIR_UIDLIST_REC_FLAG_NEW_DIR = 0x01,
MAILDIR_UIDLIST_REC_FLAG_MOVED = 0x02,
MAILDIR_UIDLIST_REC_FLAG_RECENT = 0x04,
};
enum maildir_uidlist_hdr_ext_key {
/* POP3 UIDL format unless overridden by records */
};
enum maildir_uidlist_rec_ext_key {
/* Virtual message size. If filename also contains ,W=<vsize> this
isn't written to uidlist. */
/* POP3 UIDL overriding the default format */
};
struct maildir_uidlist *
/* Returns -1 if error, 0 if file is broken or lost, 1 if ok. If nfs_flush=TRUE
and storage has NFS_FLUSH flag set, the NFS attribute cache is flushed to
make sure that we see the latest uidlist file. */
/* Returns uidlist record for given filename, or NULL if not found. */
const char *
enum maildir_uidlist_rec_flag *flags_r);
/* Returns extension's value or NULL if it doesn't exist. */
const char *
enum maildir_uidlist_rec_ext_key key);
const char *value);
/* If uidlist has changed, update it. This is mostly meant to be used with
maildir_uidlist_set_ext() */
/* Sync uidlist with what's actually on maildir. Returns same as
maildir_uidlist_lock(). */
struct maildir_uidlist_sync_ctx **sync_ctx_r);
/* Returns 1 = ok, -1 = error, 0 = new file and dovecot-uidlist is locked */
const char *filename);
const char *filename,
enum maildir_uidlist_rec_flag flags);
const char *filename);
const char *
const char *filename);
const char *
const char *filename);
const char *filename,
enum maildir_uidlist_rec_flag flags);
/* List all maildir files. */
struct maildir_uidlist_iter_ctx *
enum maildir_uidlist_rec_flag *flags_r,
const char **filename_r);
#endif