Store message count, unread count and timestamp of latest message

in group metadata to be able to speed up group listings.

Closes #584, #586, #585
This commit is contained in:
Torsten Grote
2016-10-04 13:37:29 -03:00
parent 3fa84ec7a8
commit a727a0817e
25 changed files with 421 additions and 141 deletions

View File

@@ -1,5 +1,6 @@
package org.briarproject.api.messaging;
import org.briarproject.api.clients.MessageTracker;
import org.briarproject.api.contact.ContactId;
import org.briarproject.api.db.DbException;
import org.briarproject.api.sync.ClientId;
@@ -8,7 +9,7 @@ import org.briarproject.api.sync.MessageId;
import java.util.Collection;
public interface MessagingManager {
public interface MessagingManager extends MessageTracker {
/** Returns the unique ID of the messaging client. */
ClientId getClientId();
@@ -31,6 +32,4 @@ public interface MessagingManager {
/** Returns the body of the private message with the given ID. */
byte[] getMessageBody(MessageId m) throws DbException;
/** Marks a private message as read or unread. */
void setReadFlag(MessageId m, boolean read) throws DbException;
}