maildir-uidlist.h revision 8c9e48cd6de80da0fa32b9c0dee003472c9a7c0d
#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,
MAILDIR_UIDLIST_SYNC_KEEP_STATE = 0x02,
MAILDIR_UIDLIST_SYNC_FORCE = 0x04,
MAILDIR_UIDLIST_SYNC_TRYLOCK = 0x08,
};
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 {
/* Physical message size. If filename also contains ,S=<vsize> this
isn't written to uidlist. */
/* 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. */
/* Like maildir_uidlist_refresh(), but if uidlist isn't opened yet, try to
fill in the uidvalidity/nextuid from index file instead. */
/* Returns uidlist record for given filename, or NULL if not found. */
const char *
enum maildir_uidlist_rec_flag *flags_r);
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);
/* Update extended record. value=NULL removes the 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);
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