aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2015-11-27 21:40:25 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2015-11-27 21:40:37 -0800
commitba9931ae0bf4e3e2ef72e8c242d280c8762d5cd1 (patch)
tree60d8039c3ad6f0da41bf882da00290ba0792ae2f /src/java
parentc59c410fb8473cb83e4309789000848c108578ed (diff)
Fixed #1195: added mimeType() method in Java API
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/libmailcore/AbstractPart.java5
-rw-r--r--src/java/native/com_libmailcore_AbstractPart.cpp1
2 files changed, 6 insertions, 0 deletions
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)