Requirements
------------
- glib >= 2.44
+ glib >= 2.54
pkg-config
gnutls >= 2.12.0 or OpenSSL
gupnp-igd >= 0.1.2 (optional)
agent_unlock (agent);
}
+
+
+NICEAPI_EXPORT GPtrArray *
+nice_agent_get_sockets (NiceAgent *agent, guint stream_id, guint component_id)
+{
+ GPtrArray *array = NULL;
+ NiceComponent *component;
+
+ agent_lock (agent);
+ if (agent_find_component (agent, stream_id, component_id, NULL, &component))
+ array = nice_component_get_sockets (component);
+ agent_unlock (agent);
+
+ return array;
+}
nice_agent_close_async (NiceAgent *agent, GAsyncReadyCallback callback,
gpointer callback_data);
+/**
+ * nice_agent_get_sockets:
+ * @agent: The #NiceAgent Object
+ * @stream_id: The ID of the stream
+ * @component_id: The ID of the component
+ *
+ * Each component can have multiple sockets, this is an API to retrieve them all
+ * to be able to set properties. Most of the sockets for a component are created when
+ * calling nice_agent_gather_candidates(), so this API should be called right after to
+ * able to set properties on the sockets before they are used.
+ *
+ * These sockets can be a mix of UDP & TCP sockets depending on the compatibility mode
+ * and options that have been set.
+ *
+ * Returns: (element-type GSocket) (transfer full): An array
+ * containing all of the sockets for this component. Free with
+ * g_ptr_array_unref() when done.
+ *
+ * Since: 0.1.17
+ */
+GPtrArray *
+nice_agent_get_sockets (NiceAgent *agent, guint stream_id, guint component_id);
+
G_END_DECLS
#endif /* __LIBNICE_AGENT_H__ */
return FALSE;
}
+
+/* Must be called with agent lock held */
+/* Returns a transfer full GPtrArray of GSocket */
+GPtrArray *
+nice_component_get_sockets (NiceComponent *component)
+{
+ GPtrArray *array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ GSList *item;
+
+ for (item = component->local_candidates; item; item = item->next) {
+ NiceCandidate *cand = item->data;
+ NiceSocket *nicesock = cand->sockptr;
+
+ if (nicesock->fileno && !g_ptr_array_find (array, nicesock->fileno, NULL))
+ g_ptr_array_add (array, g_object_ref (nicesock->fileno));
+ }
+
+ return array;
+}
nice_component_verify_remote_candidate (NiceComponent *component,
const NiceAddress *address, NiceSocket *nicesock);
+GPtrArray *
+nice_component_get_sockets (NiceComponent *component);
G_END_DECLS
AC_CHECK_TYPES([size_t, ssize_t])
# Also put matching version in LIBNICE_CFLAGS
-GLIB_REQ=2.48
+GLIB_REQ=2.54
-LIBNICE_CFLAGS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_44"
+LIBNICE_CFLAGS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_54 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_54"
dnl Support different levels of compiler error reporting.
dnl This configure flag is designed to mimic one from gnome-common,
<title>Index of new symbols in 0.1.16</title>
<xi:include href="xml/api-index-0.1.16.xml"><xi:fallback/></xi:include>
</index>
+ <index role="0.1.17">
+ <title>Index of new symbols in 0.1.17</title>
+ <xi:include href="xml/api-index-0.1.17.xml"><xi:fallback/></xi:include>
+ </index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
</part>
</book>
nice_agent_parse_remote_candidate_sdp
nice_agent_get_io_stream
nice_agent_get_selected_socket
+nice_agent_get_sockets
nice_agent_get_component_state
nice_agent_close_async
nice_component_state_to_string
soversion = 10
libversion = '10.9.0'
-glib_req = '>= 2.48'
+glib_req = '>= 2.54'
gnutls_req = '>= 2.12.0'
gupnp_igd_req = '>= 0.2.4'
gst_req = '>= 1.0.0'
nice_agent_get_remote_candidates
nice_agent_get_selected_pair
nice_agent_get_selected_socket
+nice_agent_get_sockets
nice_agent_get_stream_name
nice_agent_get_type
nice_agent_new