Type Aliases
The following type aliases are available globally.
-
Code block to execute upon completion of fetching a number messages for a conversation.
Declaration
Parameters
error
Error that is optionally set if an error condition occurred during the operation.
messages
List of fetched CPMessage objects.
-
Code block to execute upon completion of fetching a single message for a conversation.
Declaration
Parameters
error
Error that is optionally set if an error condition occurred during the operation.
message
The fetched CPMessage object.
-
Code block to execute upon completion of sending a message for a conversation.
Declaration
Swift
public typealias SendCompletionBlock = (_ error: CPError?, _ outboundMessage: CPOutboundMessage?) -> ()
Parameters
error
Error that is optionally set if an error condition occurred during the operation.
outboundMessage
The sent CPOutboundMessage object.
-
Code block to execute after fetching a list of all conversations.
Declaration
Swift
public typealias FetchBlock = (_ error: CPError?, _ fetchResult: FetchResult?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
fetchResult
The result of fetch in type of fetched objects(Can be conversations or messages).
-
Code block to execute after indicating composition state.
Declaration
Swift
public typealias ComposingCompletionBlock = (_ error: CPError?, _ isComposingMessage: CPIsComposingMessage?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
isComposingMessage
Information about the generated isComposing notification that will be sent to the participant.
-
Code block to execute after creating a chat group.
Declaration
Swift
public typealias CreateChatGroupBlock = (_ error: CPError?, _ group: CPChatGroup?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
group
The newly created chat group.
-
Code block to execute after fetching all chat groups.
Declaration
Swift
public typealias FetchAllChatGroupsBlock = (_ error: CPError?, _ group: [CPChatGroup]?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
group
An array of chat groups.
-
Code block to execute after fetching a chat group.
Declaration
Swift
public typealias FetchChatGroupBlock = (_ error: CPError?, _ group: CPChatGroup?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
group
The requested chat groups.
-
Code block to execute after uploading a file.
Declaration
Swift
public typealias UploadCompletionBlock = (_ error: CPError?, _ filePart: CPFilePart?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
filePart
Object representing upload URL of the file.
-
Code block to execute after downloading a file.
Declaration
Swift
public typealias DownloadCompletionBlock = (_ error: CPError?, _ file: URL?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
file
URL of the downloaded file.
-
Code block to execute after creating a PresenceSource.
Declaration
Swift
public typealias CreatePresenceSourceCompletionBlock = (_ error: CPError?, _ presenceSource: CPPresenceSource?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
presenceSource
Newly created PresenceSource object.
-
Code block to execute after fetching a PresenceSource.
Declaration
Swift
public typealias FetchPresenceSourceCompletionBlock = (_ error: CPError?, _ presenceSource: CPPresenceSource?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
presenceSource
Fetched PresenceSource object.
-
Code block to execute after fetching a PresenceSource list.
Declaration
Swift
public typealias FetchPresenceSourceListCompletionBlock = (_ error: CPError?, _ presenceSourceList: [CPPresenceSource]?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
presenceSource
Fetched array of PresenceSource objects.
-
Code block to execute after creating PresentityList.
Declaration
Swift
public typealias CreatePresentityListCompletionBlock = (_ error: CPError?, _ presenceSource: CPPresentityList?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
presenceSource
Newly created PresentityList object.
-
Code block to execute after fetching all PresentityList objects.
Declaration
Swift
public typealias FetchPresentityListsCompletionBlock = (_ error: CPError?, _ presentityLists: [CPPresentityList]?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
presenceSource
Fetched array of PresentityList objects.
-
Code block to execute after fetching a PresentityList.
Declaration
Swift
public typealias FetchPresentityListCompletionBlock = (_ error: CPError?, _ presentityList: CPPresentityList?) -> ()
Parameters
error
If operation fails returns as CPError, otherwise returns nil
presenceSource
Fetched PresentityList object.