Commit c1f90bf2 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add JNI for the API to clear custom SDP attributes.

parent a32d59ae
......@@ -3718,6 +3718,14 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getCusto
return value ? env->NewStringUTF(value) : NULL;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpAttributes(JNIEnv *env, jobject thiz, jlong ptr) {
linphone_call_params_clear_custom_sdp_attributes((LinphoneCallParams *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpMediaAttributes(JNIEnv *env, jobject thiz, jlong ptr, jint jtype) {
linphone_call_params_clear_custom_sdp_media_attributes((LinphoneCallParams *)ptr, (LinphoneStreamType)jtype);
}
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setRecordFile(JNIEnv *env, jobject thiz, jlong lcp, jstring jrecord_file){
if (jrecord_file){
const char* record_file=env->GetStringUTFChars(jrecord_file, NULL);
......
......@@ -129,6 +129,17 @@ public interface LinphoneCallParams {
**/
String getCustomSdpMediaAttribute(StreamType type, String name);
/**
* Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
**/
void clearCustomSdpAttributes();
/**
* Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.
* @param type The type of the stream to clear custom SDP attributes from.
**/
void clearCustomSdpMediaAttributes(StreamType type);
/**
* Set the privacy for the call.
* @param privacy_mask a or'd int of values defined in interface {@link org.linphone.core.Privacy}
......
......@@ -133,6 +133,18 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
return getCustomSdpMediaAttribute(nativePtr, type.mValue, name);
}
private native void clearCustomSdpAttributes(long nativePtr);
@Override
public void clearCustomSdpAttributes() {
clearCustomSdpAttributes(nativePtr);
}
private native void clearCustomSdpMediaAttributes(long nativePtr, int type);
@Override
public void clearCustomSdpMediaAttributes(StreamType type) {
clearCustomSdpMediaAttributes(nativePtr, type.mValue);
}
private native void setPrivacy(long nativePtr, int mask);
@Override
public void setPrivacy(int privacy_mask) {
......
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