mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 08:39:20 +00:00
Added GetTime method to LinphoneChatMessage java impl
This commit is contained in:
parent
3ff0ef4d0a
commit
6bd36ceb66
3 changed files with 17 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue