Changeset 6026 for pjproject/trunk/pjsip/src/pjsua2/account.cpp
- Timestamp:
- Jun 12, 2019 6:00:35 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua2/account.cpp
r6009 r6026 85 85 } 86 86 87 void RtcpFbConfig::readObject(const ContainerNode &node) throw(Error)87 void RtcpFbConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error) 88 88 { 89 89 ContainerNode this_node = node.readContainer("RtcpFbConfig"); … … 102 102 } 103 103 104 void RtcpFbConfig::writeObject(ContainerNode &node) const throw(Error)104 void RtcpFbConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error) 105 105 { 106 106 ContainerNode this_node = node.writeNewContainer("RtcpFbConfig"); … … 180 180 } 181 181 182 void SrtpOpt::readObject(const ContainerNode &node) throw(Error)182 void SrtpOpt::readObject(const ContainerNode &node) PJSUA2_THROW(Error) 183 183 { 184 184 ContainerNode this_node = node.readContainer("SrtpOpt"); … … 203 203 } 204 204 205 void SrtpOpt::writeObject(ContainerNode &node) const throw(Error)205 void SrtpOpt::writeObject(ContainerNode &node) const PJSUA2_THROW(Error) 206 206 { 207 207 ContainerNode this_node = node.writeNewContainer("SrtpOpt"); … … 222 222 /////////////////////////////////////////////////////////////////////////////// 223 223 224 void AccountRegConfig::readObject(const ContainerNode &node) throw(Error) 224 void AccountRegConfig::readObject(const ContainerNode &node) 225 PJSUA2_THROW(Error) 225 226 { 226 227 ContainerNode this_node = node.readContainer("AccountRegConfig"); … … 241 242 } 242 243 243 void AccountRegConfig::writeObject(ContainerNode &node) const throw(Error) 244 void AccountRegConfig::writeObject(ContainerNode &node) const 245 PJSUA2_THROW(Error) 244 246 { 245 247 ContainerNode this_node = node.writeNewContainer("AccountRegConfig"); … … 262 264 /////////////////////////////////////////////////////////////////////////////// 263 265 264 void AccountSipConfig::readObject(const ContainerNode &node) throw(Error) 266 void AccountSipConfig::readObject(const ContainerNode &node) 267 PJSUA2_THROW(Error) 265 268 { 266 269 ContainerNode this_node = node.readContainer("AccountSipConfig"); … … 283 286 } 284 287 285 void AccountSipConfig::writeObject(ContainerNode &node) const throw(Error) 288 void AccountSipConfig::writeObject(ContainerNode &node) const 289 PJSUA2_THROW(Error) 286 290 { 287 291 ContainerNode this_node = node.writeNewContainer("AccountSipConfig"); … … 303 307 /////////////////////////////////////////////////////////////////////////////// 304 308 305 void AccountCallConfig::readObject(const ContainerNode &node) throw(Error) 309 void AccountCallConfig::readObject(const ContainerNode &node) 310 PJSUA2_THROW(Error) 306 311 { 307 312 ContainerNode this_node = node.readContainer("AccountCallConfig"); … … 314 319 } 315 320 316 void AccountCallConfig::writeObject(ContainerNode &node) const throw(Error) 321 void AccountCallConfig::writeObject(ContainerNode &node) const 322 PJSUA2_THROW(Error) 317 323 { 318 324 ContainerNode this_node = node.writeNewContainer("AccountCallConfig"); … … 327 333 /////////////////////////////////////////////////////////////////////////////// 328 334 329 void AccountPresConfig::readObject(const ContainerNode &node) throw(Error) 335 void AccountPresConfig::readObject(const ContainerNode &node) 336 PJSUA2_THROW(Error) 330 337 { 331 338 ContainerNode this_node = node.readContainer("AccountPresConfig"); … … 339 346 } 340 347 341 void AccountPresConfig::writeObject(ContainerNode &node) const throw(Error) 348 void AccountPresConfig::writeObject(ContainerNode &node) const 349 PJSUA2_THROW(Error) 342 350 { 343 351 ContainerNode this_node = node.writeNewContainer("AccountPresConfig"); … … 353 361 /////////////////////////////////////////////////////////////////////////////// 354 362 355 void AccountMwiConfig::readObject(const ContainerNode &node) throw(Error) 363 void AccountMwiConfig::readObject(const ContainerNode &node) 364 PJSUA2_THROW(Error) 356 365 { 357 366 ContainerNode this_node = node.readContainer("AccountMwiConfig"); … … 361 370 } 362 371 363 void AccountMwiConfig::writeObject(ContainerNode &node) const throw(Error) 372 void AccountMwiConfig::writeObject(ContainerNode &node) const 373 PJSUA2_THROW(Error) 364 374 { 365 375 ContainerNode this_node = node.writeNewContainer("AccountMwiConfig"); … … 371 381 /////////////////////////////////////////////////////////////////////////////// 372 382 373 void AccountNatConfig::readObject(const ContainerNode &node) throw(Error) 383 void AccountNatConfig::readObject(const ContainerNode &node) 384 PJSUA2_THROW(Error) 374 385 { 375 386 ContainerNode this_node = node.readContainer("AccountNatConfig"); … … 403 414 } 404 415 405 void AccountNatConfig::writeObject(ContainerNode &node) const throw(Error) 416 void AccountNatConfig::writeObject(ContainerNode &node) const 417 PJSUA2_THROW(Error) 406 418 { 407 419 ContainerNode this_node = node.writeNewContainer("AccountNatConfig"); … … 437 449 /////////////////////////////////////////////////////////////////////////////// 438 450 439 void AccountMediaConfig::readObject(const ContainerNode &node) throw(Error) 451 void AccountMediaConfig::readObject(const ContainerNode &node) 452 PJSUA2_THROW(Error) 440 453 { 441 454 ContainerNode this_node = node.readContainer("AccountMediaConfig"); … … 451 464 } 452 465 453 void AccountMediaConfig::writeObject(ContainerNode &node) const throw(Error) 466 void AccountMediaConfig::writeObject(ContainerNode &node) const 467 PJSUA2_THROW(Error) 454 468 { 455 469 ContainerNode this_node = node.writeNewContainer("AccountMediaConfig"); … … 467 481 /////////////////////////////////////////////////////////////////////////////// 468 482 469 void AccountVideoConfig::readObject(const ContainerNode &node) throw(Error) 483 void AccountVideoConfig::readObject(const ContainerNode &node) 484 PJSUA2_THROW(Error) 470 485 { 471 486 ContainerNode this_node = node.readContainer("AccountVideoConfig"); … … 474 489 NODE_READ_BOOL ( this_node, autoTransmitOutgoing); 475 490 NODE_READ_UNSIGNED( this_node, windowFlags); 476 NODE_READ_NUM_T ( this_node, pjmedia_vid_dev_index, defaultCaptureDevice); 477 NODE_READ_NUM_T ( this_node, pjmedia_vid_dev_index, defaultRenderDevice); 478 NODE_READ_NUM_T ( this_node, pjmedia_vid_stream_rc_method, rateControlMethod); 491 NODE_READ_NUM_T ( this_node, pjmedia_vid_dev_index, 492 defaultCaptureDevice); 493 NODE_READ_NUM_T ( this_node, pjmedia_vid_dev_index, 494 defaultRenderDevice); 495 NODE_READ_NUM_T ( this_node, pjmedia_vid_stream_rc_method, 496 rateControlMethod); 479 497 NODE_READ_UNSIGNED( this_node, rateControlBandwidth); 480 498 NODE_READ_UNSIGNED( this_node, startKeyframeCount); … … 482 500 } 483 501 484 void AccountVideoConfig::writeObject(ContainerNode &node) const throw(Error) 502 void AccountVideoConfig::writeObject(ContainerNode &node) const 503 PJSUA2_THROW(Error) 485 504 { 486 505 ContainerNode this_node = node.writeNewContainer("AccountVideoConfig"); … … 489 508 NODE_WRITE_BOOL ( this_node, autoTransmitOutgoing); 490 509 NODE_WRITE_UNSIGNED( this_node, windowFlags); 491 NODE_WRITE_NUM_T ( this_node, pjmedia_vid_dev_index, defaultCaptureDevice); 492 NODE_WRITE_NUM_T ( this_node, pjmedia_vid_dev_index, defaultRenderDevice); 493 NODE_WRITE_NUM_T ( this_node, pjmedia_vid_stream_rc_method, rateControlMethod); 510 NODE_WRITE_NUM_T ( this_node, pjmedia_vid_dev_index, 511 defaultCaptureDevice); 512 NODE_WRITE_NUM_T ( this_node, pjmedia_vid_dev_index, 513 defaultRenderDevice); 514 NODE_WRITE_NUM_T ( this_node, pjmedia_vid_stream_rc_method, 515 rateControlMethod); 494 516 NODE_WRITE_UNSIGNED( this_node, rateControlBandwidth); 495 517 NODE_WRITE_UNSIGNED( this_node, startKeyframeCount); … … 498 520 /////////////////////////////////////////////////////////////////////////////// 499 521 500 void AccountIpChangeConfig::readObject(const ContainerNode &node) throw(Error) 522 void AccountIpChangeConfig::readObject(const ContainerNode &node) 523 PJSUA2_THROW(Error) 501 524 { 502 525 ContainerNode this_node = node.readContainer("AccountIpChangeConfig"); … … 507 530 } 508 531 509 void AccountIpChangeConfig::writeObject(ContainerNode &node) const throw(Error) 532 void AccountIpChangeConfig::writeObject(ContainerNode &node) const 533 PJSUA2_THROW(Error) 510 534 { 511 535 ContainerNode this_node = node.writeNewContainer("AccountIpChangeConfig"); … … 614 638 ret.ice_cfg.ice_max_host_cands = natConfig.iceMaxHostCands; 615 639 ret.ice_cfg.ice_opt.aggressive = natConfig.iceAggressiveNomination; 616 ret.ice_cfg.ice_opt.nominated_check_delay = natConfig.iceNominatedCheckDelayMsec; 617 ret.ice_cfg.ice_opt.controlled_agent_want_nom_timeout = natConfig.iceWaitNominationTimeoutMsec; 640 ret.ice_cfg.ice_opt.nominated_check_delay = 641 natConfig.iceNominatedCheckDelayMsec; 642 ret.ice_cfg.ice_opt.controlled_agent_want_nom_timeout = 643 natConfig.iceWaitNominationTimeoutMsec; 618 644 ret.ice_cfg.ice_no_rtcp = natConfig.iceNoRtcp; 619 645 ret.ice_cfg.ice_always_update = natConfig.iceAlwaysUpdate; … … 624 650 ret.turn_cfg.turn_conn_type = natConfig.turnConnType; 625 651 ret.turn_cfg.turn_auth_cred.type = PJ_STUN_AUTH_CRED_STATIC; 626 ret.turn_cfg.turn_auth_cred.data.static_cred.username = str2Pj(natConfig.turnUserName); 627 ret.turn_cfg.turn_auth_cred.data.static_cred.data_type = (pj_stun_passwd_type)natConfig.turnPasswordType; 628 ret.turn_cfg.turn_auth_cred.data.static_cred.data = str2Pj(natConfig.turnPassword); 652 ret.turn_cfg.turn_auth_cred.data.static_cred.username = 653 str2Pj(natConfig.turnUserName); 654 ret.turn_cfg.turn_auth_cred.data.static_cred.data_type = 655 (pj_stun_passwd_type)natConfig.turnPasswordType; 656 ret.turn_cfg.turn_auth_cred.data.static_cred.data = 657 str2Pj(natConfig.turnPassword); 629 658 ret.turn_cfg.turn_auth_cred.data.static_cred.realm = pj_str((char*)""); 630 659 ret.turn_cfg.turn_auth_cred.data.static_cred.nonce = pj_str((char*)""); … … 765 794 natConfig.iceEnabled = PJ2BOOL(prm.ice_cfg.enable_ice); 766 795 natConfig.iceMaxHostCands = prm.ice_cfg.ice_max_host_cands; 767 natConfig.iceAggressiveNomination = PJ2BOOL(prm.ice_cfg.ice_opt.aggressive); 768 natConfig.iceNominatedCheckDelayMsec = prm.ice_cfg.ice_opt.nominated_check_delay; 769 natConfig.iceWaitNominationTimeoutMsec = prm.ice_cfg.ice_opt.controlled_agent_want_nom_timeout; 796 natConfig.iceAggressiveNomination = 797 PJ2BOOL(prm.ice_cfg.ice_opt.aggressive); 798 natConfig.iceNominatedCheckDelayMsec = 799 prm.ice_cfg.ice_opt.nominated_check_delay; 800 natConfig.iceWaitNominationTimeoutMsec = 801 prm.ice_cfg.ice_opt.controlled_agent_want_nom_timeout; 770 802 natConfig.iceNoRtcp = PJ2BOOL(prm.ice_cfg.ice_no_rtcp); 771 803 natConfig.iceAlwaysUpdate = PJ2BOOL(prm.ice_cfg.ice_always_update); … … 779 811 natConfig.iceMaxHostCands= mcfg->ice_max_host_cands; 780 812 natConfig.iceAggressiveNomination = PJ2BOOL(mcfg->ice_opt.aggressive); 781 natConfig.iceNominatedCheckDelayMsec = mcfg->ice_opt.nominated_check_delay; 782 natConfig.iceWaitNominationTimeoutMsec = mcfg->ice_opt.controlled_agent_want_nom_timeout; 813 natConfig.iceNominatedCheckDelayMsec = 814 mcfg->ice_opt.nominated_check_delay; 815 natConfig.iceWaitNominationTimeoutMsec = 816 mcfg->ice_opt.controlled_agent_want_nom_timeout; 783 817 natConfig.iceNoRtcp = PJ2BOOL(mcfg->ice_no_rtcp); 784 818 natConfig.iceAlwaysUpdate = PJ2BOOL(mcfg->ice_always_update); … … 789 823 natConfig.turnServer = pj2Str(prm.turn_cfg.turn_server); 790 824 natConfig.turnConnType = prm.turn_cfg.turn_conn_type; 791 natConfig.turnUserName = pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.username); 792 natConfig.turnPasswordType = prm.turn_cfg.turn_auth_cred.data.static_cred.data_type; 793 natConfig.turnPassword = pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.data); 825 natConfig.turnUserName = 826 pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.username); 827 natConfig.turnPasswordType = 828 prm.turn_cfg.turn_auth_cred.data.static_cred.data_type; 829 natConfig.turnPassword = 830 pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.data); 794 831 } else { 795 832 pjsua_media_config default_mcfg; … … 801 838 natConfig.turnServer = pj2Str(mcfg->turn_server); 802 839 natConfig.turnConnType = mcfg->turn_conn_type; 803 natConfig.turnUserName = pj2Str(mcfg->turn_auth_cred.data.static_cred.username); 804 natConfig.turnPasswordType = mcfg->turn_auth_cred.data.static_cred.data_type; 805 natConfig.turnPassword = pj2Str(mcfg->turn_auth_cred.data.static_cred.data); 840 natConfig.turnUserName = 841 pj2Str(mcfg->turn_auth_cred.data.static_cred.username); 842 natConfig.turnPasswordType = 843 mcfg->turn_auth_cred.data.static_cred.data_type; 844 natConfig.turnPassword = 845 pj2Str(mcfg->turn_auth_cred.data.static_cred.data); 806 846 } 807 847 natConfig.contactRewriteUse = prm.allow_contact_rewrite; … … 848 888 } 849 889 850 void AccountConfig::readObject(const ContainerNode &node) throw(Error)890 void AccountConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error) 851 891 { 852 892 ContainerNode this_node = node.readContainer("AccountConfig"); … … 864 904 } 865 905 866 void AccountConfig::writeObject(ContainerNode &node) const throw(Error)906 void AccountConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error) 867 907 { 868 908 ContainerNode this_node = node.writeNewContainer("AccountConfig"); … … 915 955 916 956 void Account::create(const AccountConfig &acc_cfg, 917 bool make_default) throw(Error)957 bool make_default) PJSUA2_THROW(Error) 918 958 { 919 959 pjsua_acc_config pj_acc_cfg; … … 941 981 } 942 982 943 void Account::modify(const AccountConfig &acc_cfg) throw(Error)983 void Account::modify(const AccountConfig &acc_cfg) PJSUA2_THROW(Error) 944 984 { 945 985 pjsua_acc_config pj_acc_cfg; … … 955 995 } 956 996 957 void Account::setDefault() throw(Error)997 void Account::setDefault() PJSUA2_THROW(Error) 958 998 { 959 999 PJSUA2_CHECK_EXPR( pjsua_acc_set_default(id) ); … … 975 1015 } 976 1016 977 AccountInfo Account::getInfo() const throw(Error)1017 AccountInfo Account::getInfo() const PJSUA2_THROW(Error) 978 1018 { 979 1019 pjsua_acc_info pj_ai; … … 985 1025 } 986 1026 987 void Account::setRegistration(bool renew) throw(Error)1027 void Account::setRegistration(bool renew) PJSUA2_THROW(Error) 988 1028 { 989 1029 PJSUA2_CHECK_EXPR( pjsua_acc_set_registration(id, renew) ); … … 991 1031 992 1032 void 993 Account::setOnlineStatus(const PresenceStatus &pres_st) throw(Error)1033 Account::setOnlineStatus(const PresenceStatus &pres_st) PJSUA2_THROW(Error) 994 1034 { 995 1035 pjrpid_element pj_rpid; … … 1006 1046 } 1007 1047 1008 void Account::setTransport(TransportId tp_id) throw(Error)1048 void Account::setTransport(TransportId tp_id) PJSUA2_THROW(Error) 1009 1049 { 1010 1050 PJSUA2_CHECK_EXPR( pjsua_acc_set_transport(id, tp_id) ); 1011 1051 } 1012 1052 1013 void Account::presNotify(const PresNotifyParam &prm) throw(Error)1053 void Account::presNotify(const PresNotifyParam &prm) PJSUA2_THROW(Error) 1014 1054 { 1015 1055 pj_str_t pj_state_str = str2Pj(prm.stateStr); … … 1024 1064 } 1025 1065 1026 const BuddyVector& Account::enumBuddies() const throw(Error)1066 const BuddyVector& Account::enumBuddies() const PJSUA2_THROW(Error) 1027 1067 { 1028 1068 return buddyList; 1029 1069 } 1030 1070 1031 BuddyVector2 Account::enumBuddies2() const throw(Error)1071 BuddyVector2 Account::enumBuddies2() const PJSUA2_THROW(Error) 1032 1072 { 1033 1073 BuddyVector2 bv2; … … 1044 1084 1045 1085 Buddy* Account::findBuddy(string uri, FindBuddyMatch *buddy_match) const 1046 throw(Error)1086 PJSUA2_THROW(Error) 1047 1087 { 1048 1088 if (!buddy_match) { … … 1058 1098 } 1059 1099 1060 Buddy Account::findBuddy2(string uri) const throw(Error)1100 Buddy Account::findBuddy2(string uri) const PJSUA2_THROW(Error) 1061 1101 { 1062 1102 pj_str_t pj_uri;
Note: See TracChangeset
for help on using the changeset viewer.