mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 03:58:08 +00:00
Added JNI glue for destroy method of LinphoneChatRoom
This commit is contained in:
parent
2db0e99c54
commit
3e2f306e36
3 changed files with 16 additions and 0 deletions
|
|
@ -2078,6 +2078,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createLinphoneChatM
|
|||
|
||||
return (jlong) chatMessage;
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_destroy(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong ptr) {
|
||||
linphone_chat_room_destroy((LinphoneChatRoom*)ptr);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_setUserData(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong ptr) {
|
||||
|
|
|
|||
|
|
@ -54,4 +54,9 @@ public interface LinphoneChatRoom {
|
|||
* @return an array of LinphoneChatMessage
|
||||
*/
|
||||
LinphoneChatMessage[] getHistory();
|
||||
|
||||
/**
|
||||
* Destroys a LinphoneChatRoom.
|
||||
*/
|
||||
void destroy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
|
|||
private native void sendMessage(long ptr, String message);
|
||||
private native void sendMessage2(long ptr, long message, StateListener listener);
|
||||
private native long[] getHistory(long ptr);
|
||||
private native void destroy(long ptr);
|
||||
|
||||
protected LinphoneChatRoomImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
|
|
@ -62,4 +63,8 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
|
|||
|
||||
return messages;
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
destroy(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue