- Timestamp:
- Oct 6, 2017 8:14:31 AM (7 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp
r5649 r5672 1652 1652 pjsua_acc_id* acc_id); 1653 1653 static void on_buddy_state(pjsua_buddy_id buddy_id); 1654 static void on_buddy_evsub_state(pjsua_buddy_id buddy_id, 1655 pjsip_evsub *sub, 1656 pjsip_event *event); 1654 1657 // Call callbacks 1655 1658 static void on_call_state(pjsua_call_id call_id, pjsip_event *e); -
pjproject/trunk/pjsip/include/pjsua2/presence.hpp
r4704 r5672 177 177 178 178 /** 179 * This structure contains parameters for Buddy::onBuddyEvSubState() callback. 180 */ 181 struct OnBuddyEvSubStateParam 182 { 183 /** 184 * * The event which triggers state change event. 185 */ 186 SipEvent e; 187 }; 188 189 190 /** 179 191 * Buddy. 180 192 */ … … 270 282 virtual void onBuddyState() 271 283 {} 284 285 /** 286 * Notify application when the state of client subscription session 287 * associated with a buddy has changed. Application may use this 288 * callback to retrieve more detailed information about the state 289 * changed event. 290 * 291 * @param prm Callback parameter. 292 */ 293 virtual void onBuddyEvSubState(OnBuddyEvSubStateParam &prm) 294 { PJ_UNUSED_ARG(prm); } 272 295 273 296 private: -
pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
r5649 r5672 972 972 973 973 buddy->onBuddyState(); 974 } 975 976 void Endpoint::on_buddy_evsub_state(pjsua_buddy_id buddy_id, 977 pjsip_evsub *sub, 978 pjsip_event *event) 979 { 980 PJ_UNUSED_ARG(sub); 981 982 Buddy *buddy = (Buddy*)pjsua_buddy_get_user_data(buddy_id); 983 if (!buddy || !buddy->isValid()) { 984 /* Ignored */ 985 return; 986 } 987 988 OnBuddyEvSubStateParam prm; 989 prm.e.fromPj(*event); 990 991 buddy->onBuddyEvSubState(prm); 974 992 } 975 993 … … 1531 1549 ua_cfg.cb.on_mwi_info = &Endpoint::on_mwi_info; 1532 1550 ua_cfg.cb.on_buddy_state = &Endpoint::on_buddy_state; 1551 ua_cfg.cb.on_buddy_evsub_state = &Endpoint::on_buddy_evsub_state; 1533 1552 ua_cfg.cb.on_acc_find_for_incoming = &Endpoint::on_acc_find_for_incoming; 1534 1553 ua_cfg.cb.on_ip_change_progress = &Endpoint::on_ip_change_progress;
Note: See TracChangeset
for help on using the changeset viewer.