view src/imap/imap-sync.h @ 9191:b340ecb24469 HEAD

Fix VPATH build of RQUOTA support. Some rpcgen derive #include "..." paths from the infile argument. This will be off for VPATH builds, as the generated rquota_xdr.c code will look in $(srcdir), but we'll generate the rquota.h file in $(builddir). Play safe and copy rquota.x to $(builddir) first. This fixes the build on openSUSE 11.1.
author Matthias Andree <matthias.andree@gmx.de>
date Tue, 07 Jul 2009 21:01:36 +0200
parents ef7c0c3b1976
children
line wrap: on
line source

#ifndef IMAP_SYNC_H
#define IMAP_SYNC_H

enum imap_sync_flags {
	IMAP_SYNC_FLAG_SEND_UID	= 0x01,
	IMAP_SYNC_FLAG_SAFE	= 0x02
};

typedef bool imap_sync_callback_t(struct client_command_context *cmd);

struct client;

struct imap_sync_context *
imap_sync_init(struct client *client, struct mailbox *box,
	       enum imap_sync_flags imap_flags, enum mailbox_sync_flags flags);
int imap_sync_deinit(struct imap_sync_context *ctx,
		     struct client_command_context *sync_cmd);
int imap_sync_more(struct imap_sync_context *ctx);

/* Returns TRUE if syncing would be allowed currently. */
bool imap_sync_is_allowed(struct client *client);

bool cmd_sync(struct client_command_context *cmd, enum mailbox_sync_flags flags,
	      enum imap_sync_flags imap_flags, const char *tagline);
bool cmd_sync_callback(struct client_command_context *cmd,
		       enum mailbox_sync_flags flags,
		       enum imap_sync_flags imap_flags,
		       imap_sync_callback_t *callback);
bool cmd_sync_delayed(struct client *client);

#endif