mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 06:09:55 +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()
|
Collection<Pair<PendingContact, PendingContactState>> getPendingContacts()
|
||||||
throws DbException;
|
throws DbException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the state of the given {@link PendingContact}.
|
||||||
|
*/
|
||||||
|
PendingContactState getPendingContactState(PendingContactId p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a {@link PendingContact}.
|
* Removes a {@link PendingContact}.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -172,6 +172,11 @@ class ContactManagerImpl implements ContactManager, EventListener {
|
|||||||
return pairs;
|
return pairs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PendingContactState getPendingContactState(PendingContactId p) {
|
||||||
|
return states.get(p);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removePendingContact(PendingContactId p) throws DbException {
|
public void removePendingContact(PendingContactId p) throws DbException {
|
||||||
db.transaction(false, txn -> db.removePendingContact(txn, p));
|
db.transaction(false, txn -> db.removePendingContact(txn, p));
|
||||||
|
|||||||
Reference in New Issue
Block a user