Commit dda96974 authored by Youness Alaoui's avatar Youness Alaoui
Browse files

Remove nice_agent_add_remote_candidate since it's useless

parent c935e4cc
......@@ -1202,43 +1202,6 @@ nice_agent_get_local_credentials (
return ret;
}
NICEAPI_EXPORT gboolean
nice_agent_add_remote_candidate (
NiceAgent *agent,
guint stream_id,
guint component_id,
NiceCandidateType type,
NiceAddress *addr,
const gchar *username,
const gchar *password)
{
gboolean ret;
g_static_rec_mutex_lock (&agent->mutex);
ret =
priv_add_remote_candidate (agent,
stream_id,
component_id,
type,
addr,
NULL,
NICE_CANDIDATE_TRANSPORT_UDP,
0,
username,
password,
NULL);
/* XXX/later: for each component, generate a new check with the new
candidate, see below set_remote_candidates() */
g_static_rec_mutex_unlock (&agent->mutex);
return ret;
}
NICEAPI_EXPORT int
nice_agent_set_remote_candidates (NiceAgent *agent, guint stream_id, guint component_id, const GSList *candidates)
{
......
......@@ -393,40 +393,6 @@ nice_agent_get_local_credentials (
guint stream_id,
const gchar **ufrag, const gchar **pwd);
/**
* nice_agent_add_remote_candidate:
* @agent: The #NiceAgent Object
* @stream_id: The ID of the stream the candidate is for
* @component_id: The ID of the component the candidate is for
* @type: The type of the new candidate
* @addr: The new candidate's IP address
* @username: The new candidate's username
* (optional - overrides the value set in nice_agent_set_remote_credentials())
* @password: The new candidate's password
* (optional - overrides the value set in nice_agent_set_remote_credentials())
*
* Adds a new remote candidate to the agent
*
<note>
<para>
NICE_AGENT_MAX_REMOTE_CANDIDATES is the absolute maximum limit
for remote candidates
</para>
</note>
*
* Returns: %TRUE on success, %FALSE on fatal (memory alloc) errors
**/
gboolean
nice_agent_add_remote_candidate (
NiceAgent *agent,
guint stream_id,
guint component_id,
NiceCandidateType type,
NiceAddress *addr,
const gchar *username,
const gchar *password);
/**
* nice_agent_set_remote_candidates:
* @agent: The #NiceAgent Object
......
......@@ -88,22 +88,6 @@ main (void)
g_assert (strncmp (candidate->foundation, "1", 1) == 0);
g_slist_free (candidates);
/* add remote candidate */
nice_agent_add_remote_candidate (agent, stream_id, 1,
NICE_CANDIDATE_TYPE_HOST,
&addr_remote, "username", "password");
candidates = nice_agent_get_remote_candidates (agent, stream_id, 1);
g_assert (candidates != NULL);
g_assert (g_slist_length (candidates) == 1);
candidate = candidates->data;
g_assert (nice_address_equal (&(candidate->addr), &addr_remote));
g_assert (candidate->stream_id == stream_id);
g_assert (candidate->component_id == 1);
g_assert (candidate->type == NICE_CANDIDATE_TYPE_HOST);
g_assert (0 == strcmp (candidate->username, "username"));
g_assert (0 == strcmp (candidate->password, "password"));
g_slist_free (candidates);
/* clean up */
g_object_unref (agent);
return 0;
......
......@@ -14,7 +14,6 @@ nice_address_set_ipv6
nice_address_set_port
nice_address_to_string
nice_agent_add_local_address
nice_agent_add_remote_candidate
nice_agent_add_stream
nice_agent_attach_recv
nice_agent_gather_candidates
......
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