Commit 6bd36ceb authored by Sylvain Berfini's avatar Sylvain Berfini
Browse files

Added GetTime method to LinphoneChatMessage java impl

parent 3ff0ef4d
......@@ -1871,6 +1871,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(J
return (jlong) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr);
}
extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getTime(JNIEnv* env
,jobject thiz
,jlong ptr) {
return (jlong) linphone_chat_message_get_time((LinphoneChatMessage*)ptr);
}
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv* env
,jobject thiz
,jlong ptr
......
......@@ -106,4 +106,10 @@ public interface LinphoneChatMessage {
* @return the value of the header, or null if not found.
*/
String getCustomHeader(String name);
/**
* Gets the time at which the message was sent
* @return the time in milliseconds
*/
long getTime();
}
......@@ -8,6 +8,7 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage {
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;
......@@ -64,4 +65,8 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage {
public String getCustomHeader(String name) {
return getCustomHeader(nativePtr,name);
}
public long getTime() {
return getTime(nativePtr);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment