mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 16:49:20 +00:00
find friend by URI added to JNI
This commit is contained in:
parent
820d26bacf
commit
a142ea2981
4 changed files with 20 additions and 2 deletions
|
|
@ -3007,8 +3007,13 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_updateSubscription
|
|||
linphone_friend_list_update_subscriptions((LinphoneFriendList*)friendListptr,(LinphoneProxyConfig*)proxyConfigPtr,jonlyWhenRegistered);
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneFriendListImpl_findFriendByUri(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong friendListptr
|
||||
,jstring juri) {
|
||||
const char* uri = env->GetStringUTFChars(juri, NULL);
|
||||
return (jlong)linphone_friend_list_find_friend_by_uri((LinphoneFriendList*)friendListptr,uri);
|
||||
}
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneFriendImpl_getAddress(JNIEnv* env
|
||||
,jobject thiz
|
||||
|
|
|
|||
|
|
@ -23,5 +23,6 @@ public interface LinphoneFriendList {
|
|||
public void setRLSUri(String uri);
|
||||
public void addFriend(LinphoneFriend friend);
|
||||
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
|
||||
public LinphoneFriend findFriendByUri(String uri);
|
||||
long getNativePtr();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ import java.io.IOException;
|
|||
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
import org.linphone.core.LinphoneCoreListener;
|
||||
import org.linphone.core.LinphoneProxyConfigImpl;
|
||||
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.mediastream.Version;
|
||||
import org.linphone.mediastream.video.AndroidVideoWindowImpl;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
|||
private native void addFriend(long nativePtr,long friendPtr);
|
||||
private native void updateSubscriptions(long nativePtr,long proxyConfigPtr,boolean onlyWhenRegistered);
|
||||
private native Object getCore(long ptr);
|
||||
private native LinphoneFriend findFriendByUri(long nativePtr,String uri);
|
||||
|
||||
|
||||
|
||||
protected LinphoneFriendListImpl(LinphoneCoreImpl core) {
|
||||
|
|
@ -56,6 +58,14 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
|||
updateSubscriptions(nativePtr, ((LinphoneProxyConfigImpl)proxyConfig).nativePtr,onlyWhenRegistered);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinphoneFriend findFriendByUri(String uri) {
|
||||
synchronized(getSyncObject()){
|
||||
return findFriendByUri(nativePtr,uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*reserved for JNI */
|
||||
protected LinphoneFriendListImpl(long aNativePtr) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue