Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
c1f90bf2
Commit
c1f90bf2
authored
Oct 19, 2015
by
Ghislain MARY
Browse files
Add JNI for the API to clear custom SDP attributes.
parent
a32d59ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+8
-0
java/common/org/linphone/core/LinphoneCallParams.java
java/common/org/linphone/core/LinphoneCallParams.java
+11
-0
java/impl/org/linphone/core/LinphoneCallParamsImpl.java
java/impl/org/linphone/core/LinphoneCallParamsImpl.java
+12
-0
No files found.
coreapi/linphonecore_jni.cc
View file @
c1f90bf2
...
...
@@ -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
);
...
...
java/common/org/linphone/core/LinphoneCallParams.java
View file @
c1f90bf2
...
...
@@ -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}
...
...
java/impl/org/linphone/core/LinphoneCallParamsImpl.java
View file @
c1f90bf2
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment