summaryrefslogtreecommitdiff
path: root/pjnath/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-10-14 13:13:18 +0000
committerBenny Prijono <bennylp@teluu.com>2009-10-14 13:13:18 +0000
commit4533e1452749d9c4060d63971eabc7a6baeb9e1e (patch)
treeb12b132dd8af76ba68df84a2ba3d45b60824578a /pjnath/include
parent6bdbb51b9b880efd0f2f9d833189bdfc8e469934 (diff)
Ticket #881: send UPDATE or re-INVITE after ICE negotiation, if the default candidate has changed
- done - added pj_ice_strans_state (to be used for informational purposes for now) - added pjmedia ICE transport specific info, and display it in call dump output - misc fixes (changed pjmedia_transport_info.spec_info_cnt from int to unsigned) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2945 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjnath/include')
-rw-r--r--pjnath/include/pjnath/ice_strans.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/pjnath/include/pjnath/ice_strans.h b/pjnath/include/pjnath/ice_strans.h
index 28487870..c021dde7 100644
--- a/pjnath/include/pjnath/ice_strans.h
+++ b/pjnath/include/pjnath/ice_strans.h
@@ -327,6 +327,51 @@ typedef struct pj_ice_strans_cfg
} pj_ice_strans_cfg;
+/**
+ * ICE stream transport's state.
+ */
+typedef enum pj_ice_strans_state
+{
+ /**
+ * ICE stream transport is not created.
+ */
+ PJ_ICE_STRANS_STATE_NULL,
+
+ /**
+ * ICE candidate gathering process is in progress.
+ */
+ PJ_ICE_STRANS_STATE_INIT,
+
+ /**
+ * ICE stream transport initialization/candidate gathering process is
+ * complete, ICE session may be created on this stream transport.
+ */
+ PJ_ICE_STRANS_STATE_READY,
+
+ /**
+ * New session has been created and the session is ready.
+ */
+ PJ_ICE_STRANS_STATE_SESS_READY,
+
+ /**
+ * ICE negotiation is in progress.
+ */
+ PJ_ICE_STRANS_STATE_NEGO,
+
+ /**
+ * ICE negotiation has completed successfully and media is ready
+ * to be used.
+ */
+ PJ_ICE_STRANS_STATE_RUNNING,
+
+ /**
+ * ICE negotiation has completed with failure.
+ */
+ PJ_ICE_STRANS_STATE_FAILED
+
+} pj_ice_strans_state;
+
+
/**
* Initialize ICE transport configuration with default values.
*
@@ -371,6 +416,26 @@ PJ_DECL(pj_status_t) pj_ice_strans_create(const char *name,
pj_ice_strans **p_ice_st);
/**
+ * Get ICE session state.
+ *
+ * @param ice_st The ICE stream transport.
+ *
+ * @return ICE session state.
+ */
+PJ_DECL(pj_ice_strans_state) pj_ice_strans_get_state(pj_ice_strans *ice_st);
+
+
+/**
+ * Get string representation of ICE state.
+ *
+ * @param state ICE stream transport state.
+ *
+ * @return String.
+ */
+PJ_DECL(const char*) pj_ice_strans_state_name(pj_ice_strans_state state);
+
+
+/**
* Destroy the ICE stream transport. This will destroy the ICE session
* inside the ICE stream transport, close all sockets and release all
* other resources.