agora_chat_SDK
3.8.2
|
#import <IAgoraChatManager.h>
This protocol defines the operations of chat Current message are loaded from local database, not from server
|
required |
Load all conversations from DB, will update conversation list in memory after this method is called
Synchronization method will block the current thread
|
required |
Send read conversation ack to server, which makes the conversation read
conversationId | conversation id |
aCompletionBlock | The callback of completion block |
|
required |
Add delegate
aDelegate | Delegate |
|
required |
Add delegate
aDelegate | Objects that implement the protocol |
aQueue | (optional) The queue of calling delegate methods. Pass in nil to run on main thread. |
|
required |
Download message attachment(voice, video, image or file), SDK can download voice automatically, so user should NOT download voice manually except automatic download failed
Asynchronous methods
aMessage | Message object |
aProgressCompletion | The callback block of attachment download progress |
aCompletion | The callback block of download complete |
|
required |
Download message thumbnail attachments (thumbnails of image message or first frame of video image), SDK can download thumbail automatically, so user should NOT download thumbail manually except automatic download failed
Asynchronous methods
aMessage | Message object |
aProgressCompletion | The callback block of attachment download progress |
aCompletion | The callback block of download complete |
|
required |
Fetch group read back receipt from the server
aMessageId | The message id which select to fetch. |
aGroupId | The group id which select to fetch. |
aGroupAckId | The group ack id which select to fetch. |
aPageSize | The page size. |
aCompletionBlock | The callback block of fetch complete |
|
required |
Fetch conversation roam messages from server.
aConversationId | The conversation id which select to fetch roam message. |
aConversationType | The conversation type which select to fetch roam message. |
aStartMessageId | The start search roam message id, if empty start from the server leastst message. |
aPageSize | The page size. |
aCompletionBlock | The callback block of fetch complete |
|
required |
|
required |
Send a message
Asynchronous methods
aMessage | Message instance |
aProgressCompletion | The block of attachment upload progress |
aCompletion | The block of send complete |
|
required |
|
required |
Delete a conversation
aConversationId | Conversation id |
aDeleteMessage | Whether delete messages |
|
required |
Delete a conversation from local database
aConversationId | Conversation id |
aIsDeleteMessages | if delete messages |
aCompletionBlock | The callback of completion block |
|
required |
Delete multiple conversations
aConversations | Conversation list<AgoraConversation> |
aDeleteMessage | Whether delete messages |
|
required |
Delete multiple conversations
aConversations | Conversation NSArray<AgoraConversation> |
aIsDeleteMessages | Whether delete messages |
aCompletionBlock | The callback of completion block |
|
required |
Download message attachment (voice, video, image or file). SDK handles attachment downloading automatically, no need to download attachment manually unless automatic download failed
aMessage | Message object |
aProgressBlock | The callback block of attachment download progress |
aCompletionBlock | The callback of completion block |
|
required |
Manual download the message thumbnail (thumbnail of image message or first frame of video image). SDK handles the thumbnail downloading automatically, no need to download thumbnail manually unless automatic download failed.
aMessage | Message object |
aProgressBlock | The callback block of attachment download progress |
aCompletionBlock | The callback of completion block |
|
required |
Fetch conversation roam messages from server.
aConversationId | The conversation id which select to fetch roam message. |
aConversationType | The conversation type which select to fetch roam message. |
aStartMessageId | The start search roam message id, if empty start from the server leastst message. |
aPageSize | The page size. |
pError | AgoraError used for output. |
|
required |
Get all conversations from local databse. Will load conversations from cache first, otherwise local database
|
required |
Get a conversation from local database
aConversationId | Conversation id |
aType | Conversation type (Must be specified) |
aIfCreate | Whether create conversation if not exist |
|
required |
Get all conversations from server
|
required |
Get a conversation from local database
aConversationId | Conversation id |
|
required |
Get message attachment local path for the conversation. Delete the conversation will also delete the files under the file path
aConversationId | Conversation id |
|
required |
Get the specified message
aMessageId | Message id |
|
required |
Import multiple conversations to DB
aConversations | Conversation list<AgoraConversation> |
|
required |
Import multiple conversations to local database
aConversations | Conversation NSArray<AgoraConversation> |
aCompletionBlock | The callback of completion block |
|
required |
Import multiple messages
aMessages | Message list<Message> |
|
required |
Import multiple messages to local database
aMessages | Message NSArray<Message> |
aCompletionBlock | The callback of completion block |
|
required |
Load messages with specified keyword from local database, returning messages are sorted by receiving timestamp based on MessageSearchDirection. If reference timestamp is negative, load from the latest messages; if message count is negative, will be handled as count=1
aKeyword | Search keyword. aKeyword=nil to ignore |
aTimestamp | load based on reference timestamp. If aTimestamp=-1, will load from the most recent (the latest) message |
aCount | Max number of messages to load |
aSender | Message sender (optional). Pass nil to ignore |
aDirection | Message search direction MessageSearchDirectionUp: get aCount of messages before aMessageId; MessageSearchDirectionDown: get aCount of messages after aMessageId * -— |
aCompletionBlock | The callback of completion block |
|
required |
Load messages with specified message type from local database. Returning messages are sorted by receiving timestamp based on MessageSearchDirection.
aType | Message type to load |
aTimestamp | load based on reference timestamp. If aTimestamp=-1, will load from the most recent (the latest) message |
aCount | Max number of messages to load. if aCount<0, will be handled as count=1 |
aUsername | Message sender (optional). Use aUsername=nil to ignore |
aDirection | Message search direction MessageSearchDirectionUp: get aCount of messages before aMessageId; MessageSearchDirectionDown: get aCount of messages after aMessageId |
aCompletionBlock | The callback of completion block |
|
required |
Recall a message
aMessage | Message instance |
aCompletionBlock | The callback block of completion |
|
required |
Recall a message
aMessageId | Message id |
aCompletionBlock | The callback block of completion |
|
required |
Remove delegate
aDelegate | Delegate to be removed |
|
required |
|
required |
Send read acknowledgement for message
aMessageId | Message id |
aGroupId | group receiver |
aContent | Content |
aCompletionBlock | The callback of completion block |
|
required |
Send a message
aMessage | Message instance |
aProgressBlock | The block of attachment upload progress in percentage, 0~100. |
aCompletionBlock | The callback of completion block |
|
required |
Send read acknowledgement for message
aMessage | Message instance |
aCompletionBlock | The callback of completion block |
|
required |
Send read acknowledgement for message
aMessageId | Message id |
aUsername | ack receiver |
aCompletionBlock | The callback of completion block |
|
required |
|
required |
Update a message in local database. latestMessage of the conversation and other properties will be updated accordingly. messageId of the message cannot be updated
aMessage | Message |
aCompletionBlock | The callback of completion block |