mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Add checkConnection() to MailboxManager
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package org.briarproject.bramble.api.mailbox;
|
||||
|
||||
import org.briarproject.bramble.api.Consumer;
|
||||
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;
|
||||
|
||||
@@ -32,4 +34,15 @@ public interface MailboxManager {
|
||||
*/
|
||||
MailboxPairingTask startPairingTask(String qrCodePayload);
|
||||
|
||||
/**
|
||||
* Can be used by the UI to test the mailbox connection.
|
||||
* After the connection has been made, the given {@param connectionCallback}
|
||||
* will be called with true (success) or false (error).
|
||||
* In addition, a {@link OwnMailboxConnectionStatusEvent} might be broadcast
|
||||
* with a new {@link MailboxStatus}.
|
||||
* <p>
|
||||
* Note that the callback will be made on the {@link IoExecutor}.
|
||||
*/
|
||||
void checkConnection(Consumer<Boolean> connectionCallback);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user