mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 09:49:26 +00:00
Added a JNI method to know if a LinphoneFriend has been added to a LinphoneFriendList
This commit is contained in:
parent
16fd894d55
commit
0a697d0d6f
3 changed files with 16 additions and 0 deletions
|
|
@ -3862,6 +3862,11 @@ extern "C" void Java_org_linphone_core_LinphoneFriendImpl_setPresenceModel(JNIEn
|
|||
linphone_friend_set_presence_model(lf, model);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneFriendImpl_isAlreadyPresentInFriendList(JNIEnv* env, jobject thiz, jlong ptr) {
|
||||
LinphoneFriend *lf = (LinphoneFriend *)ptr;
|
||||
return (jboolean)lf->friend_list != NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_linphone_core_LinphoneFriendImpl
|
||||
* Method: getPresenceModel
|
||||
|
|
|
|||
|
|
@ -204,4 +204,9 @@ public interface LinphoneFriend {
|
|||
String[] getPhoneNumbers();
|
||||
void addPhoneNumber(String phone);
|
||||
void removePhoneNumber(String phone);
|
||||
|
||||
/**
|
||||
* Returns true if friend has already been added in a LinphoneFriendList, false otherwise
|
||||
*/
|
||||
boolean isAlreadyPresentInFriendList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,4 +225,10 @@ class LinphoneFriendImpl implements LinphoneFriend, Serializable {
|
|||
public void removePhoneNumber(String phone) {
|
||||
removePhoneNumber(nativePtr, phone);
|
||||
}
|
||||
|
||||
private native boolean isAlreadyPresentInFriendList(long nativePtr);
|
||||
@Override
|
||||
public boolean isAlreadyPresentInFriendList() {
|
||||
return isAlreadyPresentInFriendList(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue