Changeset 5131
- Timestamp:
- Jul 13, 2015 7:56:19 AM (9 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r5125 r5131 284 284 typedef struct pjsua_msg_data pjsua_msg_data; 285 285 286 /** Forward declaration for pj_stun_resolve_result */ 287 typedef struct pj_stun_resolve_result pj_stun_resolve_result; 288 286 289 287 290 /** … … 558 561 (*pjsua_med_tp_state_cb)(pjsua_call_id call_id, 559 562 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 */ 569 typedef void (*pj_stun_resolve_cb)(const pj_stun_resolve_result *result); 560 570 561 571 … … 1352 1362 pjsua_acc_id* acc_id); 1353 1363 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 1354 1376 } pjsua_callback; 1355 1377 … … 1970 1992 * This structure will be passed in #pj_stun_resolve_cb callback. 1971 1993 */ 1972 typedefstruct pj_stun_resolve_result1994 struct pj_stun_resolve_result 1973 1995 { 1974 1996 /** … … 1997 2019 pj_sockaddr addr; 1998 2020 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 2006 2023 2007 2024 /** -
pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp
r5123 r5131 1182 1182 /** 1183 1183 * Callback when the Endpoint has finished performing STUN server 1184 * checking that is initiated with natCheckStunServers(). 1184 * checking that is initiated when calling libInit(), or by 1185 * calling natCheckStunServers(). 1185 1186 * 1186 1187 * @param prm Callback parameters. -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5127 r5131 1472 1472 } 1473 1473 } 1474 1475 if (pjsua_var.ua_cfg.cb.on_stun_resolution_complete) 1476 (*pjsua_var.ua_cfg.cb.on_stun_resolution_complete)(result); 1474 1477 } 1475 1478 -
pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
r5123 r5131 1278 1278 ua_cfg.cb.on_call_media_event = &Endpoint::on_call_media_event; 1279 1279 ua_cfg.cb.on_create_media_transport = &Endpoint::on_create_media_transport; 1280 ua_cfg.cb.on_stun_resolution_complete = 1281 &Endpoint::stun_resolve_cb; 1280 1282 1281 1283 /* Init! */
Note: See TracChangeset
for help on using the changeset viewer.