Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
0a537423
Commit
0a537423
authored
Aug 10, 2018
by
Benjamin REIS
Browse files
add get friend list by display name api
parent
c50eab58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
coreapi/linphonecore.c
coreapi/linphonecore.c
+19
-0
include/linphone/core.h
include/linphone/core.h
+8
-0
No files found.
coreapi/linphonecore.c
View file @
0a537423
...
...
@@ -2739,6 +2739,25 @@ LinphoneFriendList* linphone_core_get_default_friend_list(const LinphoneCore *lc
return
NULL
;
}
LinphoneFriendList
*
linphone_core_get_friend_list_by_name
(
const
LinphoneCore
*
lc
,
const
char
*
name
)
{
if
(
!
lc
)
return
NULL
;
LinphoneFriendList
*
ret
=
NULL
;
bctbx_list_t
*
list_copy
=
lc
->
friends_lists
;
while
(
list_copy
)
{
LinphoneFriendList
*
list
=
(
LinphoneFriendList
*
)
list_copy
->
data
;
const
char
*
list_name
=
linphone_friend_list_get_display_name
(
list
);
if
(
list_name
&&
strcmp
(
name
,
list_name
)
==
0
)
{
ret
=
list
;
break
;
}
list_copy
=
list_copy
->
next
;
}
return
ret
;
}
void
linphone_core_remove_friend_list
(
LinphoneCore
*
lc
,
LinphoneFriendList
*
list
)
{
bctbx_list_t
*
elem
=
bctbx_list_find
(
lc
->
friends_lists
,
list
);
if
(
elem
==
NULL
)
return
;
...
...
include/linphone/core.h
View file @
0a537423
...
...
@@ -5449,6 +5449,14 @@ LINPHONE_PUBLIC const bctbx_list_t * linphone_core_get_friends_lists(const Linph
*/
LINPHONE_PUBLIC
LinphoneFriendList
*
linphone_core_get_default_friend_list
(
const
LinphoneCore
*
lc
);
/**
* Retrieves the list of #LinphoneFriend from the core that has the given display name.
* @param[in] lc #LinphoneCore object
* @param[in] name the name of the list
* @return the first #LinphoneFriendList object or NULL
*/
LINPHONE_PUBLIC
LinphoneFriendList
*
linphone_core_get_friend_list_by_name
(
const
LinphoneCore
*
lc
,
const
char
*
name
);
/**
* Retrieves a list of #LinphoneAddress sort and filter
* @param[in] lc #LinphoneCore object
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment