Added GetTime method to LinphoneChatMessage java impl

This commit is contained in:
Sylvain Berfini 2013-04-11 14:34:04 +02:00
parent 3ff0ef4d0a
commit 6bd36ceb66
3 changed files with 17 additions and 0 deletions

View file

@ -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

View file

@ -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();
}

View file

@ -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);
}
}