Changeset 3841 for pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
- Timestamp:
- Oct 24, 2011 9:28:13 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r3796 r3841 540 540 541 541 /** 542 * This enumeration specifies the options for custom media transport creation. 543 */ 544 typedef enum pjsua_create_media_transport_flag 545 { 546 /** 547 * This flag indicates that the media transport must also close its 548 * "member" or "child" transport when pjmedia_transport_close() is 549 * called. If this flag is not specified, then the media transport 550 * must not call pjmedia_transport_close() of its member transport. 551 */ 552 PJSUA_MED_TP_CLOSE_MEMBER = 1 553 554 } pjsua_create_media_transport_flag; 555 556 557 /** 542 558 * This structure describes application callback to receive various event 543 559 * notification from PJSUA-API. All of these callbacks are OPTIONAL, … … 706 722 707 723 724 /** 725 * Notify application when registration or unregistration has been 726 * initiated. Note that this only notifies the initial registration 727 * and unregistration. Once registration session is active, subsequent 728 * refresh will not cause this callback to be called. 729 * 730 * @param acc_id The account ID. 731 * @param renew Non-zero for registration and zero for 732 * unregistration. 733 */ 734 void (*on_reg_started)(pjsua_acc_id acc_id, pj_bool_t renew); 735 708 736 /** 709 737 * Notify application when registration status has changed. … … 1075 1103 pjmedia_event *event); 1076 1104 1105 /** 1106 * This callback can be used by application to implement custom media 1107 * transport adapter for the call, or to replace the media transport 1108 * with something completely new altogether. 1109 * 1110 * This callback is called when a new call is created. The library has 1111 * created a media transport for the call, and it is provided as the 1112 * \a base_tp argument of this callback. Upon returning, the callback 1113 * must return an instance of media transport to be used by the call. 1114 * 1115 * @param call_id Call ID 1116 * @param media_idx The media index in the SDP for which this media 1117 * transport will be used. 1118 * @param base_tp The media transport which otherwise will be 1119 * used by the call has this callback not been 1120 * implemented. 1121 * @param flags Bitmask from pjsua_create_media_transport_flag. 1122 * 1123 * @return The callback must return an instance of media 1124 * transport to be used by the call. 1125 */ 1126 pjmedia_transport* (*on_create_media_transport)(pjsua_call_id call_id, 1127 unsigned media_idx, 1128 pjmedia_transport *base_tp, 1129 unsigned flags); 1130 1077 1131 } pjsua_callback; 1078 1132 … … 1108 1162 1109 1163 } pjsua_sip_timer_use; 1164 1165 1166 /** 1167 * This constants controls the use of 100rel extension. 1168 */ 1169 typedef enum pjsua_100rel_use 1170 { 1171 /** 1172 * Not used. For UAC, support for 100rel will be indicated in Supported 1173 * header so that peer can opt to use it if it wants to. As UAS, this 1174 * option will NOT cause 100rel to be used even if UAC indicates that 1175 * it supports this feature. 1176 */ 1177 PJSUA_100REL_NOT_USED, 1178 1179 /** 1180 * Mandatory. UAC will place 100rel in Require header, and UAS will 1181 * reject incoming calls unless it has 100rel in Supported header. 1182 */ 1183 PJSUA_100REL_MANDATORY, 1184 1185 /** 1186 * Optional. Similar to PJSUA_100REL_NOT_USED, except that as UAS, this 1187 * option will cause 100rel to be used if UAC indicates that it supports it. 1188 */ 1189 PJSUA_100REL_OPTIONAL 1190 1191 } pjsua_100rel_use; 1110 1192 1111 1193 … … 1246 1328 1247 1329 /** 1248 * Specify whether support for reliable provisional response (100rel and1249 * PRACK) should be required by default. Note that this setting can be1330 * Specify how the support for reliable provisional response (100rel/ 1331 * PRACK) should be used by default. Note that this setting can be 1250 1332 * further customized in account configuration (#pjsua_acc_config). 1251 1333 * 1252 * Default: PJ _FALSE1253 */ 1254 pj _bool_trequire_100rel;1334 * Default: PJSUA_100REL_NOT_USED 1335 */ 1336 pjsua_100rel_use require_100rel; 1255 1337 1256 1338 /** … … 1367 1449 1368 1450 /** 1451 * Flags to be given to pjsua_destroy2() 1452 */ 1453 typedef enum pjsua_destroy_flag 1454 { 1455 /** 1456 * Allow sending outgoing messages (such as unregistration, event 1457 * unpublication, BYEs, unsubscription, etc.), but do not wait for 1458 * responses. This is useful to perform "best effort" clean up 1459 * without delaying the shutdown process waiting for responses. 1460 */ 1461 PJSUA_DESTROY_NO_RX_MSG = 1, 1462 1463 /** 1464 * If this flag is set, do not send any outgoing messages at all. 1465 * This flag is useful if application knows that the network which 1466 * the messages are to be sent on is currently down. 1467 */ 1468 PJSUA_DESTROY_NO_TX_MSG = 2, 1469 1470 /** 1471 * Do not send or receive messages during destroy. This flag is 1472 * shorthand for PJSUA_DESTROY_NO_RX_MSG + PJSUA_DESTROY_NO_TX_MSG. 1473 */ 1474 PJSUA_DESTROY_NO_NETWORK = PJSUA_DESTROY_NO_RX_MSG | 1475 PJSUA_DESTROY_NO_TX_MSG 1476 1477 } pjsua_destroy_flag; 1478 1479 /** 1369 1480 * Use this function to initialize pjsua config. 1370 1481 * … … 1514 1625 * keep track of it's state. 1515 1626 * 1627 * @see pjsua_destroy2() 1628 * 1516 1629 * @return PJ_SUCCESS on success, or the appropriate error code. 1517 1630 */ … … 1525 1638 */ 1526 1639 PJ_DECL(pjsua_state) pjsua_get_state(void); 1640 1641 1642 /** 1643 * Variant of destroy with additional flags. 1644 * 1645 * @param flags Combination of pjsua_destroy_flag enumeration. 1646 * 1647 * @return PJ_SUCCESS on success, or the appropriate error code. 1648 */ 1649 PJ_DECL(pj_status_t) pjsua_destroy2(unsigned flags); 1527 1650 1528 1651 … … 2396 2519 2397 2520 /** 2398 * Specify whether support for reliable provisional response (100rel and 2399 * PRACK) should be required for all sessions of this account. 2400 * 2401 * Default: PJ_FALSE 2402 */ 2403 pj_bool_t require_100rel; 2521 * Specify how support for reliable provisional response (100rel/ 2522 * PRACK) should be used for all sessions in this account. See the 2523 * documentation of pjsua_100rel_use enumeration for more info. 2524 * 2525 * Default: The default value is taken from the value of 2526 * require_100rel in pjsua_config. 2527 */ 2528 pjsua_100rel_use require_100rel; 2404 2529 2405 2530 /** … … 2677 2802 * Specify interval of auto registration retry upon registration failure 2678 2803 * (including caused by transport problem), in second. Set to 0 to 2679 * disable auto re-registration. 2804 * disable auto re-registration. Note that if the registration retry 2805 * occurs because of transport failure, the first retry will be done 2806 * after \a reg_first_retry_interval seconds instead. Also note that 2807 * the interval will be randomized slightly by approximately +/- ten 2808 * seconds to avoid all clients re-registering at the same time. 2809 * 2810 * See also \a reg_first_retry_interval setting. 2680 2811 * 2681 2812 * Default: #PJSUA_REG_RETRY_INTERVAL 2682 2813 */ 2683 2814 unsigned reg_retry_interval; 2815 2816 /** 2817 * This specifies the interval for the first registration retry. The 2818 * registration retry is explained in \a reg_retry_interval. Note that 2819 * the value here will also be randomized by +/- ten seconds. 2820 * 2821 * Default: 0 2822 */ 2823 unsigned reg_first_retry_interval; 2684 2824 2685 2825 /** … … 2722 2862 */ 2723 2863 pjsua_call_hold_type call_hold_type; 2864 2865 2866 /** 2867 * Specify whether the account should register as soon as it is 2868 * added to the UA. Application can set this to PJ_FALSE and control 2869 * the registration manually with pjsua_acc_set_registration(). 2870 * 2871 * Default: PJ_TRUE 2872 */ 2873 pj_bool_t register_on_acc_add; 2724 2874 2725 2875 } pjsua_acc_config;
Note: See TracChangeset
for help on using the changeset viewer.