...
 
Commits (84)
......@@ -154,6 +154,7 @@ tests/test-restart
tests/test-tcp
tests/test-thread
tests/test-new-dribble
tests/test-nomination
# examples/ stuff
examples/simple-example
......
......@@ -22,6 +22,12 @@ if WINDOWS
AM_CFLAGS += -DWINVER=0x0501 # _WIN32_WINNT_WINXP
endif
BUILT_SOURCES = \
agent-enum-types.h \
agent-enum-types.c
CLEANFILES += $(BUILT_SOURCES)
noinst_LTLIBRARIES = libagent.la
libagent_la_SOURCES = \
......@@ -46,14 +52,31 @@ libagent_la_SOURCES = \
interfaces.h \
pseudotcp.h \
pseudotcp.c \
iostream.h \
iostream.c \
inputstream.h \
inputstream.c \
outputstream.h \
outputstream.c \
datagram-based.c \
datagram-based.h \
pseudo-tcp-input-stream.c \
pseudo-tcp-input-stream.h \
pseudo-tcp-output-stream.c \
pseudo-tcp-output-stream.h \
$(BUILT_SOURCES)
agent-enum-types.h: agent.h Makefile
$(AM_V_GEN)$(GLIB_MKENUMS) \
--fhead "#ifndef __AGENT_ENUM_TYPES_H__\n#define __AGENT_ENUM_TYPES_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define NICE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* !AGENT_ENUM_TYPES_H */" \
$(addprefix $(srcdir)/,agent.h) > $@
agent-enum-types.c: agent.h Makefile agent-enum-types.h
$(AM_V_GEN)$(GLIB_MKENUMS) \
--fhead "#include <config.h>\n#include <glib-object.h>\n#include \"agent.h\"\n#include \"agent-enum-types.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType type = 0;\n if (!type) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n type = g_@type@_register_static (\"@EnumName@\", values);\n }\n return type;\n}\n\n" \
$(addprefix $(srcdir)/,agent.h) > $@
libagent_la_LIBADD = \
$(top_builddir)/random/libnice-random.la \
$(top_builddir)/socket/libsocket.la \
......
......@@ -109,6 +109,8 @@ nice_input_message_iter_compare (const NiceInputMessageIter *a,
#define NICE_AGENT_TIMER_TR_MIN 15000 /* timer Tr, msecs (ICE ID-19) */
#define NICE_AGENT_MAX_CONNECTIVITY_CHECKS_DEFAULT 100 /* see spec 5.7.3 (ID-19) */
#define NICE_AGENT_KEEPALIVE_DEFAULT_TIMEOUT 200 /* Start at 200ms, then doube 6 times for a total of 25.4s */
/* An upper limit to size of STUN packets handled (based on Ethernet
* MTU and estimated typical sizes of ICE STUN packet */
......@@ -116,6 +118,25 @@ nice_input_message_iter_compare (const NiceInputMessageIter *a,
#define NICE_COMPONENT_MAX_VALID_CANDIDATES 50 /* maximum number of validates remote candidates to keep, the number is arbitrary but hopefully large enough */
/* A convenient macro to test if the agent is compatible with RFC5245
* or OC2007R2. Specifically these two modes share the support
* of the regular or aggressive nomination mode */
#define NICE_AGENT_IS_COMPATIBLE_WITH_RFC5245_OR_OC2007R2(obj) \
((obj)->compatibility == NICE_COMPATIBILITY_RFC5245 || \
(obj)->compatibility == NICE_COMPATIBILITY_OC2007R2)
/* A grace period before declaring a component as failed, in msecs. This
* delay is added to reduce the chance to see the agent receiving new
* stun activity just after the conncheck list has been declared failed,
* reactiviting conncheck activity, and causing a (valid) state
* transitions like that: connecting -> failed -> connecting ->
* connected -> ready.
* Such transitions are not buggy per-se, but may break the
* test-suite, that counts precisely the number of time each state
* has been set, and doesnt expect these transcient failed states.
*/
#define NICE_AGENT_MAX_TIMER_GRACE_PERIOD 1000
struct _NiceAgent
{
GObject parent; /* gobject pointer */
......@@ -132,6 +153,8 @@ struct _NiceAgent
guint timer_ta; /* property: timer Ta */
guint max_conn_checks; /* property: max connectivity checks */
gboolean force_relay; /* property: force relay */
gboolean turn_short_term; /* property: turn short term credentials */
NiceNominationMode nomination_mode; /* property: Nomination mode */
GSList *local_addresses; /* list of NiceAddresses for local
interfaces */
......@@ -159,13 +182,14 @@ struct _NiceAgent
GSource *upnp_timer_source; /* source of upnp timeout timer */
#endif
gchar *software_attribute; /* SOFTWARE attribute */
gboolean reliable; /* property: reliable */
gboolean keepalive_conncheck; /* property: keepalive_conncheck */
GQueue pending_signals;
guint16 rfc4571_expecting_length;
gboolean use_ice_udp;
gboolean use_ice_tcp;
guint conncheck_timer_grace_period; /* ongoing delay before timer stop */
/* XXX: add pointer to internal data struct for ABI-safe extensions */
};
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -49,7 +49,6 @@ typedef struct _NiceComponent NiceComponent;
#include "candidate.h"
#include "stun/stunagent.h"
#include "stun/usages/timer.h"
#include "pseudotcp.h"
#include "stream.h"
#include "socket.h"
......@@ -109,9 +108,11 @@ incoming_check_free (IncomingCheck *icheck);
* The Component is stored so this may be used as the user data for a GSource
* callback. */
typedef struct {
volatile gint ref_count;
NiceSocket *socket;
GSource *source;
NiceComponent *component;
GIOCondition last_condition;
} SocketSource;
......@@ -210,22 +211,12 @@ struct _NiceComponent {
GCancellable *stop_cancellable;
GSource *stop_cancellable_source; /* owned */
GSList *component_sources;
PseudoTcpSocket *tcp;
GSource* tcp_clock;
guint64 last_clock_timeout;
gboolean tcp_readable;
GCancellable *tcp_writable_cancellable;
GIOStream *iostream;
GDatagramBased *datagram_based; /* owned */
guint min_port;
guint max_port;
/* Queue of messages received before a selected socket was available to send
* ACKs on. The messages are dequeued to the pseudo-TCP socket once a selected
* UDP socket is available. This is only used for reliable Components. */
GQueue queued_tcp_packets;
};
typedef struct {
......@@ -269,11 +260,14 @@ nice_component_detach_all_sockets (NiceComponent *component);
void
nice_component_free_socket_sources (NiceComponent *component);
GIOCondition
nice_component_condition_check (NiceComponent *component,
GIOCondition condition);
GSource *
nice_component_input_source_new (NiceAgent *agent, guint stream_id,
guint component_id, GPollableInputStream *pollable_istream,
GCancellable *cancellable);
nice_component_source_new (NiceAgent *agent, guint stream_id,
guint component_id, GDatagramBased *datagram_based,
GIOCondition condition, GCancellable *cancellable);
GMainContext *
nice_component_dup_io_context (NiceComponent *component);
......@@ -292,6 +286,8 @@ nice_component_has_io_callback (NiceComponent *component);
void
nice_component_clean_turn_servers (NiceComponent *component);
void
nice_component_clean_candidates (NiceComponent *cmp);
TurnServer *
turn_server_new (const gchar *server_ip, guint server_port,
......
This diff is collapsed.
......@@ -56,7 +56,6 @@
* @NICE_CHECK_SUCCEEDED: Connection successfully checked.
* @NICE_CHECK_FAILED: No connectivity; retransmissions ceased.
* @NICE_CHECK_FROZEN: Waiting to be scheduled to %NICE_CHECK_WAITING.
* @NICE_CHECK_CANCELLED: Check cancelled.
* @NICE_CHECK_DISCOVERED: A valid candidate pair not on the check list.
*
* States for checking a candidate pair.
......@@ -68,7 +67,6 @@ typedef enum
NICE_CHECK_SUCCEEDED,
NICE_CHECK_FAILED,
NICE_CHECK_FROZEN,
NICE_CHECK_CANCELLED,
NICE_CHECK_DISCOVERED,
} NiceCheckState;
......@@ -85,8 +83,14 @@ struct _CandidateCheckPair
gchar foundation[NICE_CANDIDATE_PAIR_MAX_FOUNDATION];
NiceCheckState state;
gboolean nominated;
gboolean timer_restarted;
gboolean valid;
gboolean use_candidate_on_next_check;
gboolean mark_nominated_on_response_arrival;
gboolean recheck_on_timeout;
guint recheck_on_timeout_count;
gboolean stop_retransmit_on_timeout;
struct _CandidateCheckPair *discovered_pair;
struct _CandidateCheckPair *succeeded_pair;
guint64 priority;
guint32 prflx_priority;
GTimeVal next_tick; /* next tick timestamp */
......
/*
* This file is part of the Nice GLib ICE library.
*
* (C) 2010, 2013 Collabora Ltd.
* Contact: Youness Alaoui
* © 2015 Collabora Ltd.
* Contact: Philip Withnall
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
......@@ -20,7 +20,7 @@
* Corporation. All Rights Reserved.
*
* Contributors:
* Youness Alaoui, Collabora Ltd.
* Philip Withnall, Collabora Ltd.
*
* Alternatively, the contents of this file may be used under the terms of the
* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
......@@ -33,55 +33,50 @@
* file under either the MPL or the LGPL.
*/
#ifndef __NICE_INPUT_STREAM_H__
#define __NICE_INPUT_STREAM_H__
#ifndef __NICE_DATAGRAM_BASED_H__
#define __NICE_DATAGRAM_BASED_H__
#include <glib-object.h>
#include <gio/gio.h>
#include "agent.h"
G_BEGIN_DECLS
/* TYPE MACROS */
#define NICE_TYPE_INPUT_STREAM \
(nice_input_stream_get_type ())
#define NICE_INPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NICE_TYPE_INPUT_STREAM, \
NiceInputStream))
#define NICE_INPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NICE_TYPE_INPUT_STREAM, \
NiceInputStreamClass))
#define NICE_IS_INPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), NICE_TYPE_INPUT_STREAM))
#define NICE_IS_INPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), NICE_TYPE_INPUT_STREAM))
#define NICE_INPUT_STREAM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NICE_TYPE_INPUT_STREAM, \
NiceInputStreamClass))
#define NICE_TYPE_DATAGRAM_BASED \
(nice_datagram_based_get_type ())
#define NICE_DATAGRAM_BASED(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NICE_TYPE_DATAGRAM_BASED, \
NiceDatagramBased))
#define NICE_DATAGRAM_BASED_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NICE_TYPE_DATAGRAM_BASED, \
NiceDatagramBasedClass))
#define NICE_IS_DATAGRAM_BASED(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), NICE_TYPE_DATAGRAM_BASED))
#define NICE_IS_DATAGRAM_BASED_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), NICE_TYPE_DATAGRAM_BASED))
#define NICE_DATAGRAM_BASED_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NICE_TYPE_DATAGRAM_BASED, \
NiceDatagramBasedClass))
typedef struct _NiceDatagramBasedClass NiceDatagramBasedClass;
typedef struct _NiceDatagramBased NiceDatagramBased;
typedef struct _NiceInputStreamPrivate NiceInputStreamPrivate;
typedef struct _NiceInputStreamClass NiceInputStreamClass;
typedef struct _NiceInputStream NiceInputStream;
#include "agent.h"
GType nice_input_stream_get_type (void);
GType nice_datagram_based_get_type (void);
struct _NiceInputStreamClass
struct _NiceDatagramBasedClass
{
GInputStreamClass parent_class;
GObjectClass parent_class;
};
struct _NiceInputStream
struct _NiceDatagramBased
{
GInputStream parent_instance;
NiceInputStreamPrivate *priv;
GObject parent_instance;
};
NiceInputStream *nice_input_stream_new (NiceAgent *agent,
GDatagramBased *nice_datagram_based_new (NiceAgent *agent,
guint stream_id, guint component_id);
G_END_DECLS
#endif /* __NICE_INPUT_STREAM_H__ */
#endif /* __NICE_DATAGRAM_BASED_H__ */
......@@ -543,10 +543,10 @@ HostCandidateResult discovery_add_local_host_candidate (
candidate->priority = nice_candidate_msn_priority (candidate);
} else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
candidate->priority = nice_candidate_ms_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
}
candidate->priority = ensure_unique_priority (component,
......@@ -635,10 +635,10 @@ discovery_add_server_reflexive_candidate (
candidate->priority = nice_candidate_msn_priority (candidate);
} else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
candidate->priority = nice_candidate_ms_ice_priority (candidate,
agent->reliable, nat_assisted);
FALSE, nat_assisted);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, nat_assisted);
FALSE, nat_assisted);
}
candidate->priority = ensure_unique_priority (component,
......@@ -753,10 +753,10 @@ discovery_add_relay_candidate (
candidate->priority = nice_candidate_msn_priority (candidate);
} else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
candidate->priority = nice_candidate_ms_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
}
candidate->priority = ensure_unique_priority (component,
......@@ -835,10 +835,10 @@ discovery_add_peer_reflexive_candidate (
candidate->priority = nice_candidate_msn_priority (candidate);
} else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
candidate->priority = nice_candidate_ms_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
}
candidate->priority = ensure_unique_priority (component,
......@@ -938,10 +938,10 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate (
candidate->priority = nice_candidate_msn_priority (candidate);
} else if (agent->compatibility == NICE_COMPATIBILITY_OC2007R2) {
candidate->priority = nice_candidate_ms_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
} else {
candidate->priority = nice_candidate_ice_priority (candidate,
agent->reliable, FALSE);
FALSE, FALSE);
}
priv_assign_remote_foundation (agent, candidate);
......@@ -1075,7 +1075,7 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
stun_timer_start_reliable (&cand->timer,
STUN_TIMER_DEFAULT_RELIABLE_TIMEOUT);
} else {
stun_timer_start (&cand->timer, 200,
stun_timer_start (&cand->timer, 100,
STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
}
......
......@@ -276,6 +276,11 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
nice_debug ("Ignoring loopback interface");
g_free (addr_string);
}
#ifdef IGNORED_IFACE_PREFIX
} else if (g_str_has_prefix (ifa->ifa_name, IGNORED_IFACE_PREFIX)) {
nice_debug ("Ignoring %s interface", ifa->ifa_name);
g_free (addr_string);
#endif
} else {
if (nice_interfaces_is_private_ip (ifa->ifa_addr))
ips = add_ip_to_list (ips, addr_string, TRUE);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* This file is part of the Nice GLib ICE library.
*
* © 2015 Collabora Ltd.
* Contact: Philip Withnall
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Nice GLib ICE library.
*
* The Initial Developers of the Original Code are Collabora Ltd and Nokia
* Corporation. All Rights Reserved.
*
* Contributors:
* Philip Withnall, Collabora Ltd.
*
* Alternatively, the contents of this file may be used under the terms of the
* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
* case the provisions of LGPL are applicable instead of those above. If you
* wish to allow use of your version of this file only under the terms of the
* LGPL and not to allow others to use your version of this file under the
* MPL, indicate your decision by deleting the provisions above and replace
* them with the notice and other provisions required by the LGPL. If you do
* not delete the provisions above, a recipient may use your version of this
* file under either the MPL or the LGPL.
*/
#ifndef __NICE_PSEUDO_TCP_INPUT_STREAM_H__
#define __NICE_PSEUDO_TCP_INPUT_STREAM_H__
#include <glib-object.h>
#include <gio/gio.h>
#include "pseudotcp.h"
G_BEGIN_DECLS
#define NICE_TYPE_PSEUDO_TCP_INPUT_STREAM \
(nice_pseudo_tcp_input_stream_get_type ())
#define NICE_PSEUDO_TCP_INPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NICE_TYPE_PSEUDO_TCP_INPUT_STREAM, \
NicePseudoTcpInputStream))
#define NICE_PSEUDO_TCP_INPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NICE_TYPE_PSEUDO_TCP_INPUT_STREAM, \
NicePseudoTcpInputStreamClass))
#define NICE_IS_PSEUDO_TCP_INPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), NICE_TYPE_PSEUDO_TCP_INPUT_STREAM))
#define NICE_IS_PSEUDO_TCP_INPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), NICE_TYPE_PSEUDO_TCP_INPUT_STREAM))
#define NICE_PSEUDO_TCP_INPUT_STREAM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NICE_TYPE_PSEUDO_TCP_INPUT_STREAM, \
NicePseudoTcpInputStreamClass))
typedef struct _NicePseudoTcpInputStreamClass NicePseudoTcpInputStreamClass;
typedef struct _NicePseudoTcpInputStream NicePseudoTcpInputStream;
#include "agent.h"
GType nice_pseudo_tcp_input_stream_get_type (void);
struct _NicePseudoTcpInputStreamClass
{
GInputStreamClass parent_class;
};
struct _NicePseudoTcpInputStream
{
GInputStream parent_instance;
};
GInputStream *nice_pseudo_tcp_input_stream_new (PseudoTcpSocket *socket);
G_END_DECLS
#endif /* __NICE_PSEUDO_TCP_INPUT_STREAM_H__ */
This diff is collapsed.
/*
* This file is part of the Nice GLib ICE library.
*
* (C) 2010, 2013 Collabora Ltd.
* Contact: Youness Alaoui
* © 2015 Collabora Ltd.
* Contact: Philip Withnall
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
......@@ -20,7 +20,7 @@
* Corporation. All Rights Reserved.
*
* Contributors:
* Youness Alaoui, Collabora Ltd.
* Philip Withnall, Collabora Ltd.
*
* Alternatively, the contents of this file may be used under the terms of the
* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
......@@ -33,55 +33,51 @@
* file under either the MPL or the LGPL.
*/
#ifndef __NICE_OUTPUT_STREAM_H__
#define __NICE_OUTPUT_STREAM_H__
#ifndef __NICE_PSEUDO_TCP_OUTPUT_STREAM_H__
#define __NICE_PSEUDO_TCP_OUTPUT_STREAM_H__
#include <glib-object.h>
#include <gio/gio.h>
#include "agent.h"
G_BEGIN_DECLS
#include "pseudotcp.h"
/* TYPE MACROS */
#define NICE_TYPE_OUTPUT_STREAM \
(nice_output_stream_get_type ())
#define NICE_OUTPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NICE_TYPE_OUTPUT_STREAM, \
NiceOutputStream))
#define NICE_OUTPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NICE_TYPE_OUTPUT_STREAM, \
NiceOutputStreamClass))
#define NICE_IS_OUTPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), NICE_TYPE_OUTPUT_STREAM))
#define NICE_IS_OUTPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), NICE_TYPE_OUTPUT_STREAM))
#define NICE_OUTPUT_STREAM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NICE_TYPE_OUTPUT_STREAM, \
NiceOutputStreamClass))
G_BEGIN_DECLS
#define NICE_TYPE_PSEUDO_TCP_OUTPUT_STREAM \
(nice_pseudo_tcp_output_stream_get_type ())
#define NICE_PSEUDO_TCP_OUTPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), NICE_TYPE_PSEUDO_TCP_OUTPUT_STREAM, \
NicePseudoTcpOutputStream))
#define NICE_PSEUDO_TCP_OUTPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), NICE_TYPE_PSEUDO_TCP_OUTPUT_STREAM, \
NicePseudoTcpOutputStreamClass))
#define NICE_IS_PSEUDO_TCP_OUTPUT_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), NICE_TYPE_PSEUDO_TCP_OUTPUT_STREAM))
#define NICE_IS_PSEUDO_TCP_OUTPUT_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), NICE_TYPE_PSEUDO_TCP_OUTPUT_STREAM))
#define NICE_PSEUDO_TCP_OUTPUT_STREAM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), NICE_TYPE_PSEUDO_TCP_OUTPUT_STREAM, \
NicePseudoTcpOutputStreamClass))
typedef struct _NiceOutputStreamPrivate NiceOutputStreamPrivate;
typedef struct _NiceOutputStreamClass NiceOutputStreamClass;
typedef struct _NiceOutputStream NiceOutputStream;
typedef struct _NicePseudoTcpOutputStreamClass NicePseudoTcpOutputStreamClass;
typedef struct _NicePseudoTcpOutputStream NicePseudoTcpOutputStream;
#include "agent.h"
GType nice_output_stream_get_type (void);
GType nice_pseudo_tcp_output_stream_get_type (void);
struct _NiceOutputStreamClass
struct _NicePseudoTcpOutputStreamClass
{
GOutputStreamClass parent_class;
};
struct _NiceOutputStream
struct _NicePseudoTcpOutputStream
{
GOutputStream parent_instance;
NiceOutputStreamPrivate *priv;
};
NiceOutputStream *nice_output_stream_new (NiceAgent *agent,
guint stream_id, guint component_id);
GOutputStream *nice_pseudo_tcp_output_stream_new (PseudoTcpSocket *socket);
G_END_DECLS
#endif /* __NICE_OUTPUT_STREAM_H__ */
#endif /* __NICE_PSEUDO_TCP_OUTPUT_STREAM_H__ */
This diff is collapsed.
This diff is collapsed.
......@@ -103,27 +103,6 @@ nice_stream_find_component_by_id (NiceStream *stream, guint id)
return NULL;
}
/*
* Returns true if all components of the stream are either
* 'CONNECTED' or 'READY' (connected plus nominated).
*/
gboolean
nice_stream_all_components_ready (NiceStream *stream)
{
GSList *i;
for (i = stream->components; i; i = i->next) {
NiceComponent *component = i->data;
if (component &&
!(component->state == NICE_COMPONENT_STATE_CONNECTED ||
component->state == NICE_COMPONENT_STATE_READY))
return FALSE;
}
return TRUE;
}
/*
* Initialized the local crendentials for the stream.
*/
......
......@@ -103,9 +103,6 @@ nice_stream_new (guint n_components, NiceAgent *agent);
void
nice_stream_close (NiceStream *stream);
gboolean
nice_stream_all_components_ready (NiceStream *stream);
NiceComponent *
nice_stream_find_component_by_id (NiceStream *stream, guint id);
......
This diff is collapsed.
......@@ -55,7 +55,7 @@ CFILE_GLOB=$(top_srcdir)/agent/agent.c \
# Header files to ignore when scanning.
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES= conncheck.h discovery.h stream.h component.h agent-priv.h \
iostream.h inputstream.h outputstream.h \
datagram-based.h \
gstnice.h gstnicesrc.h gstnicesink.h \
md5.h sha1.h stunhmac.h utils.h rand.h stun5389.h stuncrc32.h \
stund.h agent-signals-marshal.h win32_common.h
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.