mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Prepare private message retrieval through ConversationManager
This commit is contained in:
@@ -51,7 +51,8 @@ public interface IntroductionManager extends ConversationClient {
|
||||
/**
|
||||
* Returns all introduction messages for the given contact.
|
||||
*/
|
||||
Collection<PrivateMessageHeader> getIntroductionMessages(ContactId contactId)
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId contactId)
|
||||
throws DbException;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.bramble.api.sync.MessageId;
|
||||
import org.briarproject.briar.api.client.MessageTracker.GroupCount;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@NotNullByDefault
|
||||
public interface ConversationManager {
|
||||
|
||||
@@ -19,6 +21,15 @@ public interface ConversationManager {
|
||||
*/
|
||||
void registerConversationClient(ConversationClient client);
|
||||
|
||||
/**
|
||||
* 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)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the unified group count for all private conversation messages.
|
||||
*/
|
||||
@@ -29,6 +40,9 @@ public interface ConversationManager {
|
||||
|
||||
Group getContactGroup(Contact c);
|
||||
|
||||
Collection<PrivateMessageHeader> getMessages(Transaction txn,
|
||||
ContactId contactId) throws DbException;
|
||||
|
||||
GroupCount getGroupCount(Transaction txn, ContactId c)
|
||||
throws DbException;
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ public interface MessagingManager extends ConversationClient {
|
||||
/**
|
||||
* Returns the headers of all messages in the given private conversation.
|
||||
*/
|
||||
Collection<PrivateMessageHeader> getMessageHeaders(ContactId c)
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -77,7 +77,8 @@ public interface GroupInvitationManager extends ConversationClient {
|
||||
* Returns all private group invitation messages related to the given
|
||||
* contact.
|
||||
*/
|
||||
Collection<PrivateMessageHeader> getInvitationMessages(ContactId c)
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,8 +40,9 @@ public interface SharingManager<S extends Shareable>
|
||||
* Returns all group sharing messages sent by the Contact
|
||||
* identified by contactId.
|
||||
*/
|
||||
Collection<PrivateMessageHeader> getInvitationMessages(
|
||||
ContactId contactId) throws DbException;
|
||||
@Deprecated
|
||||
Collection<PrivateMessageHeader> getMessages(ContactId contactId)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns all invitations to groups.
|
||||
|
||||
Reference in New Issue
Block a user