Merge branch 'master' into '941-store-correct-parent-id'

# Conflicts:
#   briar-core/src/test/java/org/briarproject/briar/blog/BlogManagerImplTest.java
This commit is contained in:
akwizgran
2017-05-12 09:34:24 +00:00
69 changed files with 564 additions and 387 deletions

View File

@@ -34,7 +34,7 @@ public interface BlogManager {
/**
* Returns true if a blog can be removed.
*/
boolean canBeRemoved(GroupId g) throws DbException;
boolean canBeRemoved(Blog b) throws DbException;
/**
* Removes and deletes a blog.

View File

@@ -7,6 +7,8 @@ import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.bramble.api.sync.Message;
import org.briarproject.bramble.api.sync.MessageId;
import javax.annotation.Nullable;
@NotNullByDefault
public interface MessageTracker {
@@ -38,6 +40,19 @@ public interface MessageTracker {
void trackMessage(Transaction txn, GroupId g, long timestamp, boolean read)
throws DbException;
/**
* Loads the stored message id for the respective group id or returns null
* if none is available.
*/
@Nullable
MessageId loadStoredMessageId(GroupId g) throws DbException;
/**
* Stores the message id for the respective group id. Exactly one message id
* can be stored for any group id at any time, older values are overwritten.
*/
void storeMessageId(GroupId g, MessageId m) throws DbException;
/**
* Marks a message as read or unread and updates the group count.
*/