forked from mirrors/linphone-iphone
Add API to clear custom SDP attributes.
This commit is contained in:
parent
4b28d3a933
commit
a32d59ae30
3 changed files with 27 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
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){
|
||||
unsigned int i;
|
||||
LinphoneCallParams *ncp=linphone_call_params_new();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
/**
|
||||
* 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 *
|
||||
|
|
|
|||
|
|
@ -1234,8 +1234,8 @@ static void call_with_custom_sdp_attributes_cb(LinphoneCore *lc, LinphoneCall *c
|
|||
BC_ASSERT_PTR_NOT_NULL(value);
|
||||
if (value) BC_ASSERT_STRING_EQUAL(value, "sunny");
|
||||
params = linphone_core_create_call_params(lc, call);
|
||||
linphone_call_params_set_custom_sdp_attributes(params, NULL);
|
||||
linphone_call_params_set_custom_sdp_media_attributes(params, LinphoneStreamTypeAudio, NULL);
|
||||
linphone_call_params_clear_custom_sdp_attributes(params);
|
||||
linphone_call_params_clear_custom_sdp_media_attributes(params, LinphoneStreamTypeAudio);
|
||||
linphone_call_params_add_custom_sdp_attribute(params, "working", "no");
|
||||
BC_ASSERT_EQUAL(linphone_core_accept_call_update(lc, call, params), 0, int, "%i");
|
||||
linphone_call_params_destroy(params);
|
||||
|
|
@ -1276,8 +1276,8 @@ static void call_with_custom_sdp_attributes(void) {
|
|||
vtable->call_state_changed = call_with_custom_sdp_attributes_cb;
|
||||
linphone_core_add_listener(marie->lc, vtable);
|
||||
pauline_params = linphone_core_create_call_params(pauline->lc, call_pauline);
|
||||
linphone_call_params_set_custom_sdp_attributes(pauline_params, NULL);
|
||||
linphone_call_params_set_custom_sdp_media_attributes(pauline_params, LinphoneStreamTypeAudio, NULL);
|
||||
linphone_call_params_clear_custom_sdp_attributes(pauline_params);
|
||||
linphone_call_params_clear_custom_sdp_media_attributes(pauline_params, LinphoneStreamTypeAudio);
|
||||
linphone_call_params_add_custom_sdp_attribute(pauline_params, "weather", "sunny");
|
||||
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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue