mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Return a contact, encapsulate contact exchange crypto.
This commit is contained in:
@@ -3,7 +3,6 @@ package org.briarproject.bramble.api.contact;
|
||||
import org.briarproject.bramble.api.crypto.SecretKey;
|
||||
import org.briarproject.bramble.api.db.ContactExistsException;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.identity.Author;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.plugin.TransportId;
|
||||
import org.briarproject.bramble.api.plugin.duplex.DuplexTransportConnection;
|
||||
@@ -16,9 +15,10 @@ public interface ContactExchangeManager {
|
||||
/**
|
||||
* Exchanges contact information with a remote peer.
|
||||
*
|
||||
* @return The contact's pseudonym
|
||||
* @param alice Whether the local peer takes the role of Alice
|
||||
* @return The newly added contact
|
||||
* @throws ContactExistsException If the contact already exists
|
||||
*/
|
||||
Author exchangeContacts(TransportId t, DuplexTransportConnection conn,
|
||||
Contact exchangeContacts(TransportId t, DuplexTransportConnection conn,
|
||||
SecretKey masterKey, boolean alice) throws IOException, DbException;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,11 @@ public interface ContactManager {
|
||||
*/
|
||||
Contact getContact(ContactId c) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the contact with the given ID.
|
||||
*/
|
||||
Contact getContact(Transaction txn, ContactId c) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the contact with the given remoteAuthorId
|
||||
* that was added by the LocalAuthor with the given localAuthorId
|
||||
|
||||
Reference in New Issue
Block a user