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
a32d59ae
Commit
a32d59ae
authored
Oct 19, 2015
by
Ghislain MARY
Browse files
Add API to clear custom SDP attributes.
parent
4b28d3a9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
coreapi/call_params.c
coreapi/call_params.c
+8
-0
coreapi/call_params.h
coreapi/call_params.h
+15
-0
tester/call_tester.c
tester/call_tester.c
+4
-4
No files found.
coreapi/call_params.c
View file @
a32d59ae
...
@@ -119,6 +119,14 @@ void linphone_call_params_add_custom_sdp_media_attribute(LinphoneCallParams *par
...
@@ -119,6 +119,14 @@ void linphone_call_params_add_custom_sdp_media_attribute(LinphoneCallParams *par
params
->
custom_sdp_media_attributes
[
type
]
=
sal_custom_sdp_attribute_append
(
params
->
custom_sdp_media_attributes
[
type
],
attribute_name
,
attribute_value
);
params
->
custom_sdp_media_attributes
[
type
]
=
sal_custom_sdp_attribute_append
(
params
->
custom_sdp_media_attributes
[
type
],
attribute_name
,
attribute_value
);
}
}
void
linphone_call_params_clear_custom_sdp_attributes
(
LinphoneCallParams
*
params
)
{
linphone_call_params_set_custom_sdp_attributes
(
params
,
NULL
);
}
void
linphone_call_params_clear_custom_sdp_media_attributes
(
LinphoneCallParams
*
params
,
LinphoneStreamType
type
)
{
linphone_call_params_set_custom_sdp_media_attributes
(
params
,
type
,
NULL
);
}
LinphoneCallParams
*
linphone_call_params_copy
(
const
LinphoneCallParams
*
cp
){
LinphoneCallParams
*
linphone_call_params_copy
(
const
LinphoneCallParams
*
cp
){
unsigned
int
i
;
unsigned
int
i
;
LinphoneCallParams
*
ncp
=
linphone_call_params_new
();
LinphoneCallParams
*
ncp
=
linphone_call_params_new
();
...
...
coreapi/call_params.h
View file @
a32d59ae
...
@@ -426,6 +426,21 @@ LINPHONE_PUBLIC const char * linphone_call_params_get_custom_sdp_attribute(const
...
@@ -426,6 +426,21 @@ LINPHONE_PUBLIC const char * linphone_call_params_get_custom_sdp_attribute(const
**/
**/
LINPHONE_PUBLIC
const
char
*
linphone_call_params_get_custom_sdp_media_attribute
(
const
LinphoneCallParams
*
params
,
LinphoneStreamType
type
,
const
char
*
attribute_name
);
LINPHONE_PUBLIC
const
char
*
linphone_call_params_get_custom_sdp_media_attribute
(
const
LinphoneCallParams
*
params
,
LinphoneStreamType
type
,
const
char
*
attribute_name
);
/**
* Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
* @param[in] params The #LinphoneCallParams to clear the custom SDP attributes from.
* @ingroup media_parameters
**/
LINPHONE_PUBLIC
void
linphone_call_params_clear_custom_sdp_attributes
(
LinphoneCallParams
*
params
);
/**
* Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.
* @param[in] params The #LinphoneCallParams to clear the custom SDP attributes from.
* @param[in] type The type of the stream to clear the custom SDP attributes from.
* @ingroup media_parameters
**/
LINPHONE_PUBLIC
void
linphone_call_params_clear_custom_sdp_media_attributes
(
LinphoneCallParams
*
params
,
LinphoneStreamType
type
);
/*******************************************************************************
/*******************************************************************************
* DEPRECATED *
* DEPRECATED *
...
...
tester/call_tester.c
View file @
a32d59ae
...
@@ -1234,8 +1234,8 @@ static void call_with_custom_sdp_attributes_cb(LinphoneCore *lc, LinphoneCall *c
...
@@ -1234,8 +1234,8 @@ static void call_with_custom_sdp_attributes_cb(LinphoneCore *lc, LinphoneCall *c
BC_ASSERT_PTR_NOT_NULL
(
value
);
BC_ASSERT_PTR_NOT_NULL
(
value
);
if
(
value
)
BC_ASSERT_STRING_EQUAL
(
value
,
"sunny"
);
if
(
value
)
BC_ASSERT_STRING_EQUAL
(
value
,
"sunny"
);
params
=
linphone_core_create_call_params
(
lc
,
call
);
params
=
linphone_core_create_call_params
(
lc
,
call
);
linphone_call_params_
set
_custom_sdp_attributes
(
params
,
NULL
);
linphone_call_params_
clear
_custom_sdp_attributes
(
params
);
linphone_call_params_
set
_custom_sdp_media_attributes
(
params
,
LinphoneStreamTypeAudio
,
NULL
);
linphone_call_params_
clear
_custom_sdp_media_attributes
(
params
,
LinphoneStreamTypeAudio
);
linphone_call_params_add_custom_sdp_attribute
(
params
,
"working"
,
"no"
);
linphone_call_params_add_custom_sdp_attribute
(
params
,
"working"
,
"no"
);
BC_ASSERT_EQUAL
(
linphone_core_accept_call_update
(
lc
,
call
,
params
),
0
,
int
,
"%i"
);
BC_ASSERT_EQUAL
(
linphone_core_accept_call_update
(
lc
,
call
,
params
),
0
,
int
,
"%i"
);
linphone_call_params_destroy
(
params
);
linphone_call_params_destroy
(
params
);
...
@@ -1276,8 +1276,8 @@ static void call_with_custom_sdp_attributes(void) {
...
@@ -1276,8 +1276,8 @@ static void call_with_custom_sdp_attributes(void) {
vtable
->
call_state_changed
=
call_with_custom_sdp_attributes_cb
;
vtable
->
call_state_changed
=
call_with_custom_sdp_attributes_cb
;
linphone_core_add_listener
(
marie
->
lc
,
vtable
);
linphone_core_add_listener
(
marie
->
lc
,
vtable
);
pauline_params
=
linphone_core_create_call_params
(
pauline
->
lc
,
call_pauline
);
pauline_params
=
linphone_core_create_call_params
(
pauline
->
lc
,
call_pauline
);
linphone_call_params_
set
_custom_sdp_attributes
(
pauline_params
,
NULL
);
linphone_call_params_
clear
_custom_sdp_attributes
(
pauline_params
);
linphone_call_params_
set
_custom_sdp_media_attributes
(
pauline_params
,
LinphoneStreamTypeAudio
,
NULL
);
linphone_call_params_
clear
_custom_sdp_media_attributes
(
pauline_params
,
LinphoneStreamTypeAudio
);
linphone_call_params_add_custom_sdp_attribute
(
pauline_params
,
"weather"
,
"sunny"
);
linphone_call_params_add_custom_sdp_attribute
(
pauline_params
,
"weather"
,
"sunny"
);
linphone_core_update_call
(
pauline
->
lc
,
call_pauline
,
pauline_params
);
linphone_core_update_call
(
pauline
->
lc
,
call_pauline
,
pauline_params
);
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneCallUpdatedByRemote
,
1
));
BC_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneCallUpdatedByRemote
,
1
));
...
...
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