Im

interface Im

Instant messaging module

Types

Companion
Link copied to clipboard
object Companion

Functions

createNewConversationFromJid
Link copied to clipboard
abstract fun createNewConversationFromJid(contactJid: String): IRainbowConversation
Create a new conversation with the given contact jid.
createNewConversationFromRoom
Link copied to clipboard
abstract fun createNewConversationFromRoom(room: Room): IRainbowConversation
Create a new conversation with the given room.
deleteAllMessages
Link copied to clipboard
abstract fun deleteAllMessages(conversation: IRainbowConversation?, notification: IMamNotification?)
Delete all messages from a conversation.
deleteConversation
Link copied to clipboard
abstract fun deleteConversation(conversation: IRainbowConversation?, listener: IConversationProxy.IDeleteConversationListener?)
Delete a conversation from the active list of conversations.
deleteConversations
Link copied to clipboard
abstract fun deleteConversations(conversations: List<IRainbowConversation>?, listener: IConversationProxy.IDeleteConversationListener?)
Delete a conversation from the active list of conversations.
getConversationFromContact
Link copied to clipboard
abstract fun getConversationFromContact(contactJid: String): IRainbowConversation
Get the conversation from a contact jid.
getConversationFromId
Link copied to clipboard
abstract fun getConversationFromId(conversationId: String?): IRainbowConversation?
Get a conversation from its id.
getConversationFromJid
Link copied to clipboard
abstract fun getConversationFromJid(conversationJid: String?): IRainbowConversation?
Get a conversation from its jid.
getConversationFromRoom
Link copied to clipboard
abstract fun getConversationFromRoom(room: Room): IRainbowConversation
Get the conversation from a room.
getConversationWithContact
Link copied to clipboard
abstract fun getConversationWithContact(contact: IRainbowContact?): IRainbowConversation?
Get the conversation associated to the given contact if any
getMessagesFromConversation
Link copied to clipboard
abstract fun getMessagesFromConversation(conversation: IRainbowConversation?)
Retrieve the list of the 50 first messages of a given conversation.
abstract fun getMessagesFromConversation(conversation: IRainbowConversation?, nbMessagesToRetrieve: Int)
Retrieve the list of the nbMessagesToRetrieve first messages of a given conversation.
getMoreMessagesFromConversation
Link copied to clipboard
abstract fun getMoreMessagesFromConversation(conversation: IRainbowConversation?)
Retrieve the list of the 50 next messages of a given conversation.
abstract fun getMoreMessagesFromConversation(conversation: IRainbowConversation?, nbMessagesToRetrieve: Int)
Retrieve the list of the nbMessagesToRetrieve next messages of a given conversation.
getUserLastMessageSent
Link copied to clipboard
abstract fun getUserLastMessageSent(conversationId: String?): IMMessage?
Get the last message sent by the user in the conversation with the given id
markMessageFromConversationAsRead
Link copied to clipboard
abstract fun markMessageFromConversationAsRead(conversation: IRainbowConversation?, message: IMMessage?)
Mark a message from a conversation as read.
markMessagesFromConversationAsRead
Link copied to clipboard
abstract fun markMessagesFromConversationAsRead(conversation: IRainbowConversation?): Boolean
Mark all messages from a conversation as read.
muteOrUnmuteConversation
Link copied to clipboard
abstract fun muteOrUnmuteConversation(conversationId: String?, mustBeMuted: Boolean, listener: IConversationProxy.IUpdateConversationListener?)
Mute or Unmute notifications for a conversationThis method only works if the conversation already exists.
refreshConversations
Link copied to clipboard
abstract fun refreshConversations(listener: IConversationProxy.IGetAllConversationListener?)
Refresh the list of conversations
registerListener
Link copied to clipboard
abstract fun registerListener(listener: IRainbowImListener?)
Register to the listener with following triggers: onImReceived, onImSent, isTypingState, onMessagesListUpdated, onMoreMessagesListUpdated
sendConversationByEmail
Link copied to clipboard
abstract fun sendConversationByEmail(conversation: IRainbowConversation, email: String, notification: IConversationProxy.ISendConversationByEmailListener?)
Send all messages from a conversation to the user email.
sendConversationByEmails
Link copied to clipboard
abstract fun sendConversationByEmails(conversation: IRainbowConversation, emails: List<String>, notification: IConversationProxy.ISendConversationByEmailListener?)
Send all messages from a conversation to a list of emails.
sendIsTyping
Link copied to clipboard
abstract fun sendIsTyping(conversation: IRainbowConversation?, state: ChatState)
Send or not the status isTyping depending on the parameter.
sendMessageToConversation
Link copied to clipboard
abstract fun sendMessageToConversation(conversation: IRainbowConversation?, imMessage: IMMessage?)
Send a message to a given conversation with a file.
abstract fun sendMessageToConversation(conversation: IRainbowConversation?, message: String)
Send a message to a given conversation.
abstract fun sendMessageToConversation(conversation: IRainbowConversation?, fileDescriptor: RainbowFileDescriptor?, message: String)
Send a message to a given conversation with a file.
abstract fun sendMessageToConversation(conversation: IRainbowConversation?, message: String?, additionalContents: List<AdditionalContent>)
Send a message to a given conversation with a list of additional contents
abstract fun sendMessageToConversation(conversation: IRainbowConversation?, message: String?, additionalMessageType: String?, additionalMessageContent: String?)
Send a message to a given conversation with a single additional content
unregisterListener
Link copied to clipboard
abstract fun unregisterListener(listener: IRainbowImListener?)
Unregister to the listener with following triggers: onImReceived, onImSent, isTypingState, onMessagesListUpdated, onMoreMessagesListUpdated

Properties

allConversations
Link copied to clipboard
abstract val allConversations: ArrayItemList<IRainbowConversation>
Get all the conversations of the user in an ArrayItemList.
totalUnreadMsgNb
Link copied to clipboard
abstract val totalUnreadMsgNb: Int
Get the total count of unread messages