Ignore:
Timestamp:
Jul 13, 2015 7:56:19 AM (9 years ago)
Author:
ming
Message:

Fixed #1867: Add pjsua callback to notify when STUN resolution completes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r5125 r5131  
    284284typedef struct pjsua_msg_data pjsua_msg_data; 
    285285 
     286/** Forward declaration for pj_stun_resolve_result */ 
     287typedef struct pj_stun_resolve_result pj_stun_resolve_result; 
     288 
    286289 
    287290/** 
     
    558561(*pjsua_med_tp_state_cb)(pjsua_call_id call_id, 
    559562                         const pjsua_med_tp_state_info *info); 
     563 
     564 
     565/** 
     566 * Typedef of callback to be registered to #pjsua_resolve_stun_servers() 
     567 * and to be called when STUN resolution completes. 
     568 */ 
     569typedef void (*pj_stun_resolve_cb)(const pj_stun_resolve_result *result); 
    560570 
    561571 
     
    13521362                                     pjsua_acc_id* acc_id); 
    13531363 
     1364    /** 
     1365     * Calling #pjsua_init() will initiate an async process to resolve and 
     1366     * contact each of the STUN server entries to find which is usable. 
     1367     * This callback is called when the process is complete, and can be 
     1368     * used by the application to start creating and registering accounts. 
     1369     * This way, the accounts can avoid call setup delay caused by pending 
     1370     * STUN resolution. 
     1371     * 
     1372     * See also #pj_stun_resolve_cb. 
     1373     */ 
     1374    pj_stun_resolve_cb on_stun_resolution_complete; 
     1375 
    13541376} pjsua_callback; 
    13551377 
     
    19701992 * This structure will be passed in #pj_stun_resolve_cb callback. 
    19711993 */ 
    1972 typedef struct pj_stun_resolve_result 
     1994struct pj_stun_resolve_result 
    19731995{ 
    19741996    /** 
     
    19972019    pj_sockaddr      addr; 
    19982020 
    1999 } pj_stun_resolve_result; 
    2000  
    2001  
    2002 /** 
    2003  * Typedef of callback to be registered to #pjsua_resolve_stun_servers(). 
    2004  */ 
    2005 typedef void (*pj_stun_resolve_cb)(const pj_stun_resolve_result *result); 
     2021}; 
     2022 
    20062023 
    20072024/** 
Note: See TracChangeset for help on using the changeset viewer.