void linphone_core_remove_friend(LinphoneCore *lc, LinphoneFriend* fl){
MSList *el=ms_list_find(lc->friends,(void *)fl);
if (el!=NULL){
- lc->friends=ms_list_remove_link(lc->friends,el);
linphone_friend_destroy((LinphoneFriend*)el->data);
+ lc->friends=ms_list_remove_link(lc->friends,el);
linphone_core_write_friends_config(lc);
}
}
,jlong ptr) {
linphone_friend_done((LinphoneFriend*)ptr);
}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeFriend(JNIEnv* env
+ ,jobject thiz
+ ,jlong ptr
+ ,jlong lf) {
+ linphone_core_remove_friend((LinphoneCore*)ptr, (LinphoneFriend*)lf);
+}
+extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_getFriendByAddress(JNIEnv* env
+ ,jobject thiz
+ ,jlong ptr
+ ,jstring jaddress) {
+ const char* address = env->GetStringUTFChars(jaddress, NULL);
+ LinphoneFriend *lf = linphone_core_get_friend_by_address((LinphoneCore*)ptr, address);
+ env->ReleaseStringUTFChars(jaddress, address);
+ return (jlong) lf;
+}
//LinphoneChatRoom
extern "C" long Java_org_linphone_core_LinphoneChatRoomImpl_getPeerAddress(JNIEnv* env
,jobject thiz
import java.util.Vector;
-import org.linphone.core.LinphoneCallLog;
-import org.linphone.core.LinphoneCallParams;
-
/**
* Linphone core main object created by method {@link LinphoneCoreFactory#createLinphoneCore(LinphoneCoreListener, String, String, Object)}.
*
* return the version code of linphone core
*/
public String getVersion();
+
+ /**
+ * remove a linphone friend from linphone core and linphonerc
+ */
+ void removeFriend(LinphoneFriend lf);
+
+ /**
+ * return a linphone friend (if exists) that matches the sip address
+ */
+ LinphoneFriend findFriendByAddress(String sipUri);
}
*/
String toString();
-
+ /**
+ * Return the native pointer for this object
+ */
+ long getNativePtr();
}