add linphone_core_set_transport_timeout() wrapper for java

This commit is contained in:
Simon Morlat 2015-11-04 17:54:46 +01:00
parent e7e063352e
commit f0b9d0fffe
3 changed files with 42 additions and 0 deletions

View file

@ -6529,4 +6529,22 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCoreImpl_getHttpProxyPort(
}
/*
* Class: org_linphone_core_LinphoneCoreImpl
* Method: setSipTransportTimeout
* Signature: (JI)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setSipTransportTimeout(JNIEnv *env, jobject jobj, jlong pcore, jint timeout){
linphone_core_set_sip_transport_timeout((LinphoneCore*)pcore, timeout);
}
/*
* Class: org_linphone_core_LinphoneCoreImpl
* Method: getSipTransportTimeout
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCoreImpl_getSipTransportTimeout(JNIEnv *env, jobject jobj, jlong pcore){
return linphone_core_get_sip_transport_timeout((LinphoneCore*)pcore);
}

View file

@ -959,6 +959,18 @@ public interface LinphoneCore {
*/
void setSipDscp(int dscp);
/**
* Set the timeout in milliseconds for SIP transport (TCP or TLS connection establishment maximum time).
* @param timeout_ms
**/
void setSipTransportTimeout(int timeout_ms);
/**
* Get the current SIP transport timeout.
* @param timeout_ms
**/
int getSipTransportTimeout();
/**
* Get DSCP used for SIP socket.
* @return the DSCP value used for the SIP socket.

View file

@ -1558,4 +1558,16 @@ class LinphoneCoreImpl implements LinphoneCore {
public int getHttpProxyPort(){
return getHttpProxyPort(nativePtr);
}
private native void setSipTransportTimeout(long nativePtr, int timeout_ms);
@Override
public void setSipTransportTimeout(int timeout_ms){
setSipTransportTimeout(nativePtr, timeout_ms);
}
private native int getSipTransportTimeout(long nativePtr);
@Override
public int getSipTransportTimeout(){
return getSipTransportTimeout(nativePtr);
}
}