Commit 3e2f306e authored by Sylvain Berfini's avatar Sylvain Berfini
Browse files

Added JNI glue for destroy method of LinphoneChatRoom

parent 2db0e99c
......@@ -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);
}
}
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