#ifndef DSYNC_MAIL_H
#define DSYNC_MAIL_H
#include "mail-types.h"
struct md5_context;
struct mail;
struct mailbox;
struct dsync_mail {
/* either GUID="" or uid=0 */
const char *guid;
/* If non-NULL, we're syncing within the dsync process using ibc-pipe.
This mail can be used to mailbox_copy() the mail. */
/* Verify that this equals to input_mail->uid */
/* TRUE if the following fields aren't set, because minimal_fill=TRUE
parameter was used. */
bool minimal_fields;
const char *pop3_uidl;
unsigned int pop3_order;
/* Input stream containing the message text, or NULL if all instances
of the message were already expunged from this mailbox. */
};
struct dsync_mail_request {
/* either GUID=NULL or uid=0 */
const char *guid;
};
enum dsync_mail_change_type {
};
struct dsync_mail_change {
/* Message's GUID:
- for expunges either 128bit hex or NULL if unknown
- "" if backend doesn't support GUIDs */
const char *guid;
/* If GUID is "", this contains hash of the message header,
otherwise NULL */
const char *hdr_hash;
/* Message's current modseq (saves, flag changes) */
/* Message's current private modseq (for private flags in
shared mailboxes, otherwise 0) */
flags that exist now but haven't changed */
/* Remove all keywords before applying changes. This is used only with
old transaction logs, new ones never reset keywords (just explicitly
remove unwanted keywords) */
bool keywords_reset;
/* +add, -remove, =final, &add_and_final. */
/* Received timestamp for saves, if brain.sync_since/until_timestamp is set */
/* Mail's size for saves if brain.sync_max_size is set,
(uoff_t)-1 otherwise. */
};
struct mailbox_header_lookup_ctx *
const char *const *hashed_headers, const char **hdr_hash_r);
{
/* md5(\n) */
}
const char **error_field_r);
struct dsync_mail_change *dest_r);
#endif