Changeset 492 for pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
- Timestamp:
- Jun 6, 2006 6:40:40 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r487 r492 69 69 70 70 71 typedef int pjsua_acc_id; 72 typedef int pjsua_buddy_id; 73 typedef int pjsua_player_id; 74 typedef int pjsua_recorder_id; 75 typedef int pjsua_conf_port_id; 76 77 71 78 /** 72 79 * Account configuration. … … 136 143 unsigned start_rtp_port; 137 144 145 /** 146 * Enable incoming and outgoing message logging (default: 1). 147 */ 148 pj_bool_t msg_logging; 149 138 150 /** Maximum calls to support (default: 4) */ 139 151 unsigned max_calls; … … 223 235 /** Outbound proxy (default: none) */ 224 236 pj_str_t outbound_proxy; 225 226 /** URI to call. */227 pj_str_t uri_to_call;228 237 229 238 /** Number of SIP accounts */ … … 273 282 274 283 /** 284 * Notify application on incoming call. 285 */ 286 void (*on_incoming_call)(pjsua_acc_id acc_id, int call_index, 287 pjsip_rx_data *rdata); 288 289 /** 275 290 * Notify application on call being transfered. 276 291 * Application can decide to accept/reject transfer request … … 288 303 * registration details. 289 304 */ 290 void (*on_reg_state)( int acc_index);305 void (*on_reg_state)(pjsua_acc_id acc_id); 291 306 292 307 /** … … 294 309 * Application may then query the buddy into to get the details. 295 310 */ 296 void (*on_buddy_state)( int buddy_index);311 void (*on_buddy_state)(pjsua_buddy_id buddy_id); 297 312 298 313 /** … … 330 345 pjsip_inv_state state; 331 346 pj_str_t state_text; 347 pjsip_status_code last_status; 348 pj_str_t last_status_text; 332 349 pj_time_val connect_duration; 333 350 pj_time_val total_duration; 334 pjsip_status_code cause;335 pj_str_t cause_text;336 351 pj_bool_t has_media; 337 unsignedconf_slot;352 pjsua_conf_port_id conf_slot; 338 353 }; 339 354 … … 356 371 struct pjsua_buddy_info 357 372 { 358 unsignedindex;373 pjsua_buddy_id index; 359 374 pj_bool_t is_valid; 360 375 pj_str_t name; … … 366 381 pj_str_t status_text; 367 382 pj_bool_t monitor; 368 int acc_index;369 383 }; 370 384 … … 377 391 struct pjsua_acc_info 378 392 { 379 unsignedindex;393 pjsua_acc_id index; 380 394 pj_str_t acc_id; 381 395 pj_bool_t has_registration; … … 390 404 391 405 392 typedef int pjsua_player_id; 393 typedef int pjsua_recorder_id; 394 406 /** 407 * Conference port info. 408 */ 409 struct pjsua_conf_port_info 410 { 411 pjsua_conf_port_id slot_id; 412 pj_str_t name; 413 unsigned clock_rate; 414 unsigned channel_count; 415 unsigned samples_per_frame; 416 unsigned bits_per_sample; 417 unsigned listener_cnt; 418 pjsua_conf_port_id listeners[256]; 419 }; 420 421 422 typedef struct pjsua_conf_port_info pjsua_conf_port_info; 395 423 396 424 … … 479 507 * Get maximum number of calls configured in pjsua. 480 508 */ 481 PJ_DECL(unsigned) pjsua_ get_max_calls(void);509 PJ_DECL(unsigned) pjsua_call_get_max_count(void); 482 510 483 511 /** 484 512 * Get current number of active calls. 485 513 */ 486 PJ_DECL(unsigned) pjsua_ get_call_count(void);514 PJ_DECL(unsigned) pjsua_call_get_count(void); 487 515 488 516 /** … … 502 530 * Get call info. 503 531 */ 504 PJ_DECL(pj_status_t) pjsua_ get_call_info(unsigned call_index,532 PJ_DECL(pj_status_t) pjsua_call_get_info(unsigned call_index, 505 533 pjsua_call_info *info); 506 534 … … 509 537 * Duplicate call info. 510 538 */ 511 PJ_DECL(void) pjsua_ dup_call_info(pj_pool_t *pool,539 PJ_DECL(void) pjsua_call_info_dup(pj_pool_t *pool, 512 540 pjsua_call_info *dst_info, 513 541 const pjsua_call_info *src_info); … … 517 545 * Make outgoing call. 518 546 */ 519 PJ_DECL(pj_status_t) pjsua_ make_call(unsigned acc_index,520 521 547 PJ_DECL(pj_status_t) pjsua_call_make_call(unsigned acc_id, 548 const pj_str_t *dst_uri, 549 int *p_call_index); 522 550 523 551 … … 525 553 * Answer call. 526 554 */ 527 PJ_DECL( void) pjsua_call_answer(int call_index, int code);555 PJ_DECL(pj_status_t) pjsua_call_answer(int call_index, int code); 528 556 529 557 /** … … 536 564 * Put call on-hold. 537 565 */ 538 PJ_DECL( void) pjsua_call_set_hold(int call_index);566 PJ_DECL(pj_status_t) pjsua_call_set_hold(int call_index); 539 567 540 568 … … 542 570 * Send re-INVITE (to release hold). 543 571 */ 544 PJ_DECL( void) pjsua_call_reinvite(int call_index);572 PJ_DECL(pj_status_t) pjsua_call_reinvite(int call_index); 545 573 546 574 … … 548 576 * Transfer call. 549 577 */ 550 PJ_DECL( void) pjsua_call_xfer(unsigned call_index, const pj_str_t *dest);578 PJ_DECL(pj_status_t) pjsua_call_xfer(unsigned call_index, const pj_str_t *dest); 551 579 552 580 /** … … 560 588 * Send instant messaging inside INVITE session. 561 589 */ 562 PJ_DECL( void) pjsua_call_send_im(int call_index, const pj_str_t *text);590 PJ_DECL(pj_status_t) pjsua_call_send_im(int call_index, const pj_str_t *text); 563 591 564 592 … … 566 594 * Send IM typing indication inside INVITE session. 567 595 */ 568 PJ_DECL(void) pjsua_call_typing(int call_index, pj_bool_t is_typing); 596 PJ_DECL(pj_status_t) pjsua_call_send_typing_ind(int call_index, 597 pj_bool_t is_typing); 569 598 570 599 /** … … 577 606 * Dump call and media statistics to string. 578 607 */ 579 PJ_DECL(void) pjsua_ dump_call(int call_index, int with_media,608 PJ_DECL(void) pjsua_call_dump(int call_index, int with_media, 580 609 char *buffer, unsigned maxlen, 581 610 const char *indent); … … 595 624 * Get account info. 596 625 */ 597 PJ_DECL(pj_status_t) pjsua_acc_get_info( unsigned acc_index,626 PJ_DECL(pj_status_t) pjsua_acc_get_info(pjsua_acc_id acc_id, 598 627 pjsua_acc_info *info); 628 629 630 /** 631 * Enum accounts id. 632 */ 633 PJ_DECL(pj_status_t) pjsua_acc_enum_id( pjsua_acc_id ids[], 634 unsigned *count ); 635 636 637 /** 638 * Enum accounts info. 639 */ 640 PJ_DECL(pj_status_t) pjsua_acc_enum_info( pjsua_acc_info info[], 641 unsigned *count ); 642 643 644 /** 645 * Find account for outgoing request. 646 */ 647 PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_outgoing(const pj_str_t *url); 648 649 /** 650 * Find account for incoming request. 651 */ 652 PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_incoming(pjsip_rx_data *rdata); 599 653 600 654 /** … … 605 659 */ 606 660 PJ_DECL(pj_status_t) pjsua_acc_add(const pjsua_acc_config *cfg, 607 int *acc_index); 661 pjsua_acc_id *acc_id); 662 663 /** 664 * Delete account. 665 */ 666 PJ_DECL(pj_status_t) pjsua_acc_del(pjsua_acc_id acc_id); 608 667 609 668 610 669 /** 611 670 * Set account's presence status. 612 * Must call pjsua_pres_refresh() after this. 613 */ 614 PJ_DECL(pj_status_t) pjsua_acc_set_online_status(unsigned acc_index, 671 */ 672 PJ_DECL(pj_status_t) pjsua_acc_set_online_status(pjsua_acc_id acc_id, 615 673 pj_bool_t is_online); 616 674 … … 620 678 * this will start unregistration process. 621 679 */ 622 PJ_DECL(pj_status_t) pjsua_acc_set_registration(unsigned acc_index, pj_bool_t renew); 680 PJ_DECL(pj_status_t) pjsua_acc_set_registration(pjsua_acc_id acc_id, 681 pj_bool_t renew); 623 682 624 683 … … 638 697 * Get buddy info. 639 698 */ 640 PJ_DECL(pj_status_t) pjsua_buddy_get_info( unsigned buddy_index,699 PJ_DECL(pj_status_t) pjsua_buddy_get_info(pjsua_buddy_id buddy_index, 641 700 pjsua_buddy_info *info); 642 701 … … 645 704 */ 646 705 PJ_DECL(pj_status_t) pjsua_buddy_add(const pj_str_t *uri, 647 int *buddy_index); 706 pjsua_buddy_id *buddy_index); 707 708 709 /** 710 * Delete buddy. 711 */ 712 PJ_DECL(pj_status_t) pjsua_buddy_del(pjsua_buddy_id buddy_index); 648 713 649 714 650 715 /** 651 716 * Enable/disable buddy's presence monitoring. 652 * Must call pjsua_pres_refresh() after this. 653 */ 654 PJ_DECL(pj_status_t) pjsua_buddy_subscribe_pres(unsigned buddy_index, 717 */ 718 PJ_DECL(pj_status_t) pjsua_buddy_subscribe_pres(pjsua_buddy_id buddy_index, 655 719 pj_bool_t monitor); 656 720 657 658 /**659 * Refresh both presence client and server subscriptions.660 */661 PJ_DECL(void) pjsua_pres_refresh(void);662 721 663 722 /** … … 681 740 * Send IM outside dialog. 682 741 */ 683 PJ_DECL(pj_status_t) pjsua_im_send(int acc_i ndex, const pj_str_t *dst_uri,742 PJ_DECL(pj_status_t) pjsua_im_send(int acc_id, const pj_str_t *dst_uri, 684 743 const pj_str_t *text); 685 744 … … 688 747 * Send typing indication outside dialog. 689 748 */ 690 PJ_DECL(pj_status_t) pjsua_im_typing(int acc_i ndex, const pj_str_t *dst_uri,749 PJ_DECL(pj_status_t) pjsua_im_typing(int acc_id, const pj_str_t *dst_uri, 691 750 pj_bool_t is_typing); 692 751 … … 706 765 * Enum all conference ports. 707 766 */ 708 PJ_DECL(pj_status_t) pjsua_conf_enum_ports(unsigned *count, 709 pjmedia_conf_port_info info[]); 767 PJ_DECL(pj_status_t) pjsua_conf_enum_port_ids(pjsua_conf_port_id id[], 768 unsigned *count); 769 770 771 /** 772 * Get information about the specified conference port 773 */ 774 PJ_DECL(pj_status_t) pjsua_conf_get_port_info( pjsua_conf_port_id id, 775 pjsua_conf_port_info *info); 710 776 711 777 … … 713 779 * Connect conference port. 714 780 */ 715 PJ_DECL(pj_status_t) pjsua_conf_connect( unsigned src_port,716 unsigned dst_port);781 PJ_DECL(pj_status_t) pjsua_conf_connect(pjsua_conf_port_id src_port, 782 pjsua_conf_port_id dst_port); 717 783 718 784 … … 720 786 * Connect conference port connection. 721 787 */ 722 PJ_DECL(pj_status_t) pjsua_conf_disconnect( unsigned src_port,723 unsigned dst_port);788 PJ_DECL(pj_status_t) pjsua_conf_disconnect(pjsua_conf_port_id src_port, 789 pjsua_conf_port_id dst_port); 724 790 725 791 … … 734 800 * Get conference port associated with player. 735 801 */ 736 PJ_DECL( int) pjsua_player_get_conf_port(pjsua_player_id id);802 PJ_DECL(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id); 737 803 738 804 … … 761 827 * Get conference port associated with recorder. 762 828 */ 763 PJ_DECL( int) pjsua_recorder_get_conf_port(pjsua_recorder_id id);829 PJ_DECL(pjsua_conf_port_id) pjsua_recorder_get_conf_port(pjsua_recorder_id id); 764 830 765 831 … … 798 864 */ 799 865 PJ_DECL(pj_status_t) pjsua_parse_args(int argc, char *argv[], 800 pjsua_config *cfg); 866 pjsua_config *cfg, 867 pj_str_t *uri_to_call); 801 868 802 869 /** … … 804 871 */ 805 872 PJ_DECL(pj_status_t) pjsua_load_settings(const char *filename, 806 pjsua_config *cfg); 873 pjsua_config *cfg, 874 pj_str_t *uri_to_call); 807 875 808 876 /** 809 877 * Get pjsua running config. 810 878 */ 811 PJ_DECL(const pjsua_config*) pjsua_get_config(void); 879 PJ_DECL(void) pjsua_get_config(pj_pool_t *pool, 880 pjsua_config *config); 812 881 813 882
Note: See TracChangeset
for help on using the changeset viewer.