im::floo::floolib::BMXChatService
Chat Service
Public Functions
Name | |
---|---|
synchronized void | delete() |
void | sendMessage(BMXMessage msg) Send a message, and the message status change is notified via listener |
void | resendMessage(BMXMessage msg) Resend this message, and the message status change is notified via listener |
void | recallMessage(BMXMessage msg) Recall a message, and the message status change is notified via listener |
[BMXErrorCode] | forwardMessage(BMXMessageList list, BMXConversation to, BMXMessage newMsg) Merge and forward messages |
void | forwardMessage(BMXMessage msg) Simple forwarding messages, users should create forwarding messages first through BMXMessage:: createForwardMessage () |
void | ackMessage(BMXMessage msg) Send read acknowledgement |
void | ackMessageDelivered(BMXMessage msg) Send delivery acknowledgement |
void | ackPlayMessage(BMXMessage msg) Send a playback acknowledgement |
void | readCancel(BMXMessage msg) Mark this message as unread and synchronize to all devices of the current user |
void | readAllMessage(BMXMessage msg) Mark this message and all previous messages as read, and synchronize to all current users' devices |
void | removeMessage(BMXMessage msg, boolean synchronize) Delete this message, which synchronizes to other devices of the current user |
void | removeMessage(BMXMessage msg) |
void | downloadThumbnail(BMXMessage msg, BMXChatService.ThumbnailStrategy strategy) Download thumbnail, downloading state changes and progress notified via listener. Thumbnail generation policy: 1 - generated by third-party server, 2 - generated by local server, default 1. |
void | downloadThumbnail(BMXMessage msg) |
void | downloadAttachment(BMXMessage msg) Downloaded attachments, and download state changes and progress are notified via listener |
void | downloadAttachmentByUrl(long msgId, String url, String path) Downloaded attachments, and download state changes and progress are notified via listener |
void | cancelUploadAttachment(BMXMessage msg) Cancel uploading attachment |
void | cancelDownloadAttachment(BMXMessage msg) Cancel uploading attachment |
int | transferingNum() Number of uploading/downloading files |
[BMXErrorCode] | insertMessages(BMXMessageList list) Insert a message |
BMXMessage | getMessage(long msgId) Read a message |
void | deleteConversation(long conversationId, boolean synchronize) Delete a conversation |
void | deleteConversation(long conversationId) |
BMXConversation | openConversation(long conversationId, BMXConversation.Type type, boolean createIfNotExist) Launch a conversation |
BMXConversation | openConversation(long conversationId, BMXConversation.Type type) |
String | attachmentDir() Get attachment saving path |
String | attachmentDirForConversation(long conversationId) Get attachment saving path for a conversation |
BMXConversationList | getAllConversations() Get all conversations |
int | getAllConversationsUnreadCount() Get number of unread messages for all conversations (unreads for individuals and groups marked as blocked is not counted) |
[BMXErrorCode] | retrieveHistoryMessages(BMXConversation conversation, long refMsgId, long size, BMXMessageList result) Pull message history |
[BMXErrorCode] | searchMessagesByKeyWords(String keywords, long refTime, long size, BMXMessageListList result, BMXConversation.Direction arg4) Search for messages |
[BMXErrorCode] | searchMessagesByKeyWords(String keywords, long refTime, long size, BMXMessageListList result) |
[BMXErrorCode] | searchMessages(String keywords, long refTime, long size, BMXMessageListList result, BMXConversation.Direction arg4) Search for messages |
[BMXErrorCode] | searchMessages(String keywords, long refTime, long size, BMXMessageListList result) |
[BMXErrorCode] | getGroupAckMessageUserIdList(BMXMessage msg, ListOfLongLong groupMemberIdList) Get the list of user-ids that have read group messages |
[BMXErrorCode] | getGroupAckMessageUnreadUserIdList(BMXMessage msg, ListOfLongLong groupMemberIdList) Get a list of unread user ids for the sent group message |
[BMXErrorCode] | getGroupPlayAckMessageUserIdList(BMXMessage msg, ListOfLongLong groupMemberIdList) Get a list of playback user ids for the sent group message |
[BMXErrorCode] | getGroupUnPlayAckMessageUserIdList(BMXMessage msg, ListOfLongLong groupMemberIdList) Get a list of unplayed user ids for the sent group message |
void | addChatListener(BMXChatServiceListener listener) Add chat listener |
void | removeChatListener(BMXChatServiceListener listener) Remove chat listener |
Protected Functions
Name | |
---|---|
BMXChatService(long cPtr, boolean cMemoryOwn) | |
void | finalize() |
long | getCPtr(BMXChatService obj) |
Protected Attributes
Name | |
---|---|
transient boolean | swigCMemOwn |
Public Functions Documentation
function delete
inline synchronized void delete()
Example:
function sendMessage
inline void sendMessage(
BMXMessage msg
)
Send a message, and the message status change is notified via listener
Parameters:
- msg Message to be sent
Example:
function resendMessage
inline void resendMessage(
BMXMessage msg
)
Resend this message, and the message status change is notified via listener
Parameters:
- msg Resent message
Example:
function recallMessage
inline void recallMessage(
BMXMessage msg
)
Recall a message, and the message status change is notified via listener
Parameters:
- msg Recalled message
Example:
function forwardMessage
inline BMXErrorCode forwardMessage(
BMXMessageList list,
BMXConversation to,
BMXMessage newMsg
)
Merge and forward messages
Parameters:
- list List of messages to be forwarded
- to The conversation to which message is forwarded
- newMsg The newly generated single forwarded message from the merging list of messages to be forwarded
Return: [BMXErrorCode]
Example:
function forwardMessage
inline void forwardMessage(
BMXMessage msg
)
Simple forwarding messages, users should create forwarding messages first through BMXMessage:: createForwardMessage ()
Parameters:
- msg Messages to be forwarded
Example:
function ackMessage
inline void ackMessage(
BMXMessage msg
)
Send read acknowledgement
Parameters:
- msg Message requiring a read acknowledgement to be sent
Example:
function ackMessageDelivered
inline void ackMessageDelivered(
BMXMessage msg
)
Send delivery acknowledgement
Parameters:
- msg Message that need to send a delivery acknowledgement
Example:
function ackPlayMessage
inline void ackPlayMessage(
BMXMessage msg
)
Send a playback acknowledgement
Parameters:
- msg Messages that require to send a playback acknowledgement
Example:
function readCancel
inline void readCancel(
BMXMessage msg
)
Mark this message as unread and synchronize to all devices of the current user
Parameters:
- msg The message needs to send “read recalled”
Example:
function readAllMessage
inline void readAllMessage(
BMXMessage msg
)
Mark this message and all previous messages as read, and synchronize to all current users' devices
Parameters:
- msg The message for which all earlier messages need to be marked as read
Example:
function removeMessage
inline void removeMessage(
BMXMessage msg,
boolean synchronize
)
Delete this message, which synchronizes to other devices of the current user
Parameters:
- msg Message to be deleted
- synchronize Whether to synchronize to other devices, otherwise only the locally stored message will be deleted
Example:
function removeMessage
inline void removeMessage(
BMXMessage msg
)
Example:
function downloadThumbnail
inline void downloadThumbnail(
BMXMessage msg,
BMXChatService.ThumbnailStrategy strategy
)
Download thumbnail, downloading state changes and progress notified via listener. Thumbnail generation policy: 1 - generated by third-party server, 2 - generated by local server, default 1.
Parameters:
- msg Message requiring to download thumbnail
- strategy Thumbnail generation policy, 1 - generated by third-party server, 2 - Generated by local server, default 1.
Example:
function downloadThumbnail
inline void downloadThumbnail(
BMXMessage msg
)
Example:
function downloadAttachment
inline void downloadAttachment(
BMXMessage msg
)
Downloaded attachments, and download state changes and progress are notified via listener
Parameters:
- msg Message requiring to download attachment
Example:
function downloadAttachmentByUrl
inline void downloadAttachmentByUrl(
long msgId,
String url,
String path
)
Downloaded attachments, and download state changes and progress are notified via listener
Parameters:
- msgId Message requiring to download attachment
- url File remote address
- path File local address
Example:
function cancelUploadAttachment
inline void cancelUploadAttachment(
BMXMessage msg
)
Cancel uploading attachment
Parameters:
- msg Message requiring to cancel attachment uploading
Example:
function cancelDownloadAttachment
inline void cancelDownloadAttachment(
BMXMessage msg
)
Cancel uploading attachment
Parameters:
- msg Message requiring to cancel attachment uploading
Example:
function transferingNum
inline int transferingNum()
Number of uploading/downloading files
Return: Number of files
Example:
function insertMessages
inline BMXErrorCode insertMessages(
BMXMessageList list
)
Insert a message
Parameters:
- list Insert message list
Return: [BMXErrorCode]
Example:
function getMessage
inline BMXMessage getMessage(
long msgId
)
Read a message
Parameters:
- msgId id of the message which needs to be fetched
Return: BMXMessage
Example:
function deleteConversation
inline void deleteConversation(
long conversationId,
boolean synchronize
)
Delete a conversation
Parameters:
- conversationId Conversation id requiring to delete conversation
- synchronize Whether to delete the conversation on other devices synchronously, default false, means only delete the conversation on the current device
Example:
function deleteConversation
inline void deleteConversation(
long conversationId
)
Example:
function openConversation
inline BMXConversation openConversation(
long conversationId,
BMXConversation.Type type,
boolean createIfNotExist
)
Launch a conversation
Parameters:
- conversationId id of the conversation which needs to be opened
- type Conversation type, single/group chat.
- createIfNotExist Whether to create a local conversation if no conversation existing, default to create
Return: BMXConversation
Example:
function openConversation
inline BMXConversation openConversation(
long conversationId,
BMXConversation.Type type
)
Example:
function attachmentDir
inline String attachmentDir()
Get attachment saving path
Return: std::string
Example:
function attachmentDirForConversation
inline String attachmentDirForConversation(
long conversationId
)
Get attachment saving path for a conversation
Parameters:
- conversationId Conversation id requiring a conversation attachment path
Return: std::string
Example:
function getAllConversations
inline BMXConversationList getAllConversations()
Get all conversations
Return: BMXConversationList
Example:
function getAllConversationsUnreadCount
inline int getAllConversationsUnreadCount()
Get number of unread messages for all conversations (unreads for individuals and groups marked as blocked is not counted)
Return: int
Example:
function retrieveHistoryMessages
inline BMXErrorCode retrieveHistoryMessages(
BMXConversation conversation,
long refMsgId,
long size,
BMXMessageList result
)
Pull message history
Parameters:
- conversation Conversation for which message history needs to pull
- refMsgId Start message Id for pulling conversation messages
- size Maximum number of messages to pull
- result List of messages fetched by pull operation, externally initializing an incoming empty list.
Return: [BMXErrorCode]
Example:
function searchMessagesByKeyWords
inline BMXErrorCode searchMessagesByKeyWords(
String keywords,
long refTime,
long size,
BMXMessageListList result,
BMXConversation.Direction arg4
)
Search for messages
Parameters:
- keywords Keyword for search
- refTime Start time of message search
- size Maximum number of messages to search
- result List of searched message results, externally initializing an incoming empty list.
- arg4 Message search direction, default (Direction::Up)means search from earlier messages.
Return: [BMXErrorCode]
Example:
function searchMessagesByKeyWords
inline BMXErrorCode searchMessagesByKeyWords(
String keywords,
long refTime,
long size,
BMXMessageListList result
)
Example:
function searchMessages
inline BMXErrorCode searchMessages(
String keywords,
long refTime,
long size,
BMXMessageListList result,
BMXConversation.Direction arg4
)
Search for messages
Parameters:
- keywords Keyword for search
- refTime Start time of message search
- size Maximum number of messages to search
- result List of searched message results, externally initializing an incoming empty list.
- arg4 Message search direction, default (Direction::Up)means search from earlier messages.
Return: [BMXErrorCode]
Example:
function searchMessages
inline BMXErrorCode searchMessages(
String keywords,
long refTime,
long size,
BMXMessageListList result
)
Example:
function getGroupAckMessageUserIdList
inline BMXErrorCode getGroupAckMessageUserIdList(
BMXMessage msg,
ListOfLongLong groupMemberIdList
)
Get the list of user-ids that have read group messages
Parameters:
- msg Message requiring to get list of read user ids
- groupMemberIdList List of read user ids for this message, initially passed in as an empty list
Return: [BMXErrorCode]
Example:
function getGroupAckMessageUnreadUserIdList
inline BMXErrorCode getGroupAckMessageUnreadUserIdList(
BMXMessage msg,
ListOfLongLong groupMemberIdList
)
Get a list of unread user ids for the sent group message
Parameters:
- msg Message requiring to get list of unread user ids
- groupMemberIdList List of unread user ids for this message, initially passed in as an empty list
Return: [BMXErrorCode]
Example:
function getGroupPlayAckMessageUserIdList
inline BMXErrorCode getGroupPlayAckMessageUserIdList(
BMXMessage msg,
ListOfLongLong groupMemberIdList
)
Get a list of playback user ids for the sent group message
Parameters:
- msg Message requiring to get list of played user ids
- groupMemberIdList List of played user ids for this message, initially passed in as an empty list
Return: [BMXErrorCode]
Example:
function getGroupUnPlayAckMessageUserIdList
inline BMXErrorCode getGroupUnPlayAckMessageUserIdList(
BMXMessage msg,
ListOfLongLong groupMemberIdList
)
Get a list of unplayed user ids for the sent group message
Parameters:
- msg Message requiring to get list of unplayed user ids
- groupMemberIdList List of unplayed user ids for this message, initially passed in as an empty list
Return: [BMXErrorCode]
Example:
function addChatListener
inline void addChatListener(
BMXChatServiceListener listener
)
Add chat listener
Parameters:
- listener Chat listener
Example:
function removeChatListener
inline void removeChatListener(
BMXChatServiceListener listener
)
Remove chat listener
Parameters:
- listener Chat listener
Protected Functions Documentation
Example:
function BMXChatService
inline BMXChatService(
long cPtr,
boolean cMemoryOwn
)
Example:
function finalize
inline void finalize()
Example:
function getCPtr
static inline long getCPtr(
BMXChatService obj
)
Protected Attributes Documentation
variable swigCMemOwn
transient boolean swigCMemOwn;
Example:
Updated on 2022-01-26 at 17:18:31 +0800