When our mailbox's API versions change, send them to contacts.

This commit is contained in:
akwizgran
2022-08-12 16:38:15 +01:00
parent 15d29f6189
commit 9990fb3b8f
6 changed files with 277 additions and 29 deletions

View File

@@ -46,7 +46,7 @@ public interface MailboxSettingsManager {
interface MailboxHook {
/**
* Called when Briar is paired with a mailbox
* Called when Briar is paired with a mailbox.
*
* @param txn A read-write transaction
*/
@@ -54,10 +54,18 @@ public interface MailboxSettingsManager {
throws DbException;
/**
* Called when the mailbox is unpaired
* Called when the mailbox is unpaired.
*
* @param txn A read-write transaction
*/
void mailboxUnpaired(Transaction txn) throws DbException;
/**
* Called when we receive our mailbox's server-supported API versions.
*
* @param txn A read-write transaction
*/
void serverSupportedVersionsReceived(Transaction txn,
List<MailboxVersion> serverSupports) throws DbException;
}
}

View File

@@ -79,6 +79,12 @@ public interface MailboxUpdateManager {
*/
String GROUP_KEY_SENT_CLIENT_SUPPORTS = "sentClientSupports";
/**
* Key in the client's local group for storing the serverSupports list that
* was last sent out, if any.
*/
String GROUP_KEY_SENT_SERVER_SUPPORTS = "sentServerSupports";
/**
* Returns the latest {@link MailboxUpdate} sent to the given contact.
* <p>