Commit d86371cd authored by Ghislain MARY's avatar Ghislain MARY

Add accessors to get the number of check lists in an ICE session and to remove...

Add accessors to get the number of check lists in an ICE session and to remove a check list from it.
parent 908215f8
......@@ -350,6 +350,14 @@ MS2_PUBLIC void ice_session_set_max_connectivity_checks(IceSession *session, uin
*/
MS2_PUBLIC void ice_session_set_keepalive_timeout(IceSession *session, uint8_t timeout);
/**
* Get the number of check lists in an ICE session.
*
* @param session A pointer to a session
* @return The number of check lists in the ICE session
*/
MS2_PUBLIC int ice_session_nb_check_lists(IceSession *session);
/**
* Add an ICE check list to an ICE session.
*
......@@ -358,6 +366,14 @@ MS2_PUBLIC void ice_session_set_keepalive_timeout(IceSession *session, uint8_t t
*/
MS2_PUBLIC void ice_session_add_check_list(IceSession *session, IceCheckList *cl);
/**
* Remove an ICE check list from an ICE session.
*
* @param session The session from which to remove the check list
* @param cl The check list to remove from the session
*/
MS2_PUBLIC void ice_session_remove_check_list(IceSession *session, IceCheckList *cl);
/**
* Gather ICE local candidates for an ICE session.
*
......
......@@ -628,6 +628,11 @@ void ice_session_set_keepalive_timeout(IceSession *session, uint8_t timeout)
* SESSION HANDLING *
*****************************************************************************/
int ice_session_nb_check_lists(IceSession *session)
{
return ms_list_size(session->streams);
}
void ice_session_add_check_list(IceSession *session, IceCheckList *cl)
{
session->streams = ms_list_append(session->streams, cl);
......@@ -637,6 +642,12 @@ void ice_session_add_check_list(IceSession *session, IceCheckList *cl)
}
}
void ice_session_remove_check_list(IceSession *session, IceCheckList *cl)
{
session->streams = ms_list_remove(session->streams, cl);
ice_check_list_destroy(cl);
}
static int ice_find_default_candidate_from_componentID(const IceCandidate *candidate, const uint16_t *componentID)
{
return !((candidate->is_default == TRUE) && (candidate->componentID == *componentID));
......
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