summaryrefslogtreecommitdiffstats
path: root/src/imap/imap-sync.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:36:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:36:47 +0000
commit0441d265f2bb9da249c7abf333f0f771fadb4ab5 (patch)
tree3f3789daa2f6db22da6e55e92bee0062a7d613fe /src/imap/imap-sync.h
parentInitial commit. (diff)
downloaddovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.tar.xz
dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.zip
Adding upstream version 1:2.3.21+dfsg1.upstream/1%2.3.21+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/imap/imap-sync.h')
-rw-r--r--src/imap/imap-sync.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/imap/imap-sync.h b/src/imap/imap-sync.h
new file mode 100644
index 0000000..a1c5198
--- /dev/null
+++ b/src/imap/imap-sync.h
@@ -0,0 +1,25 @@
+#ifndef IMAP_SYNC_H
+#define IMAP_SYNC_H
+
+enum imap_sync_flags {
+ IMAP_SYNC_FLAG_SEND_UID = 0x01,
+ IMAP_SYNC_FLAG_SAFE = 0x02
+};
+
+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_delayed(struct client *client) ATTR_NOWARN_UNUSED_RESULT;
+
+#endif