- Timestamp:
- Jun 3, 2009 8:40:24 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r2724 r2738 56 56 57 57 /** 58 * @defgroup PJSUA_LIB PJSUA API - High Level Softphone API for C/C++ and Python58 * @defgroup PJSUA_LIB PJSUA API - High Level Softphone API 59 59 * @brief Very high level API for constructing SIP UA applications. 60 60 * @{ 61 61 * 62 * @section pjsua_api_intro A SIP User Agent API for C/C++ and Python 63 * 64 * PJSUA API is very high level API, available for C/C++ and Python language, 65 * for constructing SIP multimedia user agent 62 * @section pjsua_api_intro A SIP User Agent API for C/C++ 63 * 64 * PJSUA API is very high level API for constructing SIP multimedia user agent 66 65 * applications. It wraps together the signaling and media functionalities 67 66 * into an easy to use call API, provides account management, buddy … … 86 85 * page. 87 86 * 88 * @subsection pjsua_for_python Python Binding89 *90 * The Python binding for PJSUA-API is implemented by <b>py_pjsua</b>91 * module, in <tt>pjsip-apps/py_pjsua</tt> directory. This module is92 * built by building <tt>py_pjsua</tt> project in <tt>pjsip_apps</tt>93 * Visual Studio workspace, or by invoking the usual <tt>setup.py</tt>94 * Python installer script.95 *96 * The Python script then can import the PJSUA-API Python module by97 * using <b>import py_pjsua</b> construct as usual.98 *99 *100 87 * @section pjsua_samples 101 88 * 102 * Few samples are provided both in C and Python.89 * Few samples are provided: 103 90 * 104 91 - @ref page_pjsip_sample_simple_pjsuaua_c\n … … 112 99 available in PJSIP and PJMEDIA.\n 113 100 114 - Python sample\n115 For a real simple Python sample application, have a look at116 <A HREF="http://www.pjsip.org/trac/browser/pjproject/trunk/pjsip-apps/src/py_pjsua/pjsua_app.py">117 <tt>pjsip-apps/src/py_pjsua/pjsua_app.py</tt></A> file.118 119 101 * @section root_using_pjsua_lib Using PJSUA API 120 102 * … … 143 125 * @subsection creating_pjsua_lib Creating PJSUA 144 126 * 145 * Before anything else, application must create PJSUA by calling #pjsua_create()146 * (or <tt>py_pjsua.create()</tt> from Python).127 * Before anything else, application must create PJSUA by calling 128 * #pjsua_create(). 147 129 * This, among other things, will initialize PJLIB, which is crucial before 148 130 * any PJLIB functions can be called, PJLIB-UTIL, and create a SIP endpoint. … … 207 189 * 208 190 * 209 * @subsubsection init_pjsua_lib_python PJSUA-LIB Initialization (in Python)210 * Sample code to initialize PJSUA in Python code:211 212 \code213 214 import py_pjsua215 216 #217 # Initialize pjsua.218 #219 def app_init():220 # Create pjsua before anything else221 status = py_pjsua.create()222 if status != 0:223 err_exit("pjsua create() error", status)224 225 # We use default logging config for this sample226 log_cfg = py_pjsua.logging_config_default()227 228 # Create and initialize pjsua config229 # Note: for this Python module, thread_cnt must be 0 since Python230 # doesn't like to be called from alien thread (pjsua's thread231 # in this case)232 ua_cfg = py_pjsua.config_default()233 ua_cfg.thread_cnt = 0234 ua_cfg.user_agent = "PJSUA/Python 0.1"235 236 # Override callbacks. At the very least application would want to237 # override the call callbacks in pjsua_config238 ua_cfg.cb.on_incoming_call = ...239 ua_cfg.cb.on_call_state = ...240 241 # Use default media config for this cample242 med_cfg = py_pjsua.media_config_default()243 244 #245 # Initialize pjsua!!246 #247 status = py_pjsua.init(ua_cfg, log_cfg, med_cfg)248 if status != 0:249 err_exit("pjsua init() error", status)250 251 252 253 # Utility: display PJ error and exit254 #255 def err_exit(title, rc):256 py_pjsua.perror(THIS_FILE, title, rc)257 exit(1)258 259 \endcode260 191 261 192 … … 315 246 \endcode 316 247 317 * @subsubsection starting_pjsua_lib_python Python Example for starting PJSUA318 * For Python, starting PJSUA-LIB takes one more step, that is to initialize319 * Python worker thread to poll PJSUA-LIB. This step is necessary because320 * Python doesn't like it when it is called by an "alien" thread (that is,321 * thread that is not created using Python API).322 *323 * Because of this, we cannot use a worker thread in PJSUA-LIB, because then324 * the Python callback will be called by an "alien" thread and this would325 * crash Python (or raise assert() probably).326 *327 * So because worker thread is disabled, we need to create a worker thread328 * in Python. Note that this may not be necessary if we're creating a329 * GUI application, because then we can attach, for example, a GUI timer330 * object to poll the PJSUA-LIB. But because we're creating a console331 * application which will block at <tt>sys.stdin.readline()</tt>, we need332 * to have a worker thread to poll PJSUA-LIB.333 334 \code335 336 import thread337 338 C_QUIT = 0339 340 341 def app_start():342 # Done with initialization, start pjsua!!343 #344 status = py_pjsua.start()345 if status != 0:346 py_pjsua.destroy()347 err_exit("Error starting pjsua!", status)348 349 # Start worker thread350 thr = thread.start_new(worker_thread_main, (0,))351 352 print "PJSUA Started!!"353 354 #355 # Worker thread function.356 # Python doesn't like it when it's called from an alien thread357 # (pjsua's worker thread, in this case), so for Python we must358 # disable worker thread in pjsua and poll pjsua from Python instead.359 #360 def worker_thread_main(arg):361 global C_QUIT362 thread_desc = 0363 status = py_pjsua.thread_register("python worker", thread_desc)364 if status != 0:365 py_pjsua.perror(THIS_FILE, "Error registering thread", status)366 else:367 while C_QUIT == 0:368 py_pjsua.handle_events(50)369 print "Worker thread quitting.."370 C_QUIT = 2371 372 373 \endcode374 248 */ 375 249 … … 436 310 * #pjsua_init(). Application must call #pjsua_logging_config_default() to 437 311 * initialize this structure with the default values. 438 *439 * \par Sample Python Syntax:440 * \code441 # Python type: py_pjsua.Logging_Config442 443 log_cfg = py_pjsua.logging_config_default()444 log_cfg.level = 4445 * \endcode446 312 */ 447 313 typedef struct pjsua_logging_config … … 486 352 * application specific device. This function will be called for 487 353 * log messages on input verbosity level. 488 *489 * \par Sample Python Syntax:490 * \code491 # level: integer492 # data: string493 # len: integer494 495 def cb(level, data, len):496 print data,497 * \endcode498 354 */ 499 355 void (*cb)(int level, const char *data, int len); … … 507 363 * 508 364 * @param cfg The logging config to be initialized. 509 *510 * \par Python Syntax:511 * The Python function instantiates and initialize the logging config:512 * \code513 logging_cfg = py_pjsua.logging_config_default()514 * \endcode515 365 */ 516 366 PJ_DECL(void) pjsua_logging_config_default(pjsua_logging_config *cfg); … … 523 373 * @param dst Destination config. 524 374 * @param src Source config. 525 *526 * \par Python Syntax:527 * Not available (for now). Ideally we should be able to just assign528 * one config to another, but this has not been tested.529 375 */ 530 376 PJ_DECL(void) pjsua_logging_config_dup(pj_pool_t *pool, … … 538 384 * although definitely application would want to implement some of 539 385 * the important callbacks (such as \a on_incoming_call). 540 *541 * \par Python Syntax:542 * This callback structure is embedded on pjsua_config structure.543 386 */ 544 387 typedef struct pjsua_callback … … 551 394 * @param call_id The call index. 552 395 * @param e Event which causes the call state to change. 553 *554 * \par Python Syntax:555 * \code556 # call_id: integer557 # e: an opaque object558 559 def on_call_state(call_id, e):560 return561 * \endcode562 396 */ 563 397 void (*on_call_state)(pjsua_call_id call_id, pjsip_event *e); … … 570 404 * the call. 571 405 * @param rdata The incoming INVITE request. 572 *573 * \par Python Syntax:574 * \code575 # acc_id: integer576 # call_id: integer577 # rdata: an opaque object578 579 def on_incoming_call(acc_id, call_id, rdata):580 return581 * \endcode582 406 */ 583 407 void (*on_incoming_call)(pjsua_acc_id acc_id, pjsua_call_id call_id, … … 607 431 * 608 432 * @param call_id The call index. 609 *610 * \par Python Syntax:611 * \code612 # call_id: integer613 614 def on_call_media_state(call_id):615 return616 * \endcode617 433 */ 618 434 void (*on_call_media_state)(pjsua_call_id call_id); … … 632 448 * point to different media port to be registered 633 449 * to the conference bridge. 634 *635 * \par Python:636 * Not applicable.637 450 */ 638 451 void (*on_stream_created)(pjsua_call_id call_id, … … 648 461 * @param sess Media session for the call. 649 462 * @param stream_idx Stream index in the media session. 650 *651 * \par Python:652 * Not applicable.653 463 */ 654 464 void (*on_stream_destroyed)(pjsua_call_id call_id, … … 661 471 * @param call_id The call index. 662 472 * @param digit DTMF ASCII digit. 663 *664 * \par Python Syntax:665 * \code666 # call_id: integer667 # digit: digit string668 669 def on_dtmf_digit(call_id, digit):670 return671 * \endcode672 473 */ 673 474 void (*on_dtmf_digit)(pjsua_call_id call_id, int digit); … … 685 486 * @param code Status code to be returned for the call transfer 686 487 * request. On input, it contains status code 200. 687 *688 * \par Python Syntax:689 * \code690 # call_id: integer691 # dst: string692 # code: integer693 694 def on_call_transfer_request(call_id, dst, code):695 return code696 697 * \endcode698 488 */ 699 489 void (*on_call_transfer_request)(pjsua_call_id call_id, … … 717 507 * to receie further notification (for example, 718 508 * after it hangs up the call). 719 *720 * \par Python Syntax:721 * \code722 # call_id: integer723 # st_code: integer724 # st_text: string725 # final: integer726 # cont: integer727 728 # return: cont729 730 def on_call_transfer_status(call_id, st_code, st_text, final, cont):731 return cont732 * \endcode733 509 */ 734 510 void (*on_call_transfer_status)(pjsua_call_id call_id, … … 747 523 * should only return a final status (200-699). 748 524 * @param st_text Optional status text to be set by application. 749 *750 * \par Python Syntax:751 * \code752 # call_id: integer753 # rdata: an opaque object754 # st_code: integer755 # st_text: string756 757 # return: (st_code, st_text) tuple758 759 def on_call_replace_request(call_id, rdata, st_code, st_text):760 return st_code, st_text761 * \endcode762 525 */ 763 526 void (*on_call_replace_request)(pjsua_call_id call_id, … … 778 541 * @param new_call_id The new call. 779 542 * @param rdata The incoming INVITE with Replaces request. 780 *781 * \par Python Syntax:782 * \code783 # old_call_id: integer784 # new_call_id: integer785 786 def on_call_replaced(old_call_id, new_call_id):787 return788 * \endcode789 543 */ 790 544 void (*on_call_replaced)(pjsua_call_id old_call_id, … … 798 552 * 799 553 * @param acc_id Account ID. 800 *801 * \par Python Syntax:802 * \code803 # acc_id: account ID (integer)804 805 def on_reg_state(acc_id):806 return807 * \endcode808 554 */ 809 555 void (*on_reg_state)(pjsua_acc_id acc_id); … … 887 633 * 888 634 * @param buddy_id The buddy id. 889 *890 * \par Python Syntax:891 * \code892 # buddy_id: integer893 894 def on_buddy_state(buddy_id):895 return896 * \endcode897 635 */ 898 636 void (*on_buddy_state)(pjsua_buddy_id buddy_id); … … 914 652 * @param mime_type MIME type of the message. 915 653 * @param body The message content. 916 *917 * \par Python Syntax:918 * \code919 # call_id: integer920 # from: string921 # to: string922 # contact: string923 # mime_type: string924 # body: string925 # acc_id: integer926 927 def on_pager(call_id, from, to, contact, mime_type, body):928 return929 * \endcode930 654 */ 931 655 void (*on_pager)(pjsua_call_id call_id, const pj_str_t *from, … … 967 691 * @param status Delivery status. 968 692 * @param reason Delivery status reason. 969 *970 * \par Python Syntax971 * \code972 # call_id: integer973 # to: string974 # body: string975 # user_data: string976 # status: integer977 # reason: string978 # acc_id: integer979 980 def on_pager_status(call_id, to, body, user_data, status, reason):981 return982 * \endcode983 693 */ 984 694 void (*on_pager_status)(pjsua_call_id call_id, … … 1030 740 * @param is_typing Non-zero if peer is typing, or zero if peer 1031 741 * has stopped typing a message. 1032 *1033 * \par Python Syntax1034 * \code1035 # call_id: string1036 # from: string1037 # to: string1038 # contact: string1039 # is_typing: integer1040 1041 def on_typing(call_id, from, to, contact, is_typing):1042 return1043 * \endcode1044 742 */ 1045 743 void (*on_typing)(pjsua_call_id call_id, const pj_str_t *from, … … 1134 832 * Before setting the values, application must call #pjsua_config_default() 1135 833 * to initialize this structure with the default values. 1136 *1137 * \par Python Sample Syntax:1138 * The pjsua_config type in Python is <tt>py_pjsua.Config</tt>. Application1139 * creates the instance by calling <tt>py_pjsua.config_default()</tt>:1140 * \code1141 cfg = py_pjsua.config_default()1142 * \endcode1143 834 */ 1144 835 typedef struct pjsua_config … … 1313 1004 * 1314 1005 * @param cfg pjsua config to be initialized. 1315 *1316 * \par Python Sample Syntax:1317 * The corresponding Python function creates an instance of the config and1318 * initializes it to the default settings:1319 * \code1320 cfg = py_pjsua.config_default()1321 * \endcode1322 1323 1006 */ 1324 1007 PJ_DECL(void) pjsua_config_default(pjsua_config *cfg); … … 1349 1032 * Application MUST call #pjsua_msg_data_init() to initialize this 1350 1033 * structure before setting its values. 1351 *1352 * \par Python Syntax1353 * The data type in Python is <tt>py_pjsua.Msg_Data</tt>. Application is1354 * recommended to instantiate the structure by using this construct:1355 * \code1356 msg_data = py_pjsua.msg_data_init()1357 * \endcode1358 1034 */ 1359 1035 struct pjsua_msg_data … … 1364 1040 * or from temporary local variable, and add the header using 1365 1041 * linked list operation. See pjsip_apps.c for some sample codes. 1366 *1367 * \par Python:1368 * This field is implemented as string linked-list in Python, where each1369 * string describes the header. For example:1370 \code1371 msg_data = py_pjsua.Msg_Data()1372 msg_data.hdr_list = ["Subject: Hello py_pjsua!", "Priority: very low"]1373 \endcode1374 1042 */ 1375 1043 pjsip_hdr hdr_list; … … 1392 1060 * 1393 1061 * @param msg_data Message data to be initialized. 1394 *1395 * \par Python1396 * The corresponding Python function creates and initializes the structure:1397 * \code1398 msg_data = py_pjsua.msg_data_init()1399 * \endcode1400 1062 */ 1401 1063 PJ_DECL(void) pjsua_msg_data_init(pjsua_msg_data *msg_data); … … 1409 1071 * 1410 1072 * @return PJ_SUCCESS on success, or the appropriate error code. 1411 *1412 * \par Python:1413 * \code1414 status = py_pjsua.create()1415 * \endcode1416 1073 */ 1417 1074 PJ_DECL(pj_status_t) pjsua_create(void); … … 1434 1091 * 1435 1092 * @return PJ_SUCCESS on success, or the appropriate error code. 1436 *1437 * \par Python:1438 * The function is similar in Python:1439 * \code1440 status = py_pjsua.init(ua_cfg, log_cfg, media_cfg)1441 * \endcode1442 * Note that \a ua_cfg, \a log_cfg, and \a media_cfg are optional, and1443 * the Python script may pass None if it doesn't want to configure the1444 * setting.1445 1093 */ 1446 1094 PJ_DECL(pj_status_t) pjsua_init(const pjsua_config *ua_cfg, … … 1457 1105 * 1458 1106 * @return PJ_SUCCESS on success, or the appropriate error code. 1459 *1460 * \par Python:1461 * The function is similar in Python:1462 * \code1463 status = py_pjsua.start()1464 * \endcode1465 1107 */ 1466 1108 PJ_DECL(pj_status_t) pjsua_start(void); … … 1479 1121 * 1480 1122 * @return PJ_SUCCESS on success, or the appropriate error code. 1481 *1482 * \par Python:1483 * The function is similar in Python:1484 * \code1485 status = py_pjsua.destroy()1486 * \endcode1487 1123 */ 1488 1124 PJ_DECL(pj_status_t) pjsua_destroy(void); … … 1502 1138 * poll. Negative value indicates error, and application 1503 1139 * can retrieve the error as (status = -return_value). 1504 *1505 * \par Python:1506 * The function is similar in Python:1507 * \code1508 n = py_pjsua.handle_events(msec_timeout)1509 * \endcode1510 1140 */ 1511 1141 PJ_DECL(int) pjsua_handle_events(unsigned msec_timeout); … … 1521 1151 * 1522 1152 * @return The pool, or NULL when there's no memory. 1523 *1524 * \par Python:1525 * Python script may also create a pool object from the script:1526 * \code1527 pool = py_pjsua.pool_create(name, init_size, increment)1528 * \endcode1529 1153 */ 1530 1154 PJ_DECL(pj_pool_t*) pjsua_pool_create(const char *name, pj_size_t init_size, … … 1539 1163 * 1540 1164 * @return PJ_SUCCESS on success, or the appropriate error code. 1541 *1542 * \par Python:1543 * The function is similar in Python:1544 * \code1545 status = py_pjsua.reconfigure_logging(log_cfg)1546 * \endcode1547 1165 */ 1548 1166 PJ_DECL(pj_status_t) pjsua_reconfigure_logging(const pjsua_logging_config *c); … … 1555 1173 * 1556 1174 * @return SIP endpoint instance. 1557 *1558 * \par Python:1559 * Application may retrieve the SIP endpoint instance:1560 * \code1561 endpt = py_pjsua.get_pjsip_endpt()1562 * \endcode1563 * However currently the object is just an opaque object and does not have1564 * any use for Python scripts.1565 1175 */ 1566 1176 PJ_DECL(pjsip_endpoint*) pjsua_get_pjsip_endpt(void); … … 1571 1181 * 1572 1182 * @return Media endpoint instance. 1573 *1574 * \par Python:1575 * Application may retrieve the media endpoint instance:1576 * \code1577 endpt = py_pjsua.get_pjmedia_endpt()1578 * \endcode1579 * However currently the object is just an opaque object and does not have1580 * any use for Python scripts.1581 1183 */ 1582 1184 PJ_DECL(pjmedia_endpt*) pjsua_get_pjmedia_endpt(void); … … 1587 1189 * 1588 1190 * @return Pool factory currently used by PJSUA. 1589 *1590 * \par Python:1591 * Application may retrieve the pool factory instance:1592 * \code1593 endpt = py_pjsua.get_pool_factory()1594 * \endcode1595 * However currently the object is just an opaque object and does not have1596 * any use for Python scripts.1597 1191 */ 1598 1192 PJ_DECL(pj_pool_factory*) pjsua_get_pool_factory(void); … … 1650 1244 * 1651 1245 * @return PJ_SUCCESS on success, or the appropriate error code. 1652 *1653 * \par Python:1654 * \code1655 status = py_pjsua.verify_sip_url(url)1656 * \endcode1657 1246 */ 1658 1247 PJ_DECL(pj_status_t) pjsua_verify_sip_url(const char *url); … … 1666 1255 * @param title Message title for the error. 1667 1256 * @param status Status code. 1668 *1669 * \par Python:1670 * \code1671 py_pjsua.perror(sender, title, status)1672 * \endcode1673 1257 */ 1674 1258 PJ_DECL(void) pjsua_perror(const char *sender, const char *title, … … 1717 1301 * MUST call #pjsua_transport_config_default() to initialize its 1718 1302 * values with default settings. 1719 *1720 * \par Python:1721 * The data type in Python is <tt>py_pjsua.Transport_Config</tt>,1722 * although application can just do this to create the instance:1723 * \code1724 transport_cfg = py_pjsua.transport_config_default()1725 * \endcode1726 1303 */ 1727 1304 typedef struct pjsua_transport_config … … 1773 1350 * 1774 1351 * @param cfg The UDP config to be initialized. 1775 *1776 * \par Python:1777 * The corresponding Python function is rather different:1778 * \code1779 transport_cfg = py_pjsua.transport_config_default()1780 * \endcode1781 1352 */ 1782 1353 PJ_DECL(void) pjsua_transport_config_default(pjsua_transport_config *cfg); … … 1789 1360 * @param dst The destination config. 1790 1361 * @param src The source config. 1791 *1792 * \par Python:1793 * Not applicable. One should be able to just copy one variable instance1794 * to another in Python.1795 1362 */ 1796 1363 PJ_DECL(void) pjsua_transport_config_dup(pj_pool_t *pool, … … 1802 1369 * This structure describes transport information returned by 1803 1370 * #pjsua_transport_get_info() function. 1804 *1805 * \par Python:1806 * The corresponding data type in Python is <tt>py_pjsua.Transport_Info</tt>.1807 1371 */ 1808 1372 typedef struct pjsua_transport_info … … 1866 1430 * 1867 1431 * @return PJ_SUCCESS on success, or the appropriate error code. 1868 *1869 * \par Python:1870 * The corresponding Python function returns (status,id) tuple:1871 * \code1872 status, transport_id = py_pjsua.transport_create(type, cfg)1873 * \endcode1874 1432 */ 1875 1433 PJ_DECL(pj_status_t) pjsua_transport_create(pjsip_transport_type_e type, … … 1886 1444 * 1887 1445 * @return PJ_SUCCESS on success, or the appropriate error code. 1888 *1889 * \par Python:1890 * Not applicable (for now), because one cannot create a custom transport1891 * from Python script.1892 1446 */ 1893 1447 PJ_DECL(pj_status_t) pjsua_transport_register(pjsip_transport *tp, … … 1906 1460 * 1907 1461 * @return PJ_SUCCESS on success, or the appropriate error code. 1908 *1909 * \par Python:1910 * The function returns list of integers representing transport ids:1911 * \code1912 [int] = py_pjsua.enum_transports()1913 * \endcode1914 1462 */ 1915 1463 PJ_DECL(pj_status_t) pjsua_enum_transports( pjsua_transport_id id[], … … 1924 1472 * 1925 1473 * @return PJ_SUCCESS on success, or the appropriate error code. 1926 *1927 * \par Python:1928 * \code1929 transport_info = py_pjsua.transport_get_info(id)1930 * \endcode1931 * The Python function returns None on error.1932 1474 */ 1933 1475 PJ_DECL(pj_status_t) pjsua_transport_get_info(pjsua_transport_id id, … … 1945 1487 * 1946 1488 * @return PJ_SUCCESS on success, or the appropriate error code. 1947 *1948 * \par Python:1949 * \code1950 status = py_pjsua.transport_set_enable(id, enabled)1951 * \endcode1952 1489 */ 1953 1490 PJ_DECL(pj_status_t) pjsua_transport_set_enable(pjsua_transport_id id, … … 1968 1505 * 1969 1506 * @return PJ_SUCCESS on success, or the appropriate error code. 1970 *1971 * \par Python:1972 * \code1973 status = py_pjsua.transport_close(id, force)1974 * \endcode1975 1507 */ 1976 1508 PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id, … … 2074 1606 * adding a new account with #pjsua_acc_add(). Application MUST initialize 2075 1607 * this structure first by calling #pjsua_acc_config_default(). 2076 *2077 * \par Python:2078 * The data type in Python is <tt>py_pjsua.Acc_Config</tt>, but normally2079 * application can just use the snippet below to create and initialize2080 * the account config:2081 * \code2082 acc_cfg = py_pjsua.acc_config_default()2083 * \endcode2084 1608 */ 2085 1609 typedef struct pjsua_acc_config … … 2164 1688 /** 2165 1689 * Number of proxies in the proxy array below. 2166 *2167 * \par Python:2168 * Not applicable, as \a proxy is implemented as list of strings.2169 1690 */ 2170 1691 unsigned proxy_cnt; … … 2182 1703 * then these account proxies will be placed after the global outbound 2183 1704 * proxies in the routeset. 2184 *2185 * \par Python:2186 * This will be list of strings.2187 1705 */ 2188 1706 pj_str_t proxy[PJSUA_ACC_MAX_PROXIES]; … … 2196 1714 /** 2197 1715 * Number of credentials in the credential array. 2198 *2199 * \par Python:2200 * Not applicable, since \a cred_info is a list of credentials.2201 1716 */ 2202 1717 unsigned cred_count; … … 2208 1723 * example when the requests are expected to be challenged by the 2209 1724 * proxies in the route set. 2210 *2211 * \par Python:2212 * This field is a list of credentials.2213 1725 */ 2214 1726 pjsip_cred_info cred_info[PJSUA_ACC_MAX_PROXIES]; … … 2289 1801 * 2290 1802 * @param cfg The account config to be initialized. 2291 *2292 * \par Python:2293 * In Python, this function both creates and initializes the account2294 * config:2295 * \code2296 acc_cfg = py_pjsua.acc_config_default()2297 * \endcode2298 1803 */ 2299 1804 PJ_DECL(void) pjsua_acc_config_default(pjsua_acc_config *cfg); … … 2315 1820 * Account info. Application can query account info by calling 2316 1821 * #pjsua_acc_get_info(). 2317 *2318 * \par Python:2319 * The data type in Python is <tt>py_pjsua.Acc_Info</tt>.2320 1822 */ 2321 1823 typedef struct pjsua_acc_info … … 2387 1889 * 2388 1890 * @return Current number of accounts. 2389 *2390 * \par Python:2391 * \code2392 count = py_pjsua.acc_get_count()2393 * \endcode2394 1891 */ 2395 1892 PJ_DECL(unsigned) pjsua_acc_get_count(void); … … 2402 1899 * 2403 1900 * @return Non-zero if account ID is valid. 2404 *2405 * \par Python:2406 * \code2407 is_valid = py_pjsua.acc_is_valid(acc_id)2408 * \endcode2409 1901 */ 2410 1902 PJ_DECL(pj_bool_t) pjsua_acc_is_valid(pjsua_acc_id acc_id); … … 2418 1910 * 2419 1911 * @return PJ_SUCCESS on success. 2420 *2421 * \par Python:2422 * \code2423 status = py_pjsua.acc_set_default(acc_id)2424 * \endcode2425 1912 */ 2426 1913 PJ_DECL(pj_status_t) pjsua_acc_set_default(pjsua_acc_id acc_id); … … 2434 1921 * @return The default account ID, or PJSUA_INVALID_ID if no 2435 1922 * default account is configured. 2436 *2437 * \par Python:2438 * \code2439 acc_id = py_pjsua.acc_get_default()2440 * \endcode2441 1923 */ 2442 1924 PJ_DECL(pjsua_acc_id) pjsua_acc_get_default(void); … … 2462 1944 * 2463 1945 * @return PJ_SUCCESS on success, or the appropriate error code. 2464 *2465 * \par Python:2466 * The function returns (status, account_id) tuple:2467 * \code2468 status, account_id = py_pjsua.acc_add(acc_cfg, is_default)2469 * \endcode2470 1946 */ 2471 1947 PJ_DECL(pj_status_t) pjsua_acc_add(const pjsua_acc_config *acc_cfg, … … 2489 1965 * 2490 1966 * @return PJ_SUCCESS on success, or the appropriate error code. 2491 *2492 * \par Python:2493 * The function returns (status, account_id) tuple:2494 * \code2495 status, account_id = py_pjsua.acc_add_local(tid, is_default)2496 * \endcode2497 1967 */ 2498 1968 PJ_DECL(pj_status_t) pjsua_acc_add_local(pjsua_transport_id tid, … … 2531 2001 * 2532 2002 * @return PJ_SUCCESS on success, or the appropriate error code. 2533 *2534 * \par Python:2535 * \code2536 status = py_pjsua.acc_del(acc_id)2537 * \endcode2538 2003 */ 2539 2004 PJ_DECL(pj_status_t) pjsua_acc_del(pjsua_acc_id acc_id); … … 2547 2012 * 2548 2013 * @return PJ_SUCCESS on success, or the appropriate error code. 2549 *2550 * \par Python:2551 * \code2552 status = py_pjsua.acc_modify(acc_id, acc_cfg)2553 * \endcode2554 2014 */ 2555 2015 PJ_DECL(pj_status_t) pjsua_acc_modify(pjsua_acc_id acc_id, … … 2569 2029 * 2570 2030 * @return PJ_SUCCESS on success, or the appropriate error code. 2571 *2572 * \par Python:2573 * \code2574 status = py_pjsua.acc_set_online_status(acc_id, is_online)2575 * \endcode2576 2031 */ 2577 2032 PJ_DECL(pj_status_t) pjsua_acc_set_online_status(pjsua_acc_id acc_id, … … 2609 2064 * 2610 2065 * @return PJ_SUCCESS on success, or the appropriate error code. 2611 *2612 * \par Python:2613 * \code2614 status = py_pjsua.acc_set_registration(acc_id, renew)2615 * \endcode2616 2066 */ 2617 2067 PJ_DECL(pj_status_t) pjsua_acc_set_registration(pjsua_acc_id acc_id, … … 2625 2075 * 2626 2076 * @return PJ_SUCCESS on success, or the appropriate error code. 2627 *2628 * \par Python:2629 * \code2630 acc_info = py_pjsua.acc_get_info(acc_id)2631 * \endcode2632 * The function returns None if account ID is not valid.2633 2077 */ 2634 2078 PJ_DECL(pj_status_t) pjsua_acc_get_info(pjsua_acc_id acc_id, … … 2648 2092 * 2649 2093 * @return PJ_SUCCESS on success, or the appropriate error code. 2650 *2651 * \par Python:2652 * The function takes no argument and returns list of account Ids:2653 * \code2654 [acc_ids] = py_pjsua.enum_accs()2655 * \endcode2656 2094 */ 2657 2095 PJ_DECL(pj_status_t) pjsua_enum_accs(pjsua_acc_id ids[], … … 2667 2105 * 2668 2106 * @return PJ_SUCCESS on success, or the appropriate error code. 2669 *2670 * \par Python:2671 * The function takes no argument and returns list of account infos:2672 * \code2673 [acc_info] = py_pjsua.acc_enum_info()2674 * \endcode2675 2107 */ 2676 2108 PJ_DECL(pj_status_t) pjsua_acc_enum_info( pjsua_acc_info info[], … … 2685 2117 * 2686 2118 * @return Account id. 2687 *2688 * \par Python:2689 * \code2690 acc_id = py_pjsua.acc_find_for_outgoing(url)2691 * \endcode2692 2119 */ 2693 2120 PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_outgoing(const pj_str_t *url); … … 2701 2128 * 2702 2129 * @return Account id. 2703 *2704 * \par Python:2705 * \code2706 acc_id = py_pjsua.acc_find_for_outgoing(url)2707 * \endcode2708 2130 */ 2709 2131 PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_incoming(pjsip_rx_data *rdata); … … 2739 2161 * 2740 2162 * @return PJ_SUCCESS on success, other on error. 2741 *2742 * \par Python:2743 * This function is still experimental in Python:2744 * \code2745 uri = py_pjsua.acc_create_uac_contact(pool, acc_id, uri)2746 * \endcode2747 2163 */ 2748 2164 PJ_DECL(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool, … … 2763 2179 * 2764 2180 * @return PJ_SUCCESS on success, other on error. 2765 *2766 * \par Python:2767 * This function is still experimental in Python:2768 * \code2769 uri = py_pjsua.acc_create_uas_contact(pool, acc_id, rdata)2770 * \endcode2771 2181 */ 2772 2182 PJ_DECL(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool, … … 2792 2202 * 2793 2203 * @return PJ_SUCCESS on success. 2794 *2795 * \par Python:2796 * Not yet implemented.2797 2204 */ 2798 2205 PJ_DECL(pj_status_t) pjsua_acc_set_transport(pjsua_acc_id acc_id, … … 2852 2259 /** 2853 2260 * This structure describes the information and current status of a call. 2854 *2855 * \par Python:2856 * The type name is <tt>py_pjsua.Call_Info</tt>.2857 2261 */ 2858 2262 typedef struct pjsua_call_info … … 2929 2333 * 2930 2334 * @return Maximum number of calls configured. 2931 *2932 * \par Python:2933 * \code2934 count = py_pjsua.call_get_max_count()2935 * \endcode2936 2335 */ 2937 2336 PJ_DECL(unsigned) pjsua_call_get_max_count(void); … … 2941 2340 * 2942 2341 * @return Number of currently active calls. 2943 *2944 * \par Python:2945 * \code2946 count = py_pjsua.call_get_count()2947 * \endcode2948 2342 */ 2949 2343 PJ_DECL(unsigned) pjsua_call_get_count(void); … … 2958 2352 * 2959 2353 * @return PJ_SUCCESS on success, or the appropriate error code. 2960 *2961 * \par Python:2962 * This function takes no argument and return list of call Ids.2963 * \code2964 [call_ids] = py_pjsua.enum_calls()2965 * \endcode2966 2354 */ 2967 2355 PJ_DECL(pj_status_t) pjsua_enum_calls(pjsua_call_id ids[], … … 2983 2371 * 2984 2372 * @return PJ_SUCCESS on success, or the appropriate error code. 2985 *2986 * \par Python:2987 * The Python function returns (status, call_id) tuple:2988 * \code2989 status, call_id = py_pjsua.call_make_call(acc_id, dst_uri, options,2990 user_data, msg_data)2991 * \endcode2992 * Note: the \a user_data in Python function is an integer, and the2993 * \a msg_data can be set to None if not required.2994 2373 */ 2995 2374 PJ_DECL(pj_status_t) pjsua_call_make_call(pjsua_acc_id acc_id, … … 3008 2387 * 3009 2388 * @return Non-zero if call is active. 3010 *3011 * \par Python:3012 * \code3013 bool = py_pjsua.call_is_active(call_id)3014 * \endcode3015 2389 */ 3016 2390 PJ_DECL(pj_bool_t) pjsua_call_is_active(pjsua_call_id call_id); … … 3023 2397 * 3024 2398 * @return Non-zero if yes. 3025 *3026 * \par Python:3027 * \code3028 bool = py_pjsua.call_has_media(call_id)3029 * \endcode3030 2399 */ 3031 2400 PJ_DECL(pj_bool_t) pjsua_call_has_media(pjsua_call_id call_id); … … 3065 2434 * @return Conference port ID, or PJSUA_INVALID_ID when the 3066 2435 * media has not been established or is not active. 3067 *3068 * \par Python:3069 * \code3070 slot = py_pjsua.call_get_conf_port(call_id)3071 * \endcode3072 2436 */ 3073 2437 PJ_DECL(pjsua_conf_port_id) pjsua_call_get_conf_port(pjsua_call_id call_id); … … 3080 2444 * 3081 2445 * @return PJ_SUCCESS on success, or the appropriate error code. 3082 *3083 * \par Python:3084 * \code3085 call_info = py_pjsua.call_get_info(call_id)3086 * \endcode3087 * \a call_info return value will be set to None if call_id is not valid.3088 2446 */ 3089 2447 PJ_DECL(pj_status_t) pjsua_call_get_info(pjsua_call_id call_id, … … 3099 2457 * 3100 2458 * @return The user data. 3101 *3102 * \par Python:3103 * \code3104 status = py_pjsua.call_set_user_data(call_id, user_data)3105 * \endcode3106 * The \a user_data is an integer in the Python function.3107 2459 */ 3108 2460 PJ_DECL(pj_status_t) pjsua_call_set_user_data(pjsua_call_id call_id, … … 3117 2469 * 3118 2470 * @return The user data. 3119 *3120 * \par Python:3121 * \code3122 user_data = py_pjsua.call_get_user_data(call_id)3123 * \endcode3124 * The \a user_data is an integer.3125 2471 */ 3126 2472 PJ_DECL(void*) pjsua_call_get_user_data(pjsua_call_id call_id); … … 3164 2510 * 3165 2511 * @return PJ_SUCCESS on success, or the appropriate error code. 3166 *3167 * \par Python:3168 * \code3169 status = py_pjsua.call_answer(call_id, code, reason, msg_data)3170 * \endcode3171 * Arguments \a reason and \a msg_data may be set to None if not required.3172 2512 */ 3173 2513 PJ_DECL(pj_status_t) pjsua_call_answer(pjsua_call_id call_id, … … 3194 2534 * 3195 2535 * @return PJ_SUCCESS on success, or the appropriate error code. 3196 *3197 * \par Python:3198 * \code3199 status = py_pjsua.call_hangup(call_id, code, reason, msg_data)3200 * \endcode3201 * Arguments \a reason and \a msg_data may be set to None if not required.3202 2536 */ 3203 2537 PJ_DECL(pj_status_t) pjsua_call_hangup(pjsua_call_id call_id, … … 3245 2579 * 3246 2580 * @return PJ_SUCCESS on success, or the appropriate error code. 3247 *3248 * \par Python:3249 * \code3250 status = py_pjsua.call_set_hold(call_id, msg_data)3251 * \endcode3252 * Argument \a msg_data may be set to None if not required.3253 2581 */ 3254 2582 PJ_DECL(pj_status_t) pjsua_call_set_hold(pjsua_call_id call_id, … … 3269 2597 * 3270 2598 * @return PJ_SUCCESS on success, or the appropriate error code. 3271 *3272 * \par Python:3273 * \code3274 status = py_pjsua.call_reinvite(call_id, unhold, msg_data)3275 * \endcode3276 * Argument \a msg_data may be set to None if not required.3277 2599 */ 3278 2600 PJ_DECL(pj_status_t) pjsua_call_reinvite(pjsua_call_id call_id, … … 3310 2632 * 3311 2633 * @return PJ_SUCCESS on success, or the appropriate error code. 3312 *3313 * \par Python:3314 * \code3315 status = py_pjsua.call_xfer(call_id, dest, msg_data)3316 * \endcode3317 * Argument \a msg_data may be set to None if not required.3318 2634 */ 3319 2635 PJ_DECL(pj_status_t) pjsua_call_xfer(pjsua_call_id call_id, … … 3344 2660 * 3345 2661 * @return PJ_SUCCESS on success, or the appropriate error code. 3346 *3347 * \par Python:3348 * \code3349 status = py_pjsua.call_xfer_replaces(call_id, dest_call_id, options, msg_data)3350 * \endcode3351 * Argument \a msg_data may be set to None if not required.3352 2662 */ 3353 2663 PJ_DECL(pj_status_t) pjsua_call_xfer_replaces(pjsua_call_id call_id, … … 3363 2673 * 3364 2674 * @return PJ_SUCCESS on success, or the appropriate error code. 3365 *3366 * \par Python:3367 * \code3368 status = py_pjsua.call_dial_dtmf(call_id, digits)3369 * \endcode3370 2675 */ 3371 2676 PJ_DECL(pj_status_t) pjsua_call_dial_dtmf(pjsua_call_id call_id, … … 3386 2691 * 3387 2692 * @return PJ_SUCCESS on success, or the appropriate error code. 3388 *3389 * \par Python:3390 * \code3391 status = py_pjsua.call_send_im(call_id, mime_type, content, msg_data, user_data)3392 * \endcode3393 * Note that the \a user_data argument is an integer in Python.3394 2693 */ 3395 2694 PJ_DECL(pj_status_t) pjsua_call_send_im( pjsua_call_id call_id, … … 3410 2709 * 3411 2710 * @return PJ_SUCCESS on success, or the appropriate error code. 3412 *3413 * \par Python:3414 * \code3415 status = py_pjsua.call_send_typing_ind(call_id, is_typing, msg_data)3416 * \endcode3417 * Argument \a msg_data may be set to None if not required.3418 2711 */ 3419 2712 PJ_DECL(pj_status_t) pjsua_call_send_typing_ind(pjsua_call_id call_id, … … 3442 2735 * Terminate all calls. This will initiate #pjsua_call_hangup() for all 3443 2736 * currently active calls. 3444 *3445 * \par Python:3446 * \code3447 py_pjsua.call_hangup_all()3448 * \endcode3449 2737 */ 3450 2738 PJ_DECL(void) pjsua_call_hangup_all(void); … … 3461 2749 * 3462 2750 * @return PJ_SUCCESS on success. 3463 *3464 * \par Python:3465 * \code3466 string = py_pjsua.call_dump(call_id, with_media, max_len, indent)3467 * \endcode3468 * The \a max_len argument is the desired maximum length to be allocated.3469 2751 */ 3470 2752 PJ_DECL(pj_status_t) pjsua_call_dump(pjsua_call_id call_id, … … 3519 2801 * the structure with #pjsua_buddy_config_default() to initialize this 3520 2802 * structure with default configuration. 3521 *3522 * \par Python:3523 * In Python this structure is <tt>py_pjsua.Buddy_Config</tt>. However3524 * it is recommended that application instantiates the buddy config3525 * by calling:3526 * \code3527 buddy_cfg = py_pjsua.buddy_config_default()3528 * \endcode3529 2803 */ 3530 2804 typedef struct pjsua_buddy_config … … 3577 2851 * This structure describes buddy info, which can be retrieved by calling 3578 2852 * #pjsua_buddy_get_info(). 3579 *3580 * \par Python:3581 * This structure in Python is <tt>py_pjsua.Buddy_Info</tt>.3582 2853 */ 3583 2854 typedef struct pjsua_buddy_info … … 3646 2917 /** 3647 2918 * Set default values to the buddy config. 3648 *3649 * \par Python:3650 * \code3651 buddy_cfg = py_pjsua.buddy_config_default()3652 * \endcode3653 2919 */ 3654 2920 PJ_DECL(void) pjsua_buddy_config_default(pjsua_buddy_config *cfg); … … 3659 2925 * 3660 2926 * @return Number of buddies. 3661 *3662 * \par Python:3663 * \code3664 buddy_count = py_pjsua.get_buddy_count()3665 * \endcode3666 2927 */ 3667 2928 PJ_DECL(unsigned) pjsua_get_buddy_count(void); … … 3674 2935 * 3675 2936 * @return Non-zero if buddy ID is valid. 3676 *3677 * \par Python:3678 * \code3679 is_valid = py_pjsua.buddy_is_valid(buddy_id)3680 * \endcode3681 2937 */ 3682 2938 PJ_DECL(pj_bool_t) pjsua_buddy_is_valid(pjsua_buddy_id buddy_id); … … 3694 2950 * 3695 2951 * @return PJ_SUCCESS on success, or the appropriate error code. 3696 *3697 * \par Python:3698 * The Python function takes no argument and returns list of buddy IDs:3699 * \code3700 [buddy_ids] = py_pjsua.enum_buddies()3701 * \endcode3702 2952 */ 3703 2953 PJ_DECL(pj_status_t) pjsua_enum_buddies(pjsua_buddy_id ids[], … … 3721 2971 * 3722 2972 * @return PJ_SUCCESS on success, or the appropriate error code. 3723 *3724 * \par Python:3725 * \code3726 buddy_info = py_pjsua.buddy_get_info(buddy_id)3727 * \endcode3728 * The function returns None if buddy_id is not valid.3729 2973 */ 3730 2974 PJ_DECL(pj_status_t) pjsua_buddy_get_info(pjsua_buddy_id buddy_id, … … 3763 3007 * 3764 3008 * @return PJ_SUCCESS on success, or the appropriate error code. 3765 *3766 * \par Python:3767 * The function returns (status, buddy_id) tuple:3768 * \code3769 status, buddy_id = py_pjsua.buddy_add(buddy_cfg)3770 * \endcode3771 3009 */ 3772 3010 PJ_DECL(pj_status_t) pjsua_buddy_add(const pjsua_buddy_config *buddy_cfg, … … 3781 3019 * 3782 3020 * @return PJ_SUCCESS on success, or the appropriate error code. 3783 *3784 * \par Python:3785 * \code3786 status = py_pjsua.buddy_del(buddy_id)3787 * \endcode3788 3021 */ 3789 3022 PJ_DECL(pj_status_t) pjsua_buddy_del(pjsua_buddy_id buddy_id); … … 3800 3033 * 3801 3034 * @return PJ_SUCCESS on success, or the appropriate error code. 3802 *3803 * \par Python:3804 * \code3805 status = py_pjsua.buddy_subscribe_pres(buddy_id, subscribe)3806 * \endcode3807 3035 */ 3808 3036 PJ_DECL(pj_status_t) pjsua_buddy_subscribe_pres(pjsua_buddy_id buddy_id, … … 3866 3094 * 3867 3095 * @param verbose Yes or no. 3868 *3869 * \par Python:3870 * \code3871 py_pjsua.pres_dump()3872 * \endcode3873 3096 */ 3874 3097 PJ_DECL(void) pjsua_pres_dump(pj_bool_t verbose); … … 3898 3121 * 3899 3122 * @return PJ_SUCCESS on success, or the appropriate error code. 3900 *3901 * \par Python:3902 * \code3903 status = py_pjsua.im_send(acc_id, to, mime_type, content, msg_data, user_data)3904 * \endcode3905 * Arguments \a mime_type and \a msg_data may be set to None if not required.3906 3123 */ 3907 3124 PJ_DECL(pj_status_t) pjsua_im_send(pjsua_acc_id acc_id, … … 3924 3141 * 3925 3142 * @return PJ_SUCCESS on success, or the appropriate error code. 3926 *3927 * \par Python:3928 * \code3929 status = py_pjsua.im_typing(acc_id, to, is_typing, msg_data)3930 * \endcode3931 * Argument \a msg_data may be set to None if not requried.3932 3143 */ 3933 3144 PJ_DECL(pj_status_t) pjsua_im_typing(pjsua_acc_id acc_id, … … 4080 3291 * when calling #pjsua_init(). Application MUST initialize this structure 4081 3292 * by calling #pjsua_media_config_default(). 4082 *4083 * \par Python:4084 * This data type in Python is <tt>py_pjsua.Media_Config</tt>. To create4085 * an object of this type, it is recommended to call4086 * <tt>py_pjsua.media_config_default()</tt> function instead:4087 * \code4088 media_cfg = py_pjsua.media_config_default()4089 * \endcode4090 3293 */ 4091 3294 struct pjsua_media_config … … 4318 3521 * 4319 3522 * @param cfg The media config to be initialized. 4320 *4321 * \par Python:4322 * \code4323 media_cfg = py_pjsua.media_config_default()4324 * \endcode4325 3523 */ 4326 3524 PJ_DECL(void) pjsua_media_config_default(pjsua_media_config *cfg); … … 4355 3553 * has been registered into the conference bridge. Application can query 4356 3554 * this info by calling #pjsua_conf_get_port_info(). 4357 *4358 * \par Python:4359 * In Python, this type is <tt>py_pjsua.Conf_Port_Info</tt>.4360 3555 */ 4361 3556 typedef struct pjsua_conf_port_info … … 4393 3588 * This structure holds information about custom media transport to 4394 3589 * be registered to pjsua. 4395 *4396 * \par Python:4397 * Not applicable.4398 3590 */ 4399 3591 typedef struct pjsua_media_transport … … 4419 3611 * 4420 3612 * @return Maximum number of ports in the conference bridge. 4421 *4422 * \par Python:4423 * \code4424 port_count = py_pjsua.conf_get_max_ports()4425 * \endcode4426 3613 */ 4427 3614 PJ_DECL(unsigned) pjsua_conf_get_max_ports(void); … … 4432 3619 * 4433 3620 * @return The number. 4434 *4435 * \par Python:4436 * \code4437 count = py_pjsua.conf_get_active_ports()4438 * \endcode4439 3621 */ 4440 3622 PJ_DECL(unsigned) pjsua_conf_get_active_ports(void); … … 4450 3632 * 4451 3633 * @return PJ_SUCCESS on success, or the appropriate error code. 4452 *4453 * \par Python:4454 * The Python functions returns list of conference port Ids:4455 * \code4456 [port_ids] = py_pjsua.enum_conf_ports()4457 * \endcode4458 3634 */ 4459 3635 PJ_DECL(pj_status_t) pjsua_enum_conf_ports(pjsua_conf_port_id id[], … … 4468 3644 * 4469 3645 * @return PJ_SUCCESS on success, or the appropriate error code. 4470 *4471 * \par Python:4472 * \code4473 port_info = py_pjsua.conf_get_port_info(port_id)4474 * \endcode4475 * The function will return None if \a port_id is not valid.4476 3646 */ 4477 3647 PJ_DECL(pj_status_t) pjsua_conf_get_port_info( pjsua_conf_port_id port_id, … … 4492 3662 * 4493 3663 * @return PJ_SUCCESS on success, or the appropriate error code. 4494 *4495 * \par Python:4496 * Not applicable (for now)4497 3664 */ 4498 3665 PJ_DECL(pj_status_t) pjsua_conf_add_port(pj_pool_t *pool, … … 4509 3676 * 4510 3677 * @return PJ_SUCCESS on success, or the appropriate error code. 4511 *4512 * \par Python:4513 * \code4514 status = py_pjsua.conf_remove_port(port_id)4515 * \endcode4516 3678 */ 4517 3679 PJ_DECL(pj_status_t) pjsua_conf_remove_port(pjsua_conf_port_id port_id); … … 4533 3695 * 4534 3696 * @return PJ_SUCCESS on success, or the appropriate error code. 4535 *4536 * \par Python:4537 * \code4538 status = py_pjsua.conf_connect(source, sink)4539 * \endcode4540 3697 */ 4541 3698 PJ_DECL(pj_status_t) pjsua_conf_connect(pjsua_conf_port_id source, … … 4550 3707 * 4551 3708 * @return PJ_SUCCESS on success, or the appropriate error code. 4552 *4553 * \par Python:4554 * \code4555 status = py_pjsua.conf_disconnect(source, sink)4556 * \endcode4557 3709 */ 4558 3710 PJ_DECL(pj_status_t) pjsua_conf_disconnect(pjsua_conf_port_id source, … … 4569 3721 * 4570 3722 * @return PJ_SUCCESS on success, or the appropriate error code. 4571 *4572 * \par Python:4573 * Not implemented (yet)4574 3723 */ 4575 3724 PJ_DECL(pj_status_t) pjsua_conf_adjust_tx_level(pjsua_conf_port_id slot, … … 4585 3734 * 4586 3735 * @return PJ_SUCCESS on success, or the appropriate error code. 4587 *4588 * \par Python:4589 * Not implemented (yet)4590 3736 */ 4591 3737 PJ_DECL(pj_status_t) pjsua_conf_adjust_rx_level(pjsua_conf_port_id slot, … … 4606 3752 * 4607 3753 * @return PJ_SUCCESS on success. 4608 *4609 * \par Python:4610 * Not implemented (yet)4611 3754 */ 4612 3755 PJ_DECL(pj_status_t) pjsua_conf_get_signal_level(pjsua_conf_port_id slot, … … 4632 3775 * 4633 3776 * @return PJ_SUCCESS on success, or the appropriate error code. 4634 *4635 * \par Python:4636 * The function returns (status, id) tuple:4637 * \code4638 status, id = py_pjsua.player_create(filename, options)4639 * \endcode4640 3777 */ 4641 3778 PJ_DECL(pj_status_t) pjsua_player_create(const pj_str_t *filename, … … 4658 3795 * 4659 3796 * @return PJ_SUCCESS on success, or the appropriate error code. 4660 *4661 * \par Python:4662 * Not implemented yet.4663 3797 */ 4664 3798 PJ_DECL(pj_status_t) pjsua_playlist_create(const pj_str_t file_names[], … … 4674 3808 * 4675 3809 * @return Conference port ID associated with this player. 4676 *4677 * \par Python:4678 * \code4679 port_id = py_pjsua.player_get_conf_port(id)4680 * \endcode4681 3810 */ 4682 3811 PJ_DECL(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id); … … 4690 3819 * 4691 3820 * @return PJ_SUCCESS on success. 4692 *4693 * \par Python:4694 * Not applicable.4695 3821 */ 4696 3822 PJ_DECL(pj_status_t) pjsua_player_get_port(pjsua_player_id id, … … 4705 3831 * 4706 3832 * @return PJ_SUCCESS on success, or the appropriate error code. 4707 *4708 * \par Python:4709 * \code4710 status = py_pjsua.player_set_pos(id, samples)4711 * \endcode4712 3833 */ 4713 3834 PJ_DECL(pj_status_t) pjsua_player_set_pos(pjsua_player_id id, … … 4722 3843 * 4723 3844 * @return PJ_SUCCESS on success, or the appropriate error code. 4724 *4725 * \par Python:4726 * \code4727 status = py_pjsua.player_destroy(id)4728 * \endcode4729 3845 */ 4730 3846 PJ_DECL(pj_status_t) pjsua_player_destroy(pjsua_player_id id); … … 4756 3872 * 4757 3873 * @return PJ_SUCCESS on success, or the appropriate error code. 4758 *4759 * \par Python:4760 * \code4761 status, id = py_pjsua.recorder_create(filename, enc_type, enc_param, max_size, options)4762 * \endcode4763 * The \a enc_param is a string in Python.4764 3874 */ 4765 3875 PJ_DECL(pj_status_t) pjsua_recorder_create(const pj_str_t *filename, … … 4777 3887 * 4778 3888 * @return Conference port ID associated with this recorder. 4779 *4780 * \par Python:4781 * \code4782 port_id = py_pjsua.recorder_get_conf_port(id)4783 * \endcode4784 3889 */ 4785 3890 PJ_DECL(pjsua_conf_port_id) pjsua_recorder_get_conf_port(pjsua_recorder_id id); … … 4793 3898 * 4794 3899 * @return PJ_SUCCESS on success. 4795 *4796 * \par Python:4797 * Not applicable.4798 3900 */ 4799 3901 PJ_DECL(pj_status_t) pjsua_recorder_get_port(pjsua_recorder_id id, … … 4807 3909 * 4808 3910 * @return PJ_SUCCESS on success, or the appropriate error code. 4809 *4810 * \par Python:4811 * \code4812 status = py_pjsua.recorder_destroy(id)4813 * \endcode4814 3911 */ 4815 3912 PJ_DECL(pj_status_t) pjsua_recorder_destroy(pjsua_recorder_id id); … … 4842 3939 * 4843 3940 * @return PJ_SUCCESS on success, or the appropriate error code. 4844 *4845 *4846 * \par Python:4847 * The function returns list of sound device info:4848 * \code4849 [dev_infos] = py_pjsua.enum_snd_devs()4850 * \endcode4851 *4852 3941 */ 4853 3942 PJ_DECL(pj_status_t) pjsua_enum_snd_devs(pjmedia_snd_dev_info info[], … … 4865 3954 * 4866 3955 * @return PJ_SUCCESS on success, or the appropriate error code. 4867 *4868 * \par Python:4869 * The function takes no argument and return an (integer,integer) tuple:4870 * \code4871 capture_dev, playback_dev = py_pjsua.get_snd_dev()4872 * \endcode4873 3956 */ 4874 3957 PJ_DECL(pj_status_t) pjsua_get_snd_dev(int *capture_dev, … … 4884 3967 * 4885 3968 * @return PJ_SUCCESS on success, or the appropriate error code. 4886 *4887 * \par Python:4888 * \code4889 status = py_pjsua.set_snd_dev(capture_dev, playback_dev)4890 * \endcode4891 3969 */ 4892 3970 PJ_DECL(pj_status_t) pjsua_set_snd_dev(int capture_dev, … … 4900 3978 * 4901 3979 * @return PJ_SUCCESS on success, or the appropriate error code. 4902 *4903 * \par Python:4904 * \code4905 status = py_pjsua.set_null_snd_dev()4906 * \endcode4907 3980 */ 4908 3981 PJ_DECL(pj_status_t) pjsua_set_null_snd_dev(void); … … 4916 3989 * so that application can connect this to it's own 4917 3990 * sound device or master port. 4918 *4919 * \par Python:4920 * Not applicable (for now).4921 3991 */ 4922 3992 PJ_DECL(pjmedia_port*) pjsua_set_no_snd_dev(void); … … 4947 4017 * 4948 4018 * @return PJ_SUCCESS on success. 4949 *4950 * \par Python:4951 * \code4952 status = py_pjsua.set_ec(tail_ms, options)4953 * \endcode4954 4019 */ 4955 4020 PJ_DECL(pj_status_t) pjsua_set_ec(unsigned tail_ms, unsigned options); … … 4963 4028 * 4964 4029 * @return PJ_SUCCESS on success. 4965 *4966 * \par Python:4967 * \code4968 tail_ms = py_pjsua.get_ec_tail()4969 * \endcode4970 4030 */ 4971 4031 PJ_DECL(pj_status_t) pjsua_get_ec_tail(unsigned *p_tail_ms); … … 5049 4109 * 5050 4110 * @return PJ_SUCCESS on success, or the appropriate error code. 5051 *5052 * \par Python:5053 * This function takes no argument and returns list of codec infos:5054 * \code5055 [codec_info] = py_pjsua.enum_codecs()5056 * \endcode5057 4111 */ 5058 4112 PJ_DECL(pj_status_t) pjsua_enum_codecs( pjsua_codec_info id[], … … 5070 4124 * 5071 4125 * @return PJ_SUCCESS on success, or the appropriate error code. 5072 *5073 * \par Python:5074 * \code5075 status = py_pjsua.codec_set_priority(codec_id, priority)5076 * \endcode5077 4126 */ 5078 4127 PJ_DECL(pj_status_t) pjsua_codec_set_priority( const pj_str_t *codec_id, … … 5087 4136 * 5088 4137 * @return PJ_SUCCESS on success, or the appropriate error code. 5089 *5090 * \par Python:5091 * The Python function is experimental:5092 * \code5093 codec_param = py_pjsua.codec_get_param(codec_id)5094 * \endcode5095 4138 */ 5096 4139 PJ_DECL(pj_status_t) pjsua_codec_get_param( const pj_str_t *codec_id, … … 5105 4148 * 5106 4149 * @return PJ_SUCCESS on success, or the appropriate error code. 5107 *5108 * \par Python:5109 * The Python function is experimental:5110 * \code5111 status = py_pjsua.codec_set_param(codec_id, param)5112 * \endcode5113 5114 4150 */ 5115 4151 PJ_DECL(pj_status_t) pjsua_codec_set_param( const pj_str_t *codec_id, … … 5128 4164 * 5129 4165 * @return PJ_SUCCESS on success, or the appropriate error code. 5130 *5131 * \par Python:5132 * Not implemented yet.5133 4166 */ 5134 4167 PJ_DECL(pj_status_t) … … 5148 4181 * 5149 4182 * @return PJ_SUCCESS on success, or the appropriate error code. 5150 *5151 * \par Python:5152 * Note applicable.5153 4183 */ 5154 4184 PJ_DECL(pj_status_t)
Note: See TracChangeset
for help on using the changeset viewer.