2014-02-19 21:06:54 -08:00
|
|
|
package org.thoughtcrime.securesms.mms;
|
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
import org.thoughtcrime.securesms.attachments.Attachment;
|
2014-02-19 21:06:54 -08:00
|
|
|
import org.thoughtcrime.securesms.recipients.Recipients;
|
2015-05-18 15:16:27 -07:00
|
|
|
|
|
|
|
import java.util.List;
|
2014-02-19 21:06:54 -08:00
|
|
|
|
|
|
|
public class OutgoingMediaMessage {
|
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
private final Recipients recipients;
|
|
|
|
protected final String body;
|
|
|
|
protected final List<Attachment> attachments;
|
|
|
|
private final long sentTimeMillis;
|
|
|
|
private final int distributionType;
|
2014-02-19 21:06:54 -08:00
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
public OutgoingMediaMessage(Recipients recipients, String message,
|
|
|
|
List<Attachment> attachments, long sentTimeMillis,
|
|
|
|
int distributionType)
|
2014-02-19 21:06:54 -08:00
|
|
|
{
|
|
|
|
this.recipients = recipients;
|
2015-10-12 18:25:05 -07:00
|
|
|
this.body = message;
|
|
|
|
this.sentTimeMillis = sentTimeMillis;
|
2014-02-19 21:06:54 -08:00
|
|
|
this.distributionType = distributionType;
|
2015-10-12 18:25:05 -07:00
|
|
|
this.attachments = attachments;
|
2014-02-19 21:06:54 -08:00
|
|
|
}
|
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
public OutgoingMediaMessage(Recipients recipients, SlideDeck slideDeck, String message, long sentTimeMillis, int distributionType)
|
2014-02-19 21:06:54 -08:00
|
|
|
{
|
2015-10-12 18:25:05 -07:00
|
|
|
this(recipients, message, slideDeck.asAttachments(), sentTimeMillis, distributionType);
|
2015-05-18 15:16:27 -07:00
|
|
|
}
|
|
|
|
|
2014-02-19 21:06:54 -08:00
|
|
|
public OutgoingMediaMessage(OutgoingMediaMessage that) {
|
|
|
|
this.recipients = that.getRecipients();
|
|
|
|
this.body = that.body;
|
|
|
|
this.distributionType = that.distributionType;
|
2015-10-12 18:25:05 -07:00
|
|
|
this.attachments = that.attachments;
|
|
|
|
this.sentTimeMillis = that.sentTimeMillis;
|
2014-02-19 21:06:54 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
public Recipients getRecipients() {
|
|
|
|
return recipients;
|
|
|
|
}
|
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
public String getBody() {
|
2014-02-19 21:06:54 -08:00
|
|
|
return body;
|
|
|
|
}
|
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
public List<Attachment> getAttachments() {
|
|
|
|
return attachments;
|
|
|
|
}
|
|
|
|
|
2014-02-19 21:06:54 -08:00
|
|
|
public int getDistributionType() {
|
|
|
|
return distributionType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isSecure() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isGroup() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-10-12 18:25:05 -07:00
|
|
|
public long getSentTimeMillis() {
|
|
|
|
return sentTimeMillis;
|
2015-05-18 15:16:27 -07:00
|
|
|
}
|
|
|
|
|
2014-02-19 21:06:54 -08:00
|
|
|
}
|