FriendList
public class FriendList : LinphoneObject
The FriendList
object representing a list of friends.
-
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
-
Undocumented
Declaration
Swift
public func getDelegate() -> FriendListDelegate?
-
Undocumented
Declaration
Swift
public func addDelegate(delegate: FriendListDelegate)
-
Undocumented
Declaration
Swift
public func removeDelegate(delegate: FriendListDelegate)
-
Get the current LinphoneFriendListCbs object associated with a LinphoneFriendList.
Declaration
Swift
public var currentCallbacks: 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.
Declaration
Swift
public var rlsAddress: Address? { get set }
Return Value
The RLS URI associated with the friend list.
-
Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.
Declaration
Swift
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 }
-
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 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
lf
Friend
object to add to the friend list.Return Value
#LinphoneFriendListOK if successfully added,
LinphoneFriendListInvalidFriend 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
lf
Friend
object to add to the friend list.Return Value
#LinphoneFriendListOK if successfully added,
LinphoneFriendListInvalidFriend 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
-
Find all friends in the friend list using a LinphoneAddress.
Parameters
address
Address
object of the friends we want to search for. -
Find all friends in the friend list using an URI string.
Declaration
Swift
public func findFriendsByUri(uri: String) -> [Friend]
Parameters
uri
A string containing the URI of the friends we want to search for.
-
Creates and adds
Friend
objects toFriendList
from a buffer that contains the vCard(s) to parse.Declaration
Swift
public func importFriendsFromVcard4Buffer(vcardBuffer: String) throws
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) throws
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. -
Remove a friend from a friend list.
Parameters
lf
Friend
object to remove from the friend list.Return Value
#LinphoneFriendListOK if removed successfully,
LinphoneFriendListNonExistentFriend if the friend is not in the list.
-
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(rev: Int)
Parameters
rev
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()