Facade for private message headers. #173

This commit is contained in:
akwizgran
2015-12-17 16:04:45 +00:00
parent 87689855da
commit f899bc0c38
9 changed files with 147 additions and 50 deletions

View File

@@ -4,7 +4,6 @@ import org.briarproject.api.contact.ContactId;
import org.briarproject.api.db.DbException;
import org.briarproject.api.sync.GroupId;
import org.briarproject.api.sync.Message;
import org.briarproject.api.sync.MessageHeader;
import org.briarproject.api.sync.MessageId;
import java.util.Collection;
@@ -27,7 +26,7 @@ public interface MessagingManager {
* Returns the headers of all messages in the private conversation with the
* given contact, or null if no private conversation ID has been set.
*/
Collection<MessageHeader> getMessageHeaders(ContactId c)
Collection<PrivateMessageHeader> getMessageHeaders(ContactId c)
throws DbException;
/** Returns the body of the private message with the given ID. */

View File

@@ -0,0 +1,23 @@
package org.briarproject.api.messaging;
import org.briarproject.api.identity.Author;
import org.briarproject.api.sync.MessageId;
public interface PrivateMessageHeader {
enum Status { STORED, SENT, DELIVERED }
MessageId getId();
Author getAuthor();
String getContentType();
long getTimestamp();
boolean isLocal();
boolean isRead();
Status getStatus();
}