Commit ad382a06 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added JNI method enableSubscriptions for LinphoneFriendList

parent db56234b
......@@ -2061,6 +2061,10 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_exportFriendsToVCa
env->ReleaseStringUTFChars(jpath, path);
}
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_enableSubscriptions(JNIEnv* env, jobject thiz, jlong list, jboolean enable) {
linphone_friend_list_enable_subscriptions((LinphoneFriendList*)list, enable);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addFriendList(JNIEnv* env
,jobject thiz
,jlong lc
......
......@@ -29,6 +29,7 @@ public interface LinphoneFriendList {
public LinphoneFriend[] getFriendList();
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
public void closeSubscriptions();
public void enableSubscriptions(boolean enable);
public LinphoneFriend findFriendByUri(String uri);
public void setUri(String uri);
public void synchronizeFriendsFromServer();
......
......@@ -31,6 +31,7 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
private native LinphoneFriend[] getFriendList(long nativePtr);
private native void updateSubscriptions(long nativePtr, long proxyConfigPtr, boolean onlyWhenRegistered);
private native void closeSubscriptions(long nativePtr);
private native void enableSubscriptions(long nativePtr, boolean enable);
private native Object getCore(long ptr);
private native LinphoneFriend findFriendByUri(long nativePtr, String uri);
private native void setListener(long ptr, LinphoneFriendListListener listener);
......@@ -81,6 +82,13 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
}
}
@Override
public void enableSubscriptions(boolean enable) {
synchronized(getSyncObject()) {
enableSubscriptions(nativePtr, enable);
}
}
@Override
public LinphoneFriend findFriendByUri(String uri) {
synchronized(getSyncObject()){
......
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