summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-06-06 14:50:13 +0000
committerBenny Prijono <bennylp@teluu.com>2008-06-06 14:50:13 +0000
commit5ac557ce4cbeeca1747e14fbf2769d77d23c332d (patch)
tree47264de5a70807ca3f1b1e041b76fca9f9d36f8a /pjmedia/include
parent8ec5bd6b3d5bafb1d3ab11236a3adc45ac5f04d8 (diff)
More ticket #485: major modification in transport_ice to support new ICE stream transport API
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1989 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/transport_ice.h94
1 files changed, 5 insertions, 89 deletions
diff --git a/pjmedia/include/pjmedia/transport_ice.h b/pjmedia/include/pjmedia/transport_ice.h
index c64ac9bc..f3fc9a04 100644
--- a/pjmedia/include/pjmedia/transport_ice.h
+++ b/pjmedia/include/pjmedia/transport_ice.h
@@ -48,9 +48,11 @@ typedef struct pjmedia_ice_cb
* This callback will be called when ICE negotiation completes.
*
* @param tp PJMEDIA ICE transport.
- * @param status ICE negotiation result, PJ_SUCCESS on success.
+ * @param op The operation
+ * @param status Operation status.
*/
void (*on_ice_complete)(pjmedia_transport *tp,
+ pj_ice_strans_op op,
pj_status_t status);
} pjmedia_ice_cb;
@@ -62,7 +64,7 @@ typedef struct pjmedia_ice_cb
* @param name Optional name to identify this ICE media transport
* for logging purposes.
* @param comp_cnt Number of components to be created.
- * @param stun_cfg Pointer to STUN configuration settings.
+ * @param cfg Pointer to configuration settings.
* @param cb Optional callbacks.
* @param p_tp Pointer to receive the media transport instance.
*
@@ -71,96 +73,10 @@ typedef struct pjmedia_ice_cb
PJ_DECL(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt,
const char *name,
unsigned comp_cnt,
- pj_stun_config *stun_cfg,
+ const pj_ice_strans_cfg *cfg,
const pjmedia_ice_cb *cb,
pjmedia_transport **p_tp);
-
-/**
- * Start the initialization process of this media transport. This function
- * will gather the transport addresses to be registered to ICE session as
- * candidates. If STUN is configured, this will start the STUN Binding or
- * Allocate request to get the STUN server reflexive or relayed address.
- * This function will return immediately, and application should poll the
- * STUN completion status by calling #pjmedia_ice_get_init_status().
- *
- * @param tp The media transport.
- * @param options Options, see pj_ice_strans_option in PJNATH
- * documentation.
- * @param start_addr Local address where socket will be bound to. This
- * address will be used as follows:
- * - if the value is NULL, then socket will be bound
- * to any available port.
- * - if the value is not NULL, then if the port number
- * is not zero, it will used as the starting port
- * where the socket will be bound to. If bind() to
- * this port fails, this function will try to bind
- * to port+2, repeatedly until it succeeded.
- * If application doesn't want this function to
- * retry binding the socket to other port, it can
- * specify PJ_ICE_ST_OPT_NO_PORT_RETRY option.
- * - if the value is not NULL, then if the address
- * is not INADDR_ANY, this function will bind the
- * socket to this particular interface only, and
- * no other host candidates will be added for this
- * socket.
- * @param stun_srv Address of the STUN server, or NULL if STUN server
- * reflexive mapping is not to be used.
- * @param turn_srv Address of the TURN server, or NULL if TURN relay
- * is not to be used.
- *
- * @return PJ_SUCCESS when the initialization process has started
- * successfully, or the appropriate error code.
- */
-PJ_DECL(pj_status_t) pjmedia_ice_start_init(pjmedia_transport *tp,
- unsigned options,
- const pj_sockaddr_in *start_addr,
- const pj_sockaddr_in *stun_srv,
- const pj_sockaddr_in *turn_srv);
-
-/**
- * Poll the initialization status of this media transport.
- *
- * @param tp The media transport.
- *
- * @return PJ_SUCCESS if all candidates have been resolved
- * successfully, PJ_EPENDING if transport resolution
- * is still in progress, or other status on failure.
- */
-PJ_DECL(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp);
-
-
-/**
- * Get the ICE stream transport component for the specified component ID.
- *
- * @param tp The media transport.
- * @param comp_id The component ID.
- * @param comp The structure which will be filled with the
- * component.
- *
- * @return PJ_SUCCESS or the appropriate error code.
- */
-PJ_DECL(pj_status_t) pjmedia_ice_get_comp(pjmedia_transport *tp,
- unsigned comp_id,
- pj_ice_strans_comp *comp);
-
-/**
- * Initialize the ICE session.
- *
- * @param tp The media transport.
- * @param role ICE role.
- * @param local_ufrag Optional local username fragment.
- * @param local_passwd Optional local password.
- *
- * @return PJ_SUCCESS, or the appropriate error code.
-
- */
-PJ_DECL(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp,
- pj_ice_sess_role role,
- const pj_str_t *local_ufrag,
- const pj_str_t *local_passwd);
-
-
PJ_END_DECL