No need for contact related API functions
This commit is contained in:
@ -1575,28 +1575,6 @@ Java_com_tutpro_baresip_Api_video_1codecs(JNIEnv *env, jobject thiz)
|
||||
return (*env)->NewStringUTF(env, codec_buf);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_tutpro_baresip_Api_contact_1add(JNIEnv *env, jobject thiz, jstring javaContact) {
|
||||
struct pl pl_addr;
|
||||
const char *native_contact = (*env)->GetStringUTFChars(env, javaContact, 0);
|
||||
pl_set_str(&pl_addr, native_contact);
|
||||
if (contact_add(baresip_contacts(), NULL, &pl_addr) != 0) {
|
||||
LOGE("failed to add contact %s\n", native_contact);
|
||||
} else {
|
||||
LOGD("added contact %s\n", native_contact);
|
||||
}
|
||||
(*env)->ReleaseStringUTFChars(env, javaContact, native_contact);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_tutpro_baresip_Api_contacts_1remove(JNIEnv *env, jobject thiz) {
|
||||
struct le *le;
|
||||
while ((le = list_head(contact_list(baresip_contacts())))) {
|
||||
struct contact *c = le->data;
|
||||
contact_remove(baresip_contacts(), c);
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_tutpro_baresip_Api_log_1level_1set(JNIEnv *env, jobject thiz, jint level) {
|
||||
const enum log_level native_level = (enum log_level)level;
|
||||
|
||||
Reference in New Issue
Block a user