Changeset 5969 for pjproject/trunk/pjsip/src/pjsua2/account.cpp
- Timestamp:
- Apr 15, 2019 10:52:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua2/account.cpp
r5837 r5969 1029 1029 } 1030 1030 1031 BuddyVector2 Account::enumBuddies2() const throw(Error) 1032 { 1033 BuddyVector2 bv2; 1034 pjsua_buddy_id ids[PJSUA_MAX_BUDDIES]; 1035 unsigned i, count = PJSUA_MAX_BUDDIES; 1036 1037 PJSUA2_CHECK_EXPR( pjsua_enum_buddies(ids, &count) ); 1038 for (i = 0; i < count; ++i) { 1039 bv2.push_back(Buddy(ids[i])); 1040 } 1041 1042 return bv2; 1043 } 1044 1031 1045 Buddy* Account::findBuddy(string uri, FindBuddyMatch *buddy_match) const 1032 1046 throw(Error) … … 1042 1056 } 1043 1057 PJSUA2_RAISE_ERROR(PJ_ENOTFOUND); 1058 } 1059 1060 Buddy Account::findBuddy2(string uri) const throw(Error) 1061 { 1062 pj_str_t pj_uri; 1063 pjsua_buddy_id id; 1064 1065 pj_strset2(&pj_uri, (char*)uri.c_str()); 1066 1067 id = pjsua_buddy_find(&pj_uri); 1068 if (id == PJSUA_INVALID_ID) { 1069 PJSUA2_RAISE_ERROR(PJ_ENOTFOUND); 1070 } 1071 1072 Buddy buddy(id); 1073 return buddy; 1044 1074 } 1045 1075
Note: See TracChangeset
for help on using the changeset viewer.