Changeset 5278 for pjproject


Ignore:
Timestamp:
Apr 19, 2016 7:29:54 AM (9 years ago)
Author:
ming
Message:

Re #1882 (misc): Add implementation to call Endpoint::onSelectAccount() callback

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp

    r5185 r5278  
    13111311    static void on_mwi_info(pjsua_acc_id acc_id, 
    13121312                            pjsua_mwi_info *mwi_info); 
    1313  
     1313    static void on_acc_find_for_incoming(const pjsip_rx_data *rdata, 
     1314                                         pjsua_acc_id* acc_id); 
    13141315    static void on_buddy_state(pjsua_buddy_id buddy_id); 
    13151316    // Call callbacks 
  • pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp

    r5274 r5278  
    817817} 
    818818 
     819void Endpoint::on_acc_find_for_incoming(const pjsip_rx_data *rdata, 
     820                                        pjsua_acc_id* acc_id) 
     821{ 
     822    OnSelectAccountParam prm; 
     823 
     824    pj_assert(rdata && acc_id); 
     825    prm.rdata.fromPj(*((pjsip_rx_data *)rdata)); 
     826    prm.accountIndex = *acc_id; 
     827     
     828    instance_->onSelectAccount(prm); 
     829     
     830    *acc_id = prm.accountIndex; 
     831} 
     832 
    819833void Endpoint::on_buddy_state(pjsua_buddy_id buddy_id) 
    820834{ 
     
    12861300    ua_cfg.cb.on_mwi_info       = &Endpoint::on_mwi_info; 
    12871301    ua_cfg.cb.on_buddy_state    = &Endpoint::on_buddy_state; 
     1302    ua_cfg.cb.on_acc_find_for_incoming  = &Endpoint::on_acc_find_for_incoming; 
    12881303 
    12891304    /* Call callbacks */ 
Note: See TracChangeset for help on using the changeset viewer.