mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
[bramble] add method for getting pending contact state
This commit is contained in:
@@ -141,6 +141,11 @@ public interface ContactManager {
|
||||
Collection<Pair<PendingContact, PendingContactState>> getPendingContacts()
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the state of the given {@link PendingContact}.
|
||||
*/
|
||||
PendingContactState getPendingContactState(PendingContactId p);
|
||||
|
||||
/**
|
||||
* Removes a {@link PendingContact}.
|
||||
*/
|
||||
|
||||
@@ -172,6 +172,11 @@ class ContactManagerImpl implements ContactManager, EventListener {
|
||||
return pairs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PendingContactState getPendingContactState(PendingContactId p) {
|
||||
return states.get(p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePendingContact(PendingContactId p) throws DbException {
|
||||
db.transaction(false, txn -> db.removePendingContact(txn, p));
|
||||
|
||||
Reference in New Issue
Block a user