Package org.linphone.core

# Interface FriendListListener

All Known Implementing Classes:
  `FriendListListenerStub`

public interface FriendListListener
An object to handle the callbacks for `Friend` synchronization.

## Method Summary

Modifier and Type
Method
Description
`void`
`onContactCreated(FriendList friendList, Friend linphoneFriend)`
Callback used to notify a new contact has been created on the CardDAV server
and downloaded locally.
`void`
`onContactDeleted(FriendList friendList, Friend linphoneFriend)`
Callback used to notify a contact has been deleted on the CardDAV server.
`void`
`onContactUpdated(FriendList friendList, Friend newFriend, Friend oldFriend)`
Callback used to notify a contact has been updated on the CardDAV server.
`void`
`onNewSipAddressDiscovered(FriendList friendList, Friend linphoneFriend, String sipUri)`
Callback used to notify a list that a new SIP address was discovered through
long term presence mechanism.
`void`
`onPresenceReceived(FriendList friendList, Friend[] friends)`
Callback used to notify a list with all friends that have received presence
information.
`void`
`onSyncStatusChanged(FriendList friendList, FriendList.SyncStatus status, String message)`
Callback used to notify the status of the synchronization has changed.

## Method Details

### onContactCreated

void onContactCreated(@NonNull FriendList friendList, @NonNull Friend linphoneFriend)
Callback used to notify a new contact has been created on the CardDAV server
and downloaded locally.

Parameters:
  `friendList` - The `FriendList` object the new contact is added to
  `linphoneFriend` - The `Friend` object that has been created

### onContactDeleted

void onContactDeleted(@NonNull FriendList friendList, @NonNull Friend linphoneFriend)
Callback used to notify a contact has been deleted on the CardDAV server.

Parameters:
  `friendList` - The `FriendList` object a contact has been removed from
  `linphoneFriend` - The `Friend` object that has been deleted

### onContactUpdated

void onContactUpdated(@NonNull FriendList friendList, @NonNull Friend newFriend, @NonNull Friend oldFriend)
Callback used to notify a contact has been updated on the CardDAV server.

Parameters:
  `friendList` - The `FriendList` object in which a contact has been
  updated
  `newFriend` - The new `Friend` object corresponding to the updated
  contact
  `oldFriend` - The old `Friend` object before update

### onSyncStatusChanged

void onSyncStatusChanged(@NonNull FriendList friendList, FriendList.SyncStatus status, @Nullable String message)
Callback used to notify the status of the synchronization has changed.

Parameters:
  `friendList` - The `FriendList` object for which the status has
  changed
  `status` - The new `FriendList#SyncStatus`
  `message` - An additional information on the status update

### onPresenceReceived

void onPresenceReceived(@NonNull FriendList friendList, @NonNull Friend[] friends)
Callback used to notify a list with all friends that have received presence
information.

Parameters:
  `friendList` - The LinphoneFriendList object for which the status has
  changed
  `friends` - A of the relevant friends

### onNewSipAddressDiscovered

void onNewSipAddressDiscovered(@NonNull FriendList friendList, @NonNull Friend linphoneFriend, @NonNull String sipUri)
Callback used to notify a list that a new SIP address was discovered through
long term presence mechanism.

Parameters:
  `friendList` - The `FriendList` object for which the status has
  changed
  `linphoneFriend` - The `Friend` for which the SIP address was
  discovered
  `sipUri` - The newly discovered SIP URI