diff options
Diffstat (limited to 'src/java/com/libmailcore/MessageBuilder.java')
-rw-r--r-- | src/java/com/libmailcore/MessageBuilder.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/java/com/libmailcore/MessageBuilder.java b/src/java/com/libmailcore/MessageBuilder.java new file mode 100644 index 00000000..66539fc7 --- /dev/null +++ b/src/java/com/libmailcore/MessageBuilder.java @@ -0,0 +1,41 @@ +package com.libmailcore; + +import java.util.List; + +public class MessageBuilder extends AbstractMessage { + public MessageBuilder() + { + setupNative(); + } + + public native void setHTMLBody(String htmlBody); + public native String htmlBody(); + + public native void setTextBody(String textBody); + public native String textBody(); + + public native void setAttachments(List<Attachment> attachments); + public native List<AbstractPart> attachments(); + public native void addAttachment(Attachment attachment); + + public native void setRelatedAttachments(List<Attachment> attachments); + public native List<Attachment> relatedAttachments(); + public native void addRelatedAttachment(Attachment attachment); + + public native void setBoundaryPrefix(String boundaryPrefix); + public native String boundaryPrefix(); + + public native byte[] data(); + public native byte[] dataForEncryption(); + + public native String htmlRendering(HTMLRendererTemplateCallback callback); + public native String htmlBodyRendering(); + + public native String plainTextRendering(); + public native String plainTextBodyRendering(boolean stripWhitespace); + + public native byte[] openPGPSignedMessageDataWithSignatureData(byte[] signature); + public native byte[] openPGPEncryptedMessageDataWithEncryptedData(byte[] encryptedData); + + private native void setupNative(); +} |