mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Create PrivateGroupManager Facade and stub implementation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user