mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 05:38:14 +00:00
Add JNI setRingback function
This commit is contained in:
parent
41232a3954
commit
31d3bd0bfa
3 changed files with 24 additions and 0 deletions
|
|
@ -1812,6 +1812,16 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRootCA(JNIEnv* env
|
|||
linphone_core_set_root_ca((LinphoneCore*)lc,path);
|
||||
if (path) env->ReleaseStringUTFChars(jpath, path);
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRingback(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jstring jpath) {
|
||||
const char* path = jpath?env->GetStringUTFChars(jpath, NULL):NULL;
|
||||
linphone_core_set_ringback((LinphoneCore*)lc,path);
|
||||
if (path) env->ReleaseStringUTFChars(jpath, path);
|
||||
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableKeepAlive(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
|
|||
|
|
@ -1025,6 +1025,15 @@ public interface LinphoneCore {
|
|||
*/
|
||||
void setRootCA(String path);
|
||||
|
||||
/**
|
||||
* Sets the path to a wav file used for for ringing back.
|
||||
*
|
||||
* Ringback means the ring that is heard when it's ringing at the remote party.
|
||||
*
|
||||
* @param path The file must be a wav 16bit linear.
|
||||
*/
|
||||
void setRingback(String path);
|
||||
|
||||
void setUploadBandwidth(int bw);
|
||||
/**
|
||||
* Sets maximum available download bandwidth
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ public class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void setRing(long nativePtr, String path);
|
||||
private native String getRing(long nativePtr);
|
||||
private native void setRootCA(long nativePtr, String path);
|
||||
private native void setRingback(long nativePtr, String path);
|
||||
private native long[] listVideoPayloadTypes(long nativePtr);
|
||||
private native LinphoneProxyConfig[] getProxyConfigList(long nativePtr);
|
||||
private native long[] getAuthInfosList(long nativePtr);
|
||||
|
|
@ -519,6 +520,10 @@ public class LinphoneCoreImpl implements LinphoneCore {
|
|||
setRootCA(nativePtr, path);
|
||||
}
|
||||
|
||||
public synchronized void setRingback(String path) {
|
||||
setRingback(nativePtr, path);
|
||||
}
|
||||
|
||||
public synchronized LinphoneProxyConfig[] getProxyConfigList() {
|
||||
return getProxyConfigList(nativePtr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue