Changeset 1989 for pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h
- Timestamp:
- Jun 6, 2008 2:50:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h
r1735 r1989 49 49 * 50 50 * @param tp PJMEDIA ICE transport. 51 * @param status ICE negotiation result, PJ_SUCCESS on success. 51 * @param op The operation 52 * @param status Operation status. 52 53 */ 53 54 void (*on_ice_complete)(pjmedia_transport *tp, 55 pj_ice_strans_op op, 54 56 pj_status_t status); 55 57 … … 63 65 * for logging purposes. 64 66 * @param comp_cnt Number of components to be created. 65 * @param stun_cfg Pointer to STUNconfiguration settings.67 * @param cfg Pointer to configuration settings. 66 68 * @param cb Optional callbacks. 67 69 * @param p_tp Pointer to receive the media transport instance. … … 72 74 const char *name, 73 75 unsigned comp_cnt, 74 pj_stun_config *stun_cfg,76 const pj_ice_strans_cfg *cfg, 75 77 const pjmedia_ice_cb *cb, 76 78 pjmedia_transport **p_tp); 77 78 79 /**80 * Start the initialization process of this media transport. This function81 * will gather the transport addresses to be registered to ICE session as82 * candidates. If STUN is configured, this will start the STUN Binding or83 * Allocate request to get the STUN server reflexive or relayed address.84 * This function will return immediately, and application should poll the85 * STUN completion status by calling #pjmedia_ice_get_init_status().86 *87 * @param tp The media transport.88 * @param options Options, see pj_ice_strans_option in PJNATH89 * documentation.90 * @param start_addr Local address where socket will be bound to. This91 * address will be used as follows:92 * - if the value is NULL, then socket will be bound93 * to any available port.94 * - if the value is not NULL, then if the port number95 * is not zero, it will used as the starting port96 * where the socket will be bound to. If bind() to97 * this port fails, this function will try to bind98 * to port+2, repeatedly until it succeeded.99 * If application doesn't want this function to100 * retry binding the socket to other port, it can101 * specify PJ_ICE_ST_OPT_NO_PORT_RETRY option.102 * - if the value is not NULL, then if the address103 * is not INADDR_ANY, this function will bind the104 * socket to this particular interface only, and105 * no other host candidates will be added for this106 * socket.107 * @param stun_srv Address of the STUN server, or NULL if STUN server108 * reflexive mapping is not to be used.109 * @param turn_srv Address of the TURN server, or NULL if TURN relay110 * is not to be used.111 *112 * @return PJ_SUCCESS when the initialization process has started113 * successfully, or the appropriate error code.114 */115 PJ_DECL(pj_status_t) pjmedia_ice_start_init(pjmedia_transport *tp,116 unsigned options,117 const pj_sockaddr_in *start_addr,118 const pj_sockaddr_in *stun_srv,119 const pj_sockaddr_in *turn_srv);120 121 /**122 * Poll the initialization status of this media transport.123 *124 * @param tp The media transport.125 *126 * @return PJ_SUCCESS if all candidates have been resolved127 * successfully, PJ_EPENDING if transport resolution128 * is still in progress, or other status on failure.129 */130 PJ_DECL(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp);131 132 133 /**134 * Get the ICE stream transport component for the specified component ID.135 *136 * @param tp The media transport.137 * @param comp_id The component ID.138 * @param comp The structure which will be filled with the139 * component.140 *141 * @return PJ_SUCCESS or the appropriate error code.142 */143 PJ_DECL(pj_status_t) pjmedia_ice_get_comp(pjmedia_transport *tp,144 unsigned comp_id,145 pj_ice_strans_comp *comp);146 147 /**148 * Initialize the ICE session.149 *150 * @param tp The media transport.151 * @param role ICE role.152 * @param local_ufrag Optional local username fragment.153 * @param local_passwd Optional local password.154 *155 * @return PJ_SUCCESS, or the appropriate error code.156 157 */158 PJ_DECL(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp,159 pj_ice_sess_role role,160 const pj_str_t *local_ufrag,161 const pj_str_t *local_passwd);162 163 79 164 80 PJ_END_DECL
Note: See TracChangeset
for help on using the changeset viewer.