Signal-Android/src/org/thoughtcrime/securesms/mms/OutgoingMediaMessage.java

69 lines
1.8 KiB
Java
Raw Normal View History

package org.thoughtcrime.securesms.mms;
import org.thoughtcrime.securesms.attachments.Attachment;
import org.thoughtcrime.securesms.recipients.Recipients;
import java.util.List;
public class OutgoingMediaMessage {
private final Recipients recipients;
protected final String body;
protected final List<Attachment> attachments;
private final long sentTimeMillis;
private final int distributionType;
public OutgoingMediaMessage(Recipients recipients, String message,
List<Attachment> attachments, long sentTimeMillis,
int distributionType)
{
this.recipients = recipients;
this.body = message;
this.sentTimeMillis = sentTimeMillis;
this.distributionType = distributionType;
this.attachments = attachments;
}
public OutgoingMediaMessage(Recipients recipients, SlideDeck slideDeck, String message, long sentTimeMillis, int distributionType)
{
this(recipients, message, slideDeck.asAttachments(), sentTimeMillis, distributionType);
}
public OutgoingMediaMessage(OutgoingMediaMessage that) {
this.recipients = that.getRecipients();
this.body = that.body;
this.distributionType = that.distributionType;
this.attachments = that.attachments;
this.sentTimeMillis = that.sentTimeMillis;
}
public Recipients getRecipients() {
return recipients;
}
public String getBody() {
return body;
}
public List<Attachment> getAttachments() {
return attachments;
}
public int getDistributionType() {
return distributionType;
}
public boolean isSecure() {
return false;
}
public boolean isGroup() {
return false;
}
public long getSentTimeMillis() {
return sentTimeMillis;
}
}