Mercurial > dovecot > core-2.2
annotate src/doveadm/dsync/dsync-mailbox.h @ 16977:8a7ecddca4ad
dsync: Support syncing storages with 128bit GUIDs <-> string GUIDs.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 17 Nov 2013 17:59:05 +0200 |
parents | c6fee677172a |
children | 1f8b784712e1 |
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; | |
16977
8a7ecddca4ad
dsync: Support syncing storages with 128bit GUIDs <-> string GUIDs.
Timo Sirainen <tss@iki.fi>
parents:
16376
diff
changeset
|
11 bool have_guids, have_save_guids, have_only_guid128; |
14584 | 12 |
13 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
|
14 uint64_t highest_modseq, highest_pvt_modseq; |
14584 | 15 ARRAY_TYPE(mailbox_cache_field) cache_fields; |
16 }; | |
17 | |
16025
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
18 struct dsync_mailbox_attribute { |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
19 enum mail_attribute_type type; |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
20 const char *key; |
16052
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
21 /* 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
|
22 const char *value; |
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
23 struct istream *value_stream; |
16025
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
24 |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
25 time_t last_change; /* 0 = unknown */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
26 uint64_t modseq; /* 0 = unknown */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
27 |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
28 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
|
29 bool exported; /* internally used by exporting */ |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
30 }; |
16052
0e5a359b7b7f
lib-storage: Mailbox attributes can now be accessed via istreams.
Timo Sirainen <tss@iki.fi>
parents:
16025
diff
changeset
|
31 #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
|
32 ((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
|
33 |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
34 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
|
35 const struct dsync_mailbox_attribute *src, |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
36 struct dsync_mailbox_attribute *dest_r); |
c6082de4bf5b
dsync: Added support for syncing mailbox attributes.
Timo Sirainen <tss@iki.fi>
parents:
15750
diff
changeset
|
37 |
14584 | 38 #endif |