This should fix broken JNI compilation

This commit is contained in:
Sylvain Berfini 2016-01-19 14:07:41 +01:00
parent 4583352bad
commit f001aaae97
3 changed files with 25 additions and 7 deletions

View file

@ -1958,12 +1958,20 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_exportFriendsToVCardFile
env->ReleaseStringUTFChars(jpath, path);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setFriendList(JNIEnv* env
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addFriendList(JNIEnv* env
,jobject thiz
,jlong lc
,jlong friendList
) {
linphone_core_set_friend_list((LinphoneCore*)lc,(LinphoneFriendList*)friendList);
linphone_core_add_friend_list((LinphoneCore*)lc,(LinphoneFriendList*)friendList);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeFriendList(JNIEnv* env
,jobject thiz
,jlong lc
,jlong friendList
) {
linphone_core_remove_friend_list((LinphoneCore*)lc,(LinphoneFriendList*)friendList);
}
extern "C" jobjectArray Java_org_linphone_core_LinphoneCoreImpl_getFriendList(JNIEnv* env

View file

@ -1000,9 +1000,14 @@ public interface LinphoneCore {
void addFriend(LinphoneFriend lf) throws LinphoneCoreException;
/**
* Sets the friend list for the linphone core.
* Adds the friend list to the linphone core.
*/
void setFriendList(LinphoneFriendList friendList) throws LinphoneCoreException;
void addFriendList(LinphoneFriendList friendList) throws LinphoneCoreException;
/**
* Removes the friend list from the linphone core.
*/
void removeFriendList(LinphoneFriendList friendList) throws LinphoneCoreException;
/**
* Creates a friend list.

View file

@ -96,7 +96,8 @@ class LinphoneCoreImpl implements LinphoneCore {
private native void setPreviewWindowId(long nativePtr, Object wid);
private native void setDeviceRotation(long nativePtr, int rotation);
private native void addFriend(long nativePtr,long friend);
private native void setFriendList(long nativePtr,long friendList);
private native void addFriendList(long nativePtr,long friendList);
private native void removeFriendList(long nativePtr,long friendList);
private native LinphoneFriend[] getFriendList(long nativePtr);
private native void setPresenceInfo(long nativePtr, int minutes_away, String alternative_contact, int status);
private native int getPresenceInfo(long nativePtr);
@ -458,8 +459,12 @@ class LinphoneCoreImpl implements LinphoneCore {
return new LinphoneFriendListImpl(this);
}
public synchronized void setFriendList(LinphoneFriendList friendList) throws LinphoneCoreException {
setFriendList(nativePtr,((LinphoneFriendListImpl)friendList).nativePtr);
public synchronized void addFriendList(LinphoneFriendList friendList) throws LinphoneCoreException {
addFriendList(nativePtr,((LinphoneFriendListImpl)friendList).nativePtr);
}
public synchronized void removeFriendList(LinphoneFriendList friendList) throws LinphoneCoreException {
removeFriendList(nativePtr,((LinphoneFriendListImpl)friendList).nativePtr);
}
public synchronized LinphoneFriend[] getFriendList() {