mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-02 13:17:46 +00:00
61 lines
1.5 KiB
Java
61 lines
1.5 KiB
Java
|
package org.thoughtcrime.securesms.mms;
|
||
|
|
||
|
import android.content.Context;
|
||
|
|
||
|
import org.thoughtcrime.securesms.recipients.Recipients;
|
||
|
import org.whispersystems.textsecure.util.Util;
|
||
|
|
||
|
import ws.com.google.android.mms.pdu.PduBody;
|
||
|
|
||
|
public class OutgoingMediaMessage {
|
||
|
|
||
|
private final Recipients recipients;
|
||
|
protected final PduBody body;
|
||
|
private final int distributionType;
|
||
|
|
||
|
public OutgoingMediaMessage(Context context, Recipients recipients, PduBody body,
|
||
|
String message, int distributionType)
|
||
|
{
|
||
|
this.recipients = recipients;
|
||
|
this.body = body;
|
||
|
this.distributionType = distributionType;
|
||
|
|
||
|
if (!Util.isEmpty(message)) {
|
||
|
this.body.addPart(new TextSlide(context, message).getPart());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public OutgoingMediaMessage(Context context, Recipients recipients, SlideDeck slideDeck,
|
||
|
String message, int distributionType)
|
||
|
{
|
||
|
this(context, recipients, slideDeck.toPduBody(), message, distributionType);
|
||
|
}
|
||
|
|
||
|
public OutgoingMediaMessage(OutgoingMediaMessage that) {
|
||
|
this.recipients = that.getRecipients();
|
||
|
this.body = that.body;
|
||
|
this.distributionType = that.distributionType;
|
||
|
}
|
||
|
|
||
|
public Recipients getRecipients() {
|
||
|
return recipients;
|
||
|
}
|
||
|
|
||
|
public PduBody getPduBody() {
|
||
|
return body;
|
||
|
}
|
||
|
|
||
|
public int getDistributionType() {
|
||
|
return distributionType;
|
||
|
}
|
||
|
|
||
|
public boolean isSecure() {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public boolean isGroup() {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
}
|