public interface FriendList
Friend
. Modifier and Type | Interface and Description |
---|---|
static class |
FriendList.Status |
static class |
FriendList.SyncStatus |
Modifier and Type | Method and Description |
---|---|
FriendList.Status |
addFriend(Friend linphoneFriend)
Add a friend to a friend list.
|
void |
addListener(FriendListListener listener) |
FriendList.Status |
addLocalFriend(Friend linphoneFriend)
Add a friend to a friend list.
|
void |
enableSubscriptions(boolean enabled)
Enable subscription to NOTIFYes of all friends list.
|
void |
exportFriendsAsVcard4File(java.lang.String vcardFile)
|
Friend |
findFriendByAddress(Address address)
Find a friend in the friend list using a LinphoneAddress.
|
Friend |
findFriendByPhoneNumber(java.lang.String phoneNumber)
Find a friend in the friend list using a phone number.
|
Friend |
findFriendByRefKey(java.lang.String refKey)
Find a friend in the friend list using a ref key.
|
Friend |
findFriendByUri(java.lang.String uri)
Find a friend in the friend list using an URI string.
|
Friend[] |
findFriendsByAddress(Address address)
Find all friends in the friend list using a LinphoneAddress.
|
Friend[] |
findFriendsByUri(java.lang.String uri)
Find all friends in the friend list using an URI string.
|
Core |
getCore()
Returns the
Core object attached to this LinphoneFriendList. |
java.lang.String |
getDisplayName()
Get the display name of the friend list.
|
Friend[] |
getFriends()
Retrieves the list of
Friend from this LinphoneFriendList. |
long |
getNativePointer()
Gets the native pointer used by this class to make native method calls.
|
Address |
getRlsAddress()
Get the RLS (Resource List Server) URI associated with the friend list to
subscribe to these friends presence. |
java.lang.String |
getRlsUri()
Deprecated.
27/10/2020. Use
getRlsAddress() instead. |
java.lang.String |
getUri()
Get the URI associated with the friend list.
|
java.lang.Object |
getUserData()
Gets the object stored in this object user's data
|
int |
importFriendsFromVcard4Buffer(java.lang.String vcardBuffer)
|
int |
importFriendsFromVcard4File(java.lang.String vcardFile)
|
boolean |
isSubscriptionBodyless()
Get wheter the subscription of the friend list is bodyless or not.
|
void |
notifyPresence(PresenceModel presence)
Notify our presence to all the friends in the friend list that have subscribed
to our presence directly (not using a RLS). |
FriendList.Status |
removeFriend(Friend linphoneFriend)
Remove a friend from a friend list.
|
void |
removeListener(FriendListListener listener) |
void |
setDisplayName(java.lang.String displayName)
Set the display name of the friend list.
|
void |
setListener(FriendListListener listener) |
void |
setRlsAddress(Address rlsAddr)
Set the RLS (Resource List Server) URI associated with the friend list to
subscribe to these friends presence. |
void |
setRlsUri(java.lang.String rlsUri)
Deprecated.
27/10/2020. Use
setRlsAddress(org.linphone.core.Address) instead. |
void |
setSubscriptionBodyless(boolean bodyless)
Set wheter the subscription of the friend list is bodyless or not.
|
void |
setUri(java.lang.String uri)
Set the URI associated with the friend list.
|
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
boolean |
subscriptionsEnabled()
Gets whether subscription to NOTIFYes of all friends list are enabled or not.
|
void |
synchronizeFriendsFromServer()
Starts a CardDAV synchronization using value set using
linphone_friend_list_set_uri. |
java.lang.String |
toString() |
void |
updateDirtyFriends()
Goes through all the
Friend that are dirty and does a CardDAV PUT toupdate the server. |
void |
updateRevision(int revision)
Sets the revision from the last synchronization.
|
void |
updateSubscriptions()
Update presence subscriptions for the entire list.
|
@Nullable java.lang.String getDisplayName()
void setDisplayName(@Nullable java.lang.String displayName)
displayName
- The new display name of the friend list. boolean isSubscriptionBodyless()
@Nullable Address getRlsAddress()
Address
associated with the friend list. void setRlsAddress(@Nullable Address rlsAddr)
rlsAddr
- The RLS URI to associate with the friend list. @Deprecated @Nullable java.lang.String getRlsUri()
getRlsAddress()
instead. @Deprecated void setRlsUri(@Nullable java.lang.String rlsUri)
setRlsAddress(org.linphone.core.Address)
instead. rlsUri
- The RLS URI to associate with the friend list. void setSubscriptionBodyless(boolean bodyless)
bodyless
- boolean telling if the subscription of the friend list isboolean subscriptionsEnabled()
void enableSubscriptions(boolean enabled)
enabled
- should subscription be enabled or not @Nullable java.lang.String getUri()
void setUri(@Nullable java.lang.String uri)
uri
- The URI to associate with the friend list. FriendList.Status addFriend(@NonNull Friend linphoneFriend)
linphoneFriend
- Friend
object to add to the friend list. FriendList.Status.OK
if successfully added, FriendList.Status.InvalidFriend
FriendList.Status addLocalFriend(@NonNull Friend linphoneFriend)
linphoneFriend
- Friend
object to add to the friend list. FriendList.Status.OK
if successfully added, FriendList.Status.InvalidFriend
void exportFriendsAsVcard4File(@NonNull java.lang.String vcardFile)
vcardFile
- the path to a file that will contain the vCards @Nullable Friend findFriendByAddress(@NonNull Address address)
@Nullable Friend findFriendByPhoneNumber(@NonNull java.lang.String phoneNumber)
phoneNumber
- a string of the phone number for which we want to find aFriend
if found, null otherwise. @Nullable Friend findFriendByRefKey(@NonNull java.lang.String refKey)
refKey
- The ref key string of the friend we want to search for. Friend
if found, null otherwise. @Nullable Friend findFriendByUri(@NonNull java.lang.String uri)
uri
- A string containing the URI of the friend we want to search for. Friend
if found, null otherwise. @NonNull Friend[] findFriendsByAddress(@NonNull Address address)
@NonNull Friend[] findFriendsByUri(@NonNull java.lang.String uri)
uri
- A string containing the URI of the friends we want to search for. Friend
if found, null otherwise. int importFriendsFromVcard4Buffer(@NonNull java.lang.String vcardBuffer)
vcardBuffer
- the buffer that contains the vCard(s) to parse int importFriendsFromVcard4File(@NonNull java.lang.String vcardFile)
vcardFile
- the path to a file that contains the vCard(s) to parse void notifyPresence(@NonNull PresenceModel presence)
presence
- PresenceModel
object. FriendList.Status removeFriend(@NonNull Friend linphoneFriend)
linphoneFriend
- Friend
object to remove from the friend list. FriendList.Status.OK
if removed successfully, FriendList.Status.NonExistentFriend
void synchronizeFriendsFromServer()
void updateDirtyFriends()
void updateRevision(int revision)
revision
- The revision void updateSubscriptions()
void addListener(FriendListListener listener)
void removeListener(FriendListListener listener)
void setListener(FriendListListener listener)
void setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()
long getNativePointer()
java.lang.String toString()
toString
in class java.lang.Object