diff --git a/Mailbox-Properties-Client.md b/Mailbox-Properties-Client.md new file mode 100644 index 0000000..3cae87d --- /dev/null +++ b/Mailbox-Properties-Client.md @@ -0,0 +1,30 @@ + +# WORK IN PROGRESS + +The mailbox properties client is a [BSP client](https://code.briarproject.org/briar/briar-spec/blob/master/protocols/BSP.md) that synchronises mailbox properties between pairs of devices. Mailbox properties describe how to connect to a mailbox associated with a device. + +### Identifier + +The client's identifier is `org.briarproject.bramble.mailbox`. The major version is 0. + +### Groups + +The client uses a separate BSP group for communicating with each contact. The [group descriptor](https://code.briarproject.org/briar/briar-spec/blob/master/protocols/BSP.md#23-groups) is a [BDF list](https://code.briarproject.org/briar/briar-spec/blob/master/BDF.md) containing the unique IDs of the contacts' identities, sorted in ascending order as byte strings. + +### Message types + +**UPDATE** - The message body is a BDF list with two elements: `version` (int), and `properties` (dictionary). `version` is incremented whenever the properties change. The keys and values of the `properties` dictionary are strings. Typical keys in this dictionary are: *onionAddress*, *token*, *inboxId*, *outboxId*. An empty dictionary would mean for the receiver that there is no mailbox available for use. + +### Validity policy + +* An update is valid if it is well-formed. + +### Storage policy + +* In the groups shared with contacts: + * The local message with the highest version is stored. + * The remote message with the highest version is stored. + +### Sharing policy + +* In the groups shared with contacts, all local messages are shared.