- Timestamp:
- Nov 27, 2013 9:37:32 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/endpoint.cpp
r4644 r4657 19 19 #include <pjsua2/endpoint.hpp> 20 20 #include <pjsua2/account.hpp> 21 #include <pjsua2/presence.hpp> 21 22 #include "util.hpp" 22 23 … … 63 64 } 64 65 65 this->stunIgnoreFailure = ua_cfg.stun_ignore_failure;66 this->stunIgnoreFailure = PJ2BOOL(ua_cfg.stun_ignore_failure); 66 67 this->natTypeInSdp = ua_cfg.nat_type_in_sdp; 67 this->mwiUnsolicitedEnabled = ua_cfg.enable_unsolicited_mwi;68 this->mwiUnsolicitedEnabled = PJ2BOOL(ua_cfg.enable_unsolicited_mwi); 68 69 } 69 70 … … 205 206 this->audioFramePtime = mc.audio_frame_ptime; 206 207 this->maxMediaPorts = mc.max_media_ports; 207 this->hasIoqueue = mc.has_ioqueue;208 this->hasIoqueue = PJ2BOOL(mc.has_ioqueue); 208 209 this->threadCnt = mc.thread_cnt; 209 210 this->quality = mc.quality; 210 211 this->ptime = mc.ptime; 211 this->noVad = mc.no_vad;212 this->noVad = PJ2BOOL(mc.no_vad); 212 213 this->ilbcMode = mc.ilbc_mode; 213 214 this->txDropPct = mc.tx_drop_pct; … … 222 223 this->jbMax = mc.jb_max; 223 224 this->sndAutoCloseTime = mc.snd_auto_close_time; 224 this->vidPreviewEnableNative = mc.vid_preview_enable_native;225 this->vidPreviewEnableNative = PJ2BOOL(mc.vid_preview_enable_native); 225 226 } 226 227 … … 362 363 } catch (Error &err) { 363 364 // Ignore 365 PJ_UNUSED_ARG(err); 364 366 } 365 367 delete writer; … … 412 414 pj_timer_entry *entry) 413 415 { 416 PJ_UNUSED_ARG(timer_heap); 417 414 418 Endpoint &ep = Endpoint::instance(); 415 419 UserTimer *ut = (UserTimer*) entry->user_data; … … 505 509 506 510 OnRegStartedParam prm; 507 prm.renew = renew;511 prm.renew = PJ2BOOL(renew); 508 512 acc->onRegStarted(prm); 509 513 } … … 536 540 pjsua_msg_data *msg_data) 537 541 { 542 PJ_UNUSED_ARG(buddy_id); 543 PJ_UNUSED_ARG(srv_pres); 544 538 545 Account *acc = lookupAcc(acc_id, "on_incoming_subscribe()"); 539 546 if (!acc) { … … 543 550 544 551 OnIncomingSubscribeParam prm; 552 prm.srvPres = srv_pres; 545 553 prm.fromUri = pj2Str(*from); 546 554 prm.rdata.fromPj(*rdata); 547 555 prm.code = *code; 548 556 prm.reason = pj2Str(*reason); 557 prm.txOption.fromPj(*msg_data); 549 558 550 559 acc->onIncomingSubscribe(prm); … … 553 562 acc->tmpReason = prm.reason; 554 563 *reason = str2Pj(acc->tmpReason); 555 // TODO: 556 // apply msg_data 564 prm.txOption.toPj(*msg_data); 557 565 } 558 566 … … 599 607 pjsua_acc_id acc_id) 600 608 { 609 PJ_UNUSED_ARG(tdata); 610 601 611 OnInstantMessageStatusParam prm; 602 612 prm.userData = user_data; … … 667 677 } 668 678 679 void Endpoint::on_buddy_state(pjsua_buddy_id buddy_id) 680 { 681 Buddy *buddy = (Buddy*)pjsua_buddy_get_user_data(buddy_id); 682 if (!buddy || !buddy->isValid()) { 683 /* Ignored */ 684 return; 685 } 686 687 buddy->onBuddyState(); 688 } 689 669 690 670 691 /////////////////////////////////////////////////////////////////////////////// … … 723 744 ua_cfg.cb.on_typing2 = &Endpoint::on_typing2; 724 745 ua_cfg.cb.on_mwi_info = &Endpoint::on_mwi_info; 746 ua_cfg.cb.on_buddy_state = &Endpoint::on_buddy_state; 725 747 726 748 /* Init! */
Note: See TracChangeset
for help on using the changeset viewer.