Add method for unpairing to MailboxManager

This commit is contained in:
Torsten Grote
2022-04-20 11:49:05 -03:00
parent 4b7ee62190
commit fa3db0f888
4 changed files with 34 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package org.briarproject.bramble.api.mailbox;
import org.briarproject.bramble.api.db.DbException;
import org.briarproject.bramble.api.db.Transaction;
import org.briarproject.bramble.api.lifecycle.IoExecutor;
import javax.annotation.Nullable;
@@ -41,4 +42,10 @@ public interface MailboxManager {
*/
boolean checkConnection();
/**
* Unpairs the owner's mailbox and tries to wipe it.
* As this makes a network call, it should be run on the {@link IoExecutor}.
*/
@IoExecutor
void unPair() throws DbException;
}

View File

@@ -26,6 +26,8 @@ public interface MailboxSettingsManager {
void setOwnMailboxProperties(Transaction txn, MailboxProperties p)
throws DbException;
void removeOwnMailboxProperties(Transaction txn) throws DbException;
MailboxStatus getOwnMailboxStatus(Transaction txn) throws DbException;
void recordSuccessfulConnection(Transaction txn, long now)