]> sjero.net Git - linphone/blobdiff - java/impl/org/linphone/core/LinphoneChatMessageImpl.java
Fix java impl for LinphoneMessage.GetTime
[linphone] / java / impl / org / linphone / core / LinphoneChatMessageImpl.java
index 62fac1dc37f1401e399c1749fd171bfb83e9ef13..8162f67bf9f0aec5df062f6f55b9ca42edcee490 100644 (file)
@@ -3,11 +3,12 @@ package org.linphone.core;
 public class LinphoneChatMessageImpl implements LinphoneChatMessage {
        protected final long nativePtr;
        private native void setUserData(long ptr);
-       private native String getMessage(long ptr);
+       private native String getText(long ptr);
        private native long getPeerAddress(long ptr);
        private native String getExternalBodyUrl(long ptr);
        private native void setExternalBodyUrl(long ptr, String url);
        private native long getFrom(long ptr);
+       private native long getTime(long ptr);
        
        protected LinphoneChatMessageImpl(long aNativePtr)  {
                nativePtr = aNativePtr;
@@ -30,8 +31,8 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage {
        }
 
        @Override
-       public String getMessage() {
-               return getMessage(nativePtr);
+       public String getText() {
+               return getText(nativePtr);
        }
        
        @Override
@@ -53,4 +54,19 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage {
        public LinphoneAddress getFrom() {
                return new LinphoneAddressImpl(getFrom(nativePtr));
        }
+       
+       private native void addCustomHeader(long nativePtr, String name, String value);
+       @Override
+       public void addCustomHeader(String name, String value) {
+               addCustomHeader(nativePtr, name, value);
+       }
+       private native String getCustomHeader(long nativePtr, String name);
+       @Override
+       public String getCustomHeader(String name) {
+               return getCustomHeader(nativePtr,name);
+       }
+       
+       public long getTime() {
+               return getTime(nativePtr) * 1000; // Need milliseconds, not seconds
+       }
 }