Mercurial > dovecot > core-2.2
annotate src/doveadm/dsync/dsync-mailbox.h @ 22494:1f8b784712e1
dsync: Ignore missing remote mailbox when doing unidirectional sync
If there are some folders on remote system that
are being ignored by remote brain, do not error out.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 05 Sep 2017 10:43:46 +0300 |
parents | 8a7ecddca4ad |
children | 20415dd0b85a |
rev | line source |
---|---|
14584 | 1 #ifndef DSYNC_MAILBOX_H |
2 #define DSYNC_MAILBOX_H | |
3 | |
4 #include "mail-storage.h" | |
5 | |
6 /* Mailbox that is going to be synced. Its name was already sent in the | |
7 mailbox tree. */ | |
8 struct dsync_mailbox { | |
9 guid_128_t mailbox_guid; | |
10 bool mailbox_lost; | |
22494
1f8b784712e1
dsync: Ignore missing remote mailbox when doing unidirectional sync
Aki Tuomi <aki.tuomi@dovecot.fi>
parents:
16977
diff
changeset
|
11 bool mailbox_ignore; |
16977
8a7ecddca4ad
dsync: Support syncing storages with 128bit GUIDs <-> string GUIDs.
Timo Sirainen <tss@iki.fi>
parents:
16376
diff
changeset
|
12 bool have_guids, have_save_guids, have_only_guid128; |
14584 | 13 |
14 uint32_t uid_validity, uid_next, messages_count, first_recent_uid; | |
15496
5d90e2aa1ba8
dsync: Use private modseqs to support syncing private flags in shared mailboxes.
Timo Sirainen <tss@iki.fi>
parents:
14584
diff
changeset
|
15 uint64_t highest_modseq, highest_pvt_modseq; |
14584 | 16 ARRAY_TYPE(mailbox_cache_field) cache_fields; |
17 }; | |
18 | |
16025
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
19 struct dsync_mailbox_attribute { |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
20 enum mail_attribute_type type; |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
21 const char *key; |
16052
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
22 /* if both values are NULL = not looked up yet / deleted */ |
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
23 const char *value; |
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
24 struct istream *value_stream; |
16025
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
25 |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
26 time_t last_change; /* 0 = unknown */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
27 uint64_t modseq; /* 0 = unknown */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
28 |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
29 bool deleted; /* attribute is known to have been deleted */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
30 bool exported; /* internally used by exporting */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
31 }; |
16052
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
32 #define DSYNC_ATTR_HAS_VALUE(attr) \ |
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
33 ((attr)->value != NULL || (attr)->value_stream != NULL) |
16025
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
34 |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
35 void dsync_mailbox_attribute_dup(pool_t pool, |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
36 const struct dsync_mailbox_attribute *src, |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
37 struct dsync_mailbox_attribute *dest_r); |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
38 |
14584 | 39 #endif |