forked from mirrors/linphone-iphone
add get/set RemoteRingbackTone() to java wrapper
This commit is contained in:
parent
908b906e4d
commit
21d25ef90e
3 changed files with 36 additions and 0 deletions
|
|
@ -3074,6 +3074,19 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDeviceRotation(JNIEnv
|
|||
linphone_core_set_device_rotation((LinphoneCore*)lc,rotation);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRemoteRingbackTone(JNIEnv *env, jobject thiz, jlong lc, jstring jtone){
|
||||
const char* tone = NULL;
|
||||
if (jtone) tone=env->GetStringUTFChars(jtone, NULL);
|
||||
linphone_core_set_remote_ringback_tone((LinphoneCore*)lc,tone);
|
||||
if (tone) env->ReleaseStringUTFChars(jtone,tone);
|
||||
}
|
||||
|
||||
extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getRemoteRingbackTone(JNIEnv *env, jobject thiz, jlong lc){
|
||||
const char *ret= linphone_core_get_remote_ringback_tone((LinphoneCore*)lc);
|
||||
if (ret==NULL) return NULL;
|
||||
jstring jvalue =env->NewStringUTF(ret);
|
||||
return jvalue;
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setFirewallPolicy(JNIEnv *env, jobject thiz, jlong lc, jint enum_value){
|
||||
linphone_core_set_firewall_policy((LinphoneCore*)lc,(LinphoneFirewallPolicy)enum_value);
|
||||
|
|
|
|||
|
|
@ -1799,4 +1799,17 @@ public interface LinphoneCore {
|
|||
* @param listener to remove
|
||||
*/
|
||||
public void removeListener(LinphoneCoreListener listener);
|
||||
|
||||
/**
|
||||
* Specifies a ring back tone to be played to far end during incoming calls, when early media is requested.
|
||||
* @param file
|
||||
*/
|
||||
public void setRemoteRingbackTone(String file);
|
||||
|
||||
/**
|
||||
* Return the ringback tone file used when doing early media. It may be null.
|
||||
* @return the ringback tone file path.
|
||||
*/
|
||||
String getRemoteRingbackTone();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1303,4 +1303,14 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public void removeListener(LinphoneCoreListener listener) {
|
||||
removeListener(nativePtr, listener);
|
||||
}
|
||||
private native void setRemoteRingbackTone(long nativePtr, String file);
|
||||
@Override
|
||||
public void setRemoteRingbackTone(String file) {
|
||||
setRemoteRingbackTone(nativePtr,file);
|
||||
}
|
||||
private native String getRemoteRingbackTone(long nativePtr);
|
||||
@Override
|
||||
public String getRemoteRingbackTone() {
|
||||
return getRemoteRingbackTone(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue