FriendList
public class FriendList : LinphoneObject
This object representing a list of Friend
.
You can use it to store contacts locally or synchronize them through CardDAV
protocol.
-
Undocumented
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> FriendList
-
Undocumented
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Enum describing the status of a CardDAV synchronization.
See moreDeclaration
Swift
public enum SyncStatus : Int
-
Enum describing the status of a LinphoneFriendList operation.
See moreDeclaration
Swift
public enum Status : Int
-
This object representing a list of
Friend
. You can use it to store contacts locally or synchronize them through CardDAV protocol.Declaration
Swift
public func addDelegate(delegate: FriendListDelegate)
-
This object representing a list of
Friend
. You can use it to store contacts locally or synchronize them through CardDAV protocol.Declaration
Swift
public func removeDelegate(delegate: FriendListDelegate)
-
Get the current LinphoneFriendListCbs object associated with a LinphoneFriendList.
Declaration
Swift
public var currentDelegate: FriendListDelegate? { get }
Return Value
The current LinphoneFriendListCbs object associated with the LinphoneFriendList.
-
Get the display name of the friend list.
Declaration
Swift
public var displayName: String { get set }
Return Value
The display name of the friend list.
-
Get wheter the subscription of the friend list is bodyless or not.
Declaration
Swift
public var isSubscriptionBodyless: Bool { get }
Return Value
Wheter the subscription of the friend list is bodyless or not.
-
Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.
- deprecated: 27/10/2020. Use getRlsAddress() instead.
Declaration
Swift
@available(*, deprecated) public var rlsUri: String { get set }
Return Value
The RLS URI associated with the friend list.
-
Set wheter the subscription of the friend list is bodyless or not.
Declaration
Swift
public var subscriptionBodyless: Bool? { get set }
Parameters
bodyless
boolean telling if the subscription of the friend list is bodyless or not.
-
Gets whether subscription to NOTIFYes of all friends list are enabled or not.
Declaration
Swift
public var subscriptionsEnabled: Bool { get set }
Return Value
Whether subscriptions are enabled or not
-
Get the type of a friend list.
Declaration
Swift
public var type: FriendListType { get set }
-
Get the URI associated with the friend list.
Declaration
Swift
public var uri: String { get set }
Return Value
The URI associated with the friend list.
-
Retrieve the user pointer associated with the friend list.
Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }
Return Value
The user pointer associated with the friend list.
-
Add a friend to a friend list. If or when a remote CardDAV server will be attached to the list, the friend will be sent to the server.
Parameters
linphoneFriend
Friend
object to add to the friend list.Return Value
OK
if successfully added,InvalidFriend
if the friend is not valid. -
Add a friend to a friend list. The friend will never be sent to a remote CardDAV server. Warning!
LinphoneFriends added this way will be removed on the next synchronization,
and the callback contact_deleted will be called.
Parameters
linphoneFriend
Friend
object to add to the friend list.Return Value
OK
if successfully added,InvalidFriend
if the friend is not valid. -
Creates and export
Friend
objects fromFriendList
to a file using vCard 4 format.Declaration
Swift
public func exportFriendsAsVcard4File(vcardFile: String)
Parameters
vcardFile
the path to a file that will contain the vCards
-
Creates and adds
Friend
objects toFriendList
from a buffer that contains the vCard(s) to parse.Declaration
Swift
public func importFriendsFromVcard4Buffer(vcardBuffer: String) -> Int
Parameters
vcardBuffer
the buffer that contains the vCard(s) to parse
Return Value
the amount of linphone friends created
-
Creates and adds
Friend
objects toFriendList
from a file that contains the vCard(s) to parse.Declaration
Swift
public func importFriendsFromVcard4File(vcardFile: String) -> Int
Parameters
vcardFile
the path to a file that contains the vCard(s) to parse
Return Value
the amount of linphone friends created
-
Notify our presence to all the friends in the friend list that have subscribed to our presence directly (not using a RLS).
Declaration
Swift
public func notifyPresence(presence: PresenceModel)
Parameters
presence
PresenceModel
object. -
Starts a CardDAV synchronization using value set using linphone_friend_list_set_uri.
Declaration
Swift
public func synchronizeFriendsFromServer()
-
Goes through all the
Friend
that are dirty and does a CardDAV PUT to update the server.Declaration
Swift
public func updateDirtyFriends()
-
Sets the revision from the last synchronization.
Declaration
Swift
public func updateRevision(revision: Int)
Parameters
revision
The revision
-
Update presence subscriptions for the entire list. Calling this function is necessary when list subscriptions are enabled, ie when a RLS presence server is used.
Declaration
Swift
public func updateSubscriptions()