Ignore:
Timestamp:
Jun 19, 2008 1:54:21 PM (16 years ago)
Author:
bennylp
Message:

Added new API's in ICE stream transport to assist offer/answer negotiation: pj_ice_strans_has_sess(), pj_ice_strans_sess_is_running(), pj_ice_strans_sess_is_complete(), pj_ice_strans_get_running_comp_cnt(), pj_ice_strans_get_ufrag_pwd(), and PJNATH_EICEMISMATCH error code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/ice_strans.h

    r1988 r2031  
    350350 
    351351/** 
     352 * Check if the ICE stream transport has the ICE session created. The 
     353 * ICE session is created with #pj_ice_strans_init_ice(). 
     354 * 
     355 * @param ice_st        The ICE stream transport. 
     356 * 
     357 * @return              PJ_TRUE if #pj_ice_strans_init_ice() has been 
     358 *                      called. 
     359 */ 
     360PJ_DECL(pj_bool_t) pj_ice_strans_has_sess(pj_ice_strans *ice_st); 
     361 
     362 
     363/** 
     364 * Check if ICE negotiation is still running. 
     365 * 
     366 * @param ice_st        The ICE stream transport. 
     367 * 
     368 * @return              PJ_TRUE if ICE session has been created and ICE  
     369 *                      negotiation negotiation is in progress. 
     370 */ 
     371PJ_DECL(pj_bool_t) pj_ice_strans_sess_is_running(pj_ice_strans *ice_st); 
     372 
     373 
     374/** 
     375 * Check if ICE negotiation has completed. 
     376 * 
     377 * @param ice_st        The ICE stream transport. 
     378 * 
     379 * @return              PJ_TRUE if ICE session has been created and the 
     380 *                      negotiation is complete. 
     381 */ 
     382PJ_DECL(pj_bool_t) pj_ice_strans_sess_is_complete(pj_ice_strans *ice_st); 
     383 
     384 
     385/** 
     386 * Get the current/running component count. If ICE negotiation has not 
     387 * been started, the number of components will be equal to the number 
     388 * when the ICE stream transport was created. Once negotiation been 
     389 * started, the number of components will be the lowest number of  
     390 * component between local and remote agents. 
     391 * 
     392 * @param ice_st        The ICE stream transport. 
     393 * 
     394 * @return              The running number of components. 
     395 */ 
     396PJ_DECL(unsigned) pj_ice_strans_get_running_comp_cnt(pj_ice_strans *ice_st); 
     397 
     398 
     399/** 
     400 * Get the ICE username fragment and password of the ICE session. The 
     401 * local username fragment and password can only be retrieved once ICE 
     402 * session has been created with #pj_ice_strans_init_ice(). The remote 
     403 * username fragment and password can only be retrieved once ICE session 
     404 * has been started with #pj_ice_strans_start_ice(). 
     405 * 
     406 * Note that the string returned by this function is only valid throughout 
     407 * the duration of the ICE session, and the application must not modify 
     408 * these strings. Once the ICE session has been stopped with 
     409 * #pj_ice_strans_stop_ice(), the pointer in the string will no longer be 
     410 * valid. 
     411 * 
     412 * @param ice_st        The ICE stream transport. 
     413 * @param loc_ufrag     Optional pointer to receive ICE username fragment 
     414 *                      of local endpoint from the ICE session. 
     415 * @param loc_pwd       Optional pointer to receive ICE password of local 
     416 *                      endpoint from the ICE session. 
     417 * @param rem_ufrag     Optional pointer to receive ICE username fragment 
     418 *                      of remote endpoint from the ICE session. 
     419 * @param rem_pwd       Optional pointer to receive ICE password of remote 
     420 *                      endpoint from the ICE session. 
     421 * 
     422 * @return              PJ_SUCCESS if the strings have been retrieved 
     423 *                      successfully. 
     424 */ 
     425PJ_DECL(pj_status_t) pj_ice_strans_get_ufrag_pwd(pj_ice_strans *ice_st, 
     426                                                 pj_str_t *loc_ufrag, 
     427                                                 pj_str_t *loc_pwd, 
     428                                                 pj_str_t *rem_ufrag, 
     429                                                 pj_str_t *rem_pwd); 
     430 
     431 
     432/** 
    352433 * Enumerate the local candidates for the specified component. 
    353434 * 
Note: See TracChangeset for help on using the changeset viewer.