summaryrefslogtreecommitdiff
path: root/agent/agent.h
diff options
context:
space:
mode:
authorKai Vehmanen <first.surname@nokia.com>2007-06-19 08:06:00 +0000
committerKai Vehmanen <first.surname@nokia.com>2007-06-19 08:06:00 +0000
commit181d9d56df9332544f72a856e51cff62f45a15ad (patch)
tree3d42a16ed0bd2ec9f98eac0645494110e1852adf /agent/agent.h
parent99ff130b9bc44c75a30ee60078d1548d61f99270 (diff)
downloadlibnice-181d9d56df9332544f72a856e51cff62f45a15ad.tar.gz
Major NICE agent update. Added supprt for peer-reflexive candidates, media keepalives, candidate keepalives, role conflict tie-breaking functionality, and for triggered checks. Added NICEAPI_EXPORT attributes to public functions. Includes numerous bugfixes to existing functionality.
darcs-hash:20070619080609-77cd4-d18bf44fe48a201e59556ae5a9dff2b5a2e7e073.gz
Diffstat (limited to 'agent/agent.h')
-rw-r--r--agent/agent.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/agent/agent.h b/agent/agent.h
index ece9114..4ffe4f9 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -70,6 +70,13 @@ G_BEGIN_DECLS
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
NICE_TYPE_AGENT, NiceAgentClass))
+/**
+ * A hard limit for number for remote candidates. This
+ * limit is enforced to protect against malevolent remote
+ * clients.
+ */
+#define NICE_AGENT_MAX_REMOTE_CANDIDATES 25
+
typedef enum
{
NICE_COMPONENT_STATE_DISCONNECTED, /* no activity scheduled */
@@ -92,13 +99,13 @@ typedef enum
typedef struct _NiceCandidateDesc NiceCandidateDesc;
struct _NiceCandidateDesc {
- const gchar *foundation;
+ gchar *foundation;
guint component_id;
NiceCandidateTransport transport;
guint32 priority;
- const NiceAddress *addr;
+ NiceAddress *addr;
NiceCandidateType type;
- const NiceAddress *related_addr; /* optional */
+ NiceAddress *related_addr; /* optional */
};
typedef struct _NiceAgent NiceAgent;
@@ -120,7 +127,7 @@ GType nice_agent_get_type (void);
NiceAgent *
nice_agent_new (NiceUDPSocketFactory *factory);
-void
+gboolean
nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr);
guint
@@ -145,7 +152,7 @@ nice_agent_get_local_credentials (
guint stream_id,
const gchar **ufrag, const gchar **pwd);
-void
+gboolean
nice_agent_add_remote_candidate (
NiceAgent *agent,
guint stream_id,
@@ -155,12 +162,12 @@ nice_agent_add_remote_candidate (
const gchar *username,
const gchar *password);
-void
+int
nice_agent_set_remote_candidates (
NiceAgent *agent,
guint stream_id,
guint component_id,
- GSList *candidates);
+ const GSList *candidates);
guint
nice_agent_recv (
@@ -186,7 +193,7 @@ nice_agent_poll_read (
NiceAgentRecvFunc func,
gpointer data);
-void
+gint
nice_agent_send (
NiceAgent *agent,
guint stream_id,