From ba9931ae0bf4e3e2ef72e8c242d280c8762d5cd1 Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Fri, 27 Nov 2015 21:40:25 -0800 Subject: Fixed #1195: added mimeType() method in Java API --- src/java/com/libmailcore/AbstractPart.java | 5 +++++ src/java/native/com_libmailcore_AbstractPart.cpp | 1 + 2 files changed, 6 insertions(+) (limited to 'src/java') diff --git a/src/java/com/libmailcore/AbstractPart.java b/src/java/com/libmailcore/AbstractPart.java index 60a325bc..4e100423 100644 --- a/src/java/com/libmailcore/AbstractPart.java +++ b/src/java/com/libmailcore/AbstractPart.java @@ -20,6 +20,11 @@ public class AbstractPart extends NativeObject { /** Sets the filename of the attachment. */ public native void setFilename(String filename); + /** Returns the mime type of the attachment. */ + public native String mimeType(); + /** Sets the charset encoding of the attachment. */ + public native void setMimeType(String mimeType); + /** Returns the charset encoding of the attachment. */ public native String charset(); /** Sets the charset encoding of the attachment. */ diff --git a/src/java/native/com_libmailcore_AbstractPart.cpp b/src/java/native/com_libmailcore_AbstractPart.cpp index 8d97296b..8eb9a16c 100644 --- a/src/java/native/com_libmailcore_AbstractPart.cpp +++ b/src/java/native/com_libmailcore_AbstractPart.cpp @@ -11,6 +11,7 @@ using namespace mailcore; MC_JAVA_SYNTHESIZE_SCALAR(jint, PartType, setPartType, partType) MC_JAVA_SYNTHESIZE_STRING(setFilename, filename) +MC_JAVA_SYNTHESIZE_STRING(setMimeType, mimeType) MC_JAVA_SYNTHESIZE_STRING(setCharset, charset) MC_JAVA_SYNTHESIZE_STRING(setUniqueID, uniqueID) MC_JAVA_SYNTHESIZE_STRING(setContentID, contentID) -- cgit v1.2.3