dsync-brain.h revision ec66a68735096e81df73176231b49179222ad9ce
#ifndef DSYNC_BRAIN_H
#define DSYNC_BRAIN_H
struct mail_namespace;
struct mail_user;
struct dsync_ibc;
enum dsync_brain_flags {
DSYNC_BRAIN_FLAG_BACKUP_SEND = 0x04,
DSYNC_BRAIN_FLAG_BACKUP_RECV = 0x08,
DSYNC_BRAIN_FLAG_DEBUG = 0x10,
};
enum dsync_brain_sync_type {
/* Go through all mailboxes to make sure everything is synced */
/* Go through all mailboxes that have changed (based on UIDVALIDITY,
UIDNEXT, HIGHESTMODSEQ). If both sides have had equal amount of
changes in some mailbox, it may get incorrectly skipped. */
/* Use saved state to find out what has changed. */
};
struct dsync_brain *
struct mail_namespace *sync_ns,
enum dsync_brain_flags flags,
const char *state);
struct dsync_brain *
/* Returns 0 if everything was successful, -1 if syncing failed in some way */
/* Returns TRUE if brain needs to run more, FALSE if it's finished.
changed_r is TRUE if anything happened during this run. */
/* Returns TRUE if brain has failed, and there's no point in continuing. */
/* Returns the current sync state string, which can be given as parameter to
dsync_brain_master_init() to quickly sync only the new changes. */
#endif