mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Added JNI wrapper for linphone_friend_list_set_uri and linphone_friend_list_synchronize_friends_from_server
This commit is contained in:
parent
6a2a62008f
commit
64fc5a9594
3 changed files with 28 additions and 0 deletions
|
|
@ -3188,6 +3188,16 @@ extern "C" jlong Java_org_linphone_core_LinphoneFriendListImpl_newLinphoneFriend
|
|||
return (jlong)fl;
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_setUri(JNIEnv* env, jobject thiz, jlong list, jstring juri) {
|
||||
const char* uri = env->GetStringUTFChars(juri, NULL);
|
||||
linphone_friend_list_set_uri((LinphoneFriendList*)list, uri);
|
||||
env->ReleaseStringUTFChars(juri, uri);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_synchronizeFriendsFromServer(JNIEnv* env, jobject thiz, jlong list) {
|
||||
linphone_friend_list_synchronize_friends_from_server((LinphoneFriendList*)list);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneFriendImpl_setAddress(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong ptr
|
||||
|
|
|
|||
|
|
@ -24,5 +24,7 @@ public interface LinphoneFriendList {
|
|||
public void addFriend(LinphoneFriend friend);
|
||||
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
|
||||
public LinphoneFriend findFriendByUri(String uri);
|
||||
public void setUri(String uri);
|
||||
public void synchronizeFriendsFromServer();
|
||||
long getNativePtr();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,22 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
private native void setUri(long nativePtr, String uri);
|
||||
@Override
|
||||
public void setUri(String uri) {
|
||||
synchronized(getSyncObject()) {
|
||||
return setUri(nativePtr, uri);
|
||||
}
|
||||
}
|
||||
|
||||
private native void synchronizeFriendsFromServer(long nativePtr);
|
||||
@Override
|
||||
public void synchronizeFriendsFromServer() {
|
||||
synchronized(getSyncObject()) {
|
||||
synchronizeFriendsFromServer(nativePtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*reserved for JNI */
|
||||
protected LinphoneFriendListImpl(long aNativePtr) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue