mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Use ConversationManager to retrieve messages
This removes the public method for retrieving messages from individual conversation clients and just leaves methods that require a transaction to be used by the ConversationManager only.
This commit is contained in:
@@ -7,9 +7,6 @@ import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.sync.ClientId;
|
||||
import org.briarproject.briar.api.client.SessionId;
|
||||
import org.briarproject.briar.api.messaging.ConversationManager.ConversationClient;
|
||||
import org.briarproject.briar.api.messaging.PrivateMessageHeader;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -48,11 +45,4 @@ public interface IntroductionManager extends ConversationClient {
|
||||
void respondToIntroduction(ContactId contactId, SessionId sessionId,
|
||||
long timestamp, boolean accept) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns all introduction messages for the given contact.
|
||||
*/
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId contactId)
|
||||
throws DbException;
|
||||
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ public interface ConversationManager {
|
||||
void registerConversationClient(ConversationClient client);
|
||||
|
||||
/**
|
||||
* Returns (the headers) of all messages in the given private conversation.
|
||||
* Returns the headers of all messages in the given private conversation.
|
||||
*
|
||||
* Only {@link MessagingManager} returns only headers.
|
||||
* The others also return the message body.
|
||||
*/
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId c)
|
||||
Collection<PrivateMessageHeader> getMessageHeaders(ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ public interface ConversationManager {
|
||||
|
||||
Group getContactGroup(Contact c);
|
||||
|
||||
Collection<PrivateMessageHeader> getMessages(Transaction txn,
|
||||
Collection<PrivateMessageHeader> getMessageHeaders(Transaction txn,
|
||||
ContactId contactId) throws DbException;
|
||||
|
||||
GroupCount getGroupCount(Transaction txn, ContactId c)
|
||||
|
||||
@@ -8,8 +8,6 @@ import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.bramble.api.sync.MessageId;
|
||||
import org.briarproject.briar.api.messaging.ConversationManager.ConversationClient;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@NotNullByDefault
|
||||
public interface MessagingManager extends ConversationClient {
|
||||
|
||||
@@ -43,13 +41,6 @@ public interface MessagingManager extends ConversationClient {
|
||||
*/
|
||||
GroupId getConversationId(ContactId c) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the headers of all messages in the given private conversation.
|
||||
*/
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the body of the private message with the given ID.
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.briar.api.client.ProtocolStateException;
|
||||
import org.briarproject.briar.api.client.SessionId;
|
||||
import org.briarproject.briar.api.messaging.ConversationManager.ConversationClient;
|
||||
import org.briarproject.briar.api.messaging.PrivateMessageHeader;
|
||||
import org.briarproject.briar.api.privategroup.PrivateGroup;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -73,14 +72,6 @@ public interface GroupInvitationManager extends ConversationClient {
|
||||
*/
|
||||
void revealRelationship(ContactId c, GroupId g) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns all private group invitation messages related to the given
|
||||
* contact.
|
||||
*/
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns all private groups to which the user has been invited.
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.briar.api.client.SessionId;
|
||||
import org.briarproject.briar.api.messaging.ConversationManager.ConversationClient;
|
||||
import org.briarproject.briar.api.messaging.PrivateMessageHeader;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -36,14 +35,6 @@ public interface SharingManager<S extends Shareable>
|
||||
void respondToInvitation(ContactId c, SessionId id, boolean accept)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns all group sharing messages sent by the Contact
|
||||
* identified by contactId.
|
||||
*/
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId contactId)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns all invitations to groups.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user