removes reference to LinphoneChatRoom.destroy(), which should not be used from java code

This commit is contained in:
Simon Morlat 2015-09-13 16:46:23 +02:00
parent c6a712eaf9
commit 5257d25cab
3 changed files with 2 additions and 16 deletions

View file

@ -1867,7 +1867,7 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_getOrCreateChatRoom(JNI
,jstring jto) {
const char* to = env->GetStringUTFChars(jto, NULL);
LinphoneChatRoom* lResult = linphone_core_get_or_create_chat_room((LinphoneCore*)lc,to);
LinphoneChatRoom* lResult = linphone_core_get_chat_room_from_uri((LinphoneCore*)lc,to);
env->ReleaseStringUTFChars(jto, to);
return (jlong)lResult;
}
@ -3086,11 +3086,6 @@ extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_markAsRead(JNIEnv*
linphone_chat_room_mark_as_read((LinphoneChatRoom*)ptr);
}
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_destroy(JNIEnv* env
,jobject thiz
,jlong ptr) {
linphone_chat_room_destroy((LinphoneChatRoom*)ptr);
}
extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createFileTransferMessage(JNIEnv* env, jobject thiz, jlong ptr, jstring jname, jstring jtype, jstring jsubtype, jint data_size) {
LinphoneContentPrivate content = {0};
@ -3389,7 +3384,7 @@ extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_unref(JNIEnv* en
extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_getChatRooms(JNIEnv* env
,jobject thiz
,jlong ptr) {
MSList* chats = linphone_core_get_chat_rooms((LinphoneCore*)ptr);
const MSList* chats = linphone_core_get_chat_rooms((LinphoneCore*)ptr);
int chatsSize = ms_list_size(chats);
jlongArray jChats = env->NewLongArray(chatsSize);
jlong *jInternalArray = env->GetLongArrayElements(jChats, NULL);

View file

@ -76,11 +76,6 @@ public interface LinphoneChatRoom {
*/
LinphoneChatMessage[] getHistoryRange(int begin, int end);
/**
* Destroys a LinphoneChatRoom.
*/
void destroy();
/**
* Returns the amount of unread messages associated with the peer of this chatRoom.
* @return the amount of unread messages

View file

@ -91,10 +91,6 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
}
}
public void destroy() {
destroy(nativePtr);
}
public int getUnreadMessagesCount() {
synchronized(getCore()){
return getUnreadMessagesCount(nativePtr);