Commit aaf2c2d0 authored by Sylvain Berfini's avatar Sylvain Berfini
Browse files

Added JNI API to get DTMF policy

parent 712dd480
......@@ -2638,10 +2638,18 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setUseSipInfoForDtmfs(JN
linphone_core_set_use_info_for_dtmf((LinphoneCore *)lc, (bool) use);
}
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_getUseSipInfoForDtmfs(JNIEnv *env, jobject thiz, jlong lc){
return linphone_core_get_use_info_for_dtmf((LinphoneCore *)lc);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setUseRfc2833ForDtmfs(JNIEnv *env, jobject thiz, jlong lc, jboolean use){
linphone_core_set_use_rfc2833_for_dtmf((LinphoneCore *)lc, (bool) use);
}
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_getUseRfc2833ForDtmfs(JNIEnv *env, jobject thiz, jlong lc){
return (jboolean) linphone_core_get_use_rfc2833_for_dtmf((LinphoneCore *)lc);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDownloadPtime(JNIEnv *env, jobject thiz, jlong lc, jint ptime){
linphone_core_set_download_ptime((LinphoneCore *)lc, (int) ptime);
}
......
......@@ -1316,10 +1316,20 @@ public interface LinphoneCore {
*/
void setUseSipInfoForDtmfs(boolean use);
/**
* Returns the state of use of SIP INFO for DTMFs
*/
boolean getUseSipInfoForDtmfs();
/**
* Enable/Disable the use of inband DTMFs
*/
void setUseRfc2833ForDtmfs(boolean use);
/**
* Returns the state of use of inband DTMFs
*/
boolean getUseRfc2833ForDtmfs();
/**
* @return returns LpConfig object to read/write to the config file: usefull if you wish to extend
......
......@@ -924,10 +924,20 @@ class LinphoneCoreImpl implements LinphoneCore {
setUseSipInfoForDtmfs(nativePtr, use);
}
private native boolean getUseSipInfoForDtmfs(long ptr);
public synchronized boolean getUseSipInfoForDtmfs() {
return getUseSipInfoForDtmfs(nativePtr);
}
private native void setUseRfc2833ForDtmfs(long ptr, boolean use);
public synchronized void setUseRfc2833ForDtmfs(boolean use) {
setUseRfc2833ForDtmfs(nativePtr, use);
}
private native boolean getUseRfc2833ForDtmfs(long ptr);
public synchronized boolean getUseRfc2833ForDtmfs() {
return getUseRfc2833ForDtmfs(nativePtr);
}
private native long getConfig(long ptr);
public synchronized LpConfig getConfig() {
......
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