2015-01-14 03:56:57 -05:00
|
|
|
package com.fsck.k9.mailstore;
|
|
|
|
|
|
|
|
|
2015-01-28 05:30:29 -05:00
|
|
|
import android.app.PendingIntent;
|
|
|
|
|
2015-01-27 06:55:47 -05:00
|
|
|
import java.util.ArrayList;
|
2015-01-14 03:56:57 -05:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import com.fsck.k9.mail.Message;
|
2015-01-27 06:55:47 -05:00
|
|
|
import org.openintents.openpgp.OpenPgpSignatureResult;
|
2015-01-14 03:56:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
public class MessageViewInfo {
|
2015-01-27 06:55:47 -05:00
|
|
|
|
2015-01-14 03:56:57 -05:00
|
|
|
public final Message message;
|
2015-01-28 08:35:18 -05:00
|
|
|
public final List<MessageViewContainer> containers;
|
2015-01-14 03:56:57 -05:00
|
|
|
|
2015-01-27 06:55:47 -05:00
|
|
|
@Deprecated
|
2015-01-15 05:19:32 -05:00
|
|
|
public MessageViewInfo(String text, List<AttachmentViewInfo> attachments, Message message) {
|
2015-01-28 08:35:18 -05:00
|
|
|
containers = new ArrayList<MessageViewContainer>();
|
2015-01-27 06:55:47 -05:00
|
|
|
containers.add(new MessageViewContainer(text, attachments));
|
2015-01-14 03:56:57 -05:00
|
|
|
this.message = message;
|
|
|
|
}
|
2015-01-27 06:55:47 -05:00
|
|
|
|
2015-01-28 08:35:18 -05:00
|
|
|
public MessageViewInfo(List<MessageViewContainer> containers, Message message) {
|
|
|
|
this.containers = containers;
|
|
|
|
this.message = message;
|
|
|
|
}
|
|
|
|
|
2015-01-27 06:55:47 -05:00
|
|
|
public static class MessageViewContainer {
|
|
|
|
|
|
|
|
final public String text;
|
|
|
|
final public List<AttachmentViewInfo> attachments;
|
2015-01-28 05:30:29 -05:00
|
|
|
final public boolean encrypted;
|
2015-01-27 06:55:47 -05:00
|
|
|
final public OpenPgpSignatureResult signatureResult;
|
2015-01-28 05:30:29 -05:00
|
|
|
final public PendingIntent pgpPendingIntent;
|
2015-01-27 06:55:47 -05:00
|
|
|
|
|
|
|
MessageViewContainer(String text, List<AttachmentViewInfo> attachments) {
|
|
|
|
this.text = text;
|
|
|
|
this.attachments = attachments;
|
|
|
|
this.signatureResult = null;
|
2015-01-28 05:30:29 -05:00
|
|
|
this.encrypted = false;
|
|
|
|
this.pgpPendingIntent = null;
|
2015-01-27 06:55:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
MessageViewContainer(String text, List<AttachmentViewInfo> attachments,
|
2015-01-28 05:30:29 -05:00
|
|
|
OpenPgpSignatureResult signatureResult, boolean encrypted,
|
|
|
|
PendingIntent pgpPendingIntent) {
|
2015-01-27 06:55:47 -05:00
|
|
|
this.text = text;
|
|
|
|
this.attachments = attachments;
|
|
|
|
this.signatureResult = signatureResult;
|
2015-01-28 05:30:29 -05:00
|
|
|
this.encrypted = encrypted;
|
|
|
|
this.pgpPendingIntent = pgpPendingIntent;
|
2015-01-27 06:55:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-01-14 03:56:57 -05:00
|
|
|
}
|