Create PrivateGroupManager Facade and stub implementation

This commit is contained in:
Torsten Grote
2016-09-28 16:54:28 -03:00
parent 8b50cb1461
commit 6ece398a21
38 changed files with 691 additions and 146 deletions

View File

@@ -1,45 +0,0 @@
package org.briarproject.api.messaging;
import org.briarproject.api.sync.MessageId;
public abstract class BaseMessage {
private final MessageId id;
private final long timestamp;
private final boolean local, read, sent, seen;
public BaseMessage(MessageId id, long timestamp, boolean local,
boolean read, boolean sent, boolean seen) {
this.id = id;
this.timestamp = timestamp;
this.local = local;
this.read = read;
this.sent = sent;
this.seen = seen;
}
public MessageId getId() {
return id;
}
public long getTimestamp() {
return timestamp;
}
public boolean isLocal() {
return local;
}
public boolean isRead() {
return read;
}
public boolean isSent() {
return sent;
}
public boolean isSeen() {
return seen;
}
}

View File

@@ -1,30 +1,23 @@
package org.briarproject.api.messaging;
import org.briarproject.api.clients.BaseMessage;
import org.briarproject.api.sync.Message;
import org.briarproject.api.sync.MessageId;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class PrivateMessage {
public class PrivateMessage extends BaseMessage {
private final Message message;
private final MessageId parent;
private final String contentType;
public PrivateMessage(Message message, MessageId parent,
String contentType) {
this.message = message;
this.parent = parent;
public PrivateMessage(@NotNull Message message, @Nullable MessageId parent,
@NotNull String contentType) {
super(message, parent);
this.contentType = contentType;
}
public Message getMessage() {
return message;
}
public MessageId getParent() {
return parent;
}
public String getContentType() {
return contentType;
}
}

View File

@@ -1,8 +1,9 @@
package org.briarproject.api.messaging;
import org.briarproject.api.clients.BaseMessageHeader;
import org.briarproject.api.sync.MessageId;
public class PrivateMessageHeader extends BaseMessage {
public class PrivateMessageHeader extends BaseMessageHeader {
private final String contentType;