Commit af93de9a authored by Erwan Croze's avatar Erwan Croze 👋🏻

Add get_incoming_timeout to JNI

parent 227de3e1
......@@ -5911,6 +5911,10 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setIncomingTimeout(JNIEn
linphone_core_set_inc_timeout((LinphoneCore *)lc, timeout);
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getIncomingTimeout(JNIEnv *env, jobject thiz, jlong lc) {
return linphone_core_get_inc_timeout((LinphoneCore *)lc);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setInCallTimeout(JNIEnv *env, jobject thiz, jlong lc, jint timeout) {
linphone_core_set_in_call_timeout((LinphoneCore *)lc, timeout);
}
......
......@@ -1920,6 +1920,12 @@ public interface LinphoneCore {
**/
void setIncomingTimeout(int timeout);
/**
* Return the incoming call timeout in seconds.
* @return the incoming call timeout in seconds.
**/
int getIncomingTimeout();
/**
* Set the call timeout in seconds.
* Once this time is elapsed (ringing included), the call is automatically hung up.
......
......@@ -194,6 +194,7 @@ class LinphoneCoreImpl implements LinphoneCore {
private native void setDefaultSoundDevices(long nativePtr);
private native Object createFriend(long nativePtr);
private native Object createFriendWithAddress(long nativePtr, String address);
private native int getIncomingTimeout(long nativePtr);
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig, File factoryConfig, Object userdata) throws IOException {
mListener = listener;
......@@ -1102,6 +1103,10 @@ class LinphoneCoreImpl implements LinphoneCore {
setIncomingTimeout(nativePtr, timeout);
}
public synchronized int getIncomingTimeout() {
return getIncomingTimeout(nativePtr);
}
public synchronized void setInCallTimeout(int timeout)
{
setInCallTimeout(nativePtr, timeout);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment