transactional versions of addPendingContact, getPendingContacts, getConversationId and respondToIntroduction

This commit is contained in:
ialokim
2021-12-10 22:55:44 +01:00
committed by Sebastian Kürten
parent c340071469
commit 5b27eb354c
6 changed files with 73 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ package org.briarproject.briar.api.introduction;
import org.briarproject.bramble.api.contact.Contact;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.db.DbException;
import org.briarproject.bramble.api.db.Transaction;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.api.sync.ClientId;
import org.briarproject.briar.api.client.SessionId;
@@ -45,4 +46,10 @@ public interface IntroductionManager extends ConversationClient {
void respondToIntroduction(ContactId contactId, SessionId sessionId,
boolean accept) throws DbException;
/**
* Responds to an introduction.
*/
void respondToIntroduction(Transaction txn, ContactId contactId,
SessionId sessionId, boolean accept) throws DbException;
}

View File

@@ -67,6 +67,11 @@ public interface MessagingManager extends ConversationClient {
*/
GroupId getConversationId(ContactId c) throws DbException;
/**
* Returns the ID of the private conversation with the given contact.
*/
GroupId getConversationId(Transaction txn, ContactId c) throws DbException;
/**
* Returns the text of the private message with the given ID, or null if
* the private message has no text.