mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Separate the sync layer from its clients. #112
This commit is contained in:
38
briar-api/src/org/briarproject/api/sync/MessageStatus.java
Normal file
38
briar-api/src/org/briarproject/api/sync/MessageStatus.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.contact.ContactId;
|
||||
|
||||
public class MessageStatus {
|
||||
|
||||
private final MessageId messageId;
|
||||
private final ContactId contactId;
|
||||
private final boolean sent, seen;
|
||||
|
||||
public MessageStatus(MessageId messageId, ContactId contactId,
|
||||
boolean sent, boolean seen) {
|
||||
this.messageId = messageId;
|
||||
this.contactId = contactId;
|
||||
this.sent = sent;
|
||||
this.seen = seen;
|
||||
}
|
||||
|
||||
/** Returns the ID of the message. */
|
||||
public MessageId getMessageId() {
|
||||
return messageId;
|
||||
}
|
||||
|
||||
/** Returns the ID of the contact. */
|
||||
public ContactId getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
|
||||
/** Returns true if the message has been sent to the contact. */
|
||||
public boolean isSent() {
|
||||
return sent;
|
||||
}
|
||||
|
||||
/** Returns true if the message has been seen by the contact. */
|
||||
public boolean isSeen() {
|
||||
return seen;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user