CPPresentityList
@objc
public class CPPresentityList : NSObject
This class represents a list of watched presentities.
-
User defined name of the list.
Declaration
Swift
@objc public let name: String!
-
Set of presentities contained in the list.
Declaration
Swift
@objc public internal(set) var presentities: Set<CPPresentity> { get }
-
Undocumented
Declaration
Swift
override public func isEqual(_ object: Any?) -> Bool
-
Populates presentities
Declaration
Swift
public func populatePresentities(json: [String : Any])
-
This method fetches presentity status for all members of this list. Initial presentity list will only have userIDs.
Declaration
Swift
@objc public func fetchStatus(completion: @escaping FetchPresentityListCompletionBlock)
Parameters
completion
The code block to execute upon fetch completion.
-
This method fetches presentity status for a specific member of this list. The results will be returned as a list via compeletion callback code block.
Declaration
Swift
@objc public func fetchStatus(presentity: CPPresentity, completion: @escaping FetchPresentityListCompletionBlock)
Parameters
presentity
The presentity to fetch status for.
completion
The code block to execute upon fetch completion.
-
This method is used to add a presentity to this presentity list.
Declaration
Swift
@objc public func add(presentity: CPPresentity, completion: @escaping ErrorCompletionBlock)
Parameters
presentity
The presentity to add to this list.
completion
The code block to execute upon completion of adding the list member.
-
This method is used to remove a presentity from this presentity list.
Declaration
Swift
@objc public func remove(presentity: CPPresentity, completion: @escaping ErrorCompletionBlock)
Parameters
presentity
The presentity to remove from this list.
completion
The code block to execute upon completion of removing the list member.
-
This method is used to subscribe for notifications of change to this presentity list and changes in status of members of this presentity list.
Declaration
Swift
@objc public func subscribe(completion: @escaping ErrorCompletionBlock)
Parameters
completion
The code block to execute upon completion of the subscription action.
-
This method is used to update a member of a presentity list. This can be used when a notification arrives indicating either a new or updated member of the list.
Declaration
Swift
@objc public func statusChanged(presentity: CPPresentity)
Parameters
presentity
The presentity to update in this list.