Easemob Windows SDK
Public Member Functions | List of all members
easemob::EMChatManagerInterface Class Referenceabstract
Collaboration diagram for easemob::EMChatManagerInterface:
Collaboration graph

Public Member Functions

virtual ~EMChatManagerInterface ()
 Destructor. More...
 
virtual void sendMessage (const EMMessagePtr)=0
 Send a message. More...
 
virtual void sendReadAckForMessage (const EMMessagePtr)=0
 Send read ask for a message. More...
 
virtual void resendMessage (const EMMessagePtr)=0
 Resend a message. More...
 
virtual void downloadMessageThumbnail (const EMMessagePtr)=0
 Download thumbnail for image or video message. More...
 
virtual void downloadMessageAttachments (const EMMessagePtr)=0
 Download attachment of a message. More...
 
virtual void removeConversation (const std::string &conversationId, bool isRemoveMessages=true)=0
 Remove a conversation from DB and the memory. More...
 
virtual EMConversationPtr conversationWithType (const std::string &conversationId, EMConversation::EMConversationType type, bool createIfNotExist=true)=0
 Get a conversation. More...
 
virtual EMConversationList getConversations ()=0
 Get all conversations from memory. More...
 
virtual EMConversationList loadAllConversationsFromDB ()=0
 Get all conversations from DB. More...
 
virtual void addListener (EMChatManagerListener *)=0
 Add a listener to chat manager. More...
 
virtual void removeListener (EMChatManagerListener *)=0
 Remove a listener. More...
 
virtual void clearListeners ()=0
 Remove all the listeners. More...
 
virtual void setEncryptProvider (EMEncryptProviderInterface *provider)=0
 Application can customize encrypt method through EMEncryptProvider. More...
 
virtual EMEncryptProviderInterfacegetEncryptProvider (bool createIfNotExist=false)=0
 Get encrypt method being used. More...
 
virtual bool insertMessages (const EMMessageList &list)=0
 Insert messages. More...
 
virtual EMMessagePtr getMessage (const std::string &messageId)=0
 Get message by message Id. More...
 
virtual void uploadLog ()=0
 Upload log to server.
 

Constructor & Destructor Documentation

§ ~EMChatManagerInterface()

virtual easemob::EMChatManagerInterface::~EMChatManagerInterface ( )
inlinevirtual

Destructor.

Parameters
NA
Returns
NA

Member Function Documentation

§ addListener()

virtual void easemob::EMChatManagerInterface::addListener ( EMChatManagerListener )
pure virtual

Add a listener to chat manager.

Parameters
NA
Returns
NA

§ clearListeners()

virtual void easemob::EMChatManagerInterface::clearListeners ( )
pure virtual

Remove all the listeners.

Parameters
NA
Returns
NA

§ conversationWithType()

virtual EMConversationPtr easemob::EMChatManagerInterface::conversationWithType ( const std::string &  conversationId,
EMConversation::EMConversationType  type,
bool  createIfNotExist = true 
)
pure virtual

Get a conversation.

Note: All conversations must have loaded from DB.

Parameters
Theconversation id.
Theconversation type.
Theflag of whether created a conversation if it isn't exist.
Returns
The conversation

§ downloadMessageAttachments()

virtual void easemob::EMChatManagerInterface::downloadMessageAttachments ( const EMMessagePtr  )
pure virtual

Download attachment of a message.

Note: User should call this method to download file, voice, image, video. And too, SDK will callback the user by EMChatManagerListener if user doesn't provide a callback or callback return false.

Parameters
Themessage to download attachment.
Returns
NA

§ downloadMessageThumbnail()

virtual void easemob::EMChatManagerInterface::downloadMessageThumbnail ( const EMMessagePtr  )
pure virtual

Download thumbnail for image or video message.

Note: Image or video message thumbnail is downloaded automatically, so user should NOT call this method except automatic download failed. And too, SDK will callback the user by EMChatManagerListener if user doesn't provide a callback in the message or callback return false.

Parameters
Themessage to download thumbnail.
Returns
NA

§ getConversations()

virtual EMConversationList easemob::EMChatManagerInterface::getConversations ( )
pure virtual

Get all conversations from memory.

Note: All conversations must have loaded from DB.

Parameters
NA
Returns
The conversation list

§ getEncryptProvider()

virtual EMEncryptProviderInterface* easemob::EMChatManagerInterface::getEncryptProvider ( bool  createIfNotExist = false)
pure virtual

Get encrypt method being used.

Parameters
createIfNotExistIf true, SDK will create a default encryptProvider, when there is no encryptProvider exists.
Returns
Encrypt method being used.

§ getMessage()

virtual EMMessagePtr easemob::EMChatManagerInterface::getMessage ( const std::string &  messageId)
pure virtual

Get message by message Id.

Parameters
messageId
Returns
EMMessagePtr

§ insertMessages()

virtual bool easemob::EMChatManagerInterface::insertMessages ( const EMMessageList &  list)
pure virtual

Insert messages.

Parameters
Themessages to insert.
Returns
NA

§ loadAllConversationsFromDB()

virtual EMConversationList easemob::EMChatManagerInterface::loadAllConversationsFromDB ( )
pure virtual

Get all conversations from DB.

Parameters
NA
Returns
The conversation list

§ removeConversation()

virtual void easemob::EMChatManagerInterface::removeConversation ( const std::string &  conversationId,
bool  isRemoveMessages = true 
)
pure virtual

Remove a conversation from DB and the memory.

Note: Before remove a conversation, all conversations must have loaded from DB.

Parameters
Theconversation id.
Theflag of whether remove the messages belongs to this conversation.
Returns
NA

§ removeListener()

virtual void easemob::EMChatManagerInterface::removeListener ( EMChatManagerListener )
pure virtual

Remove a listener.

Parameters
NA
Returns
NA

§ resendMessage()

virtual void easemob::EMChatManagerInterface::resendMessage ( const EMMessagePtr  )
pure virtual

Resend a message.

Note: Will callback user by EMChatManagerListener if user doesn't provide a callback in the message or callback return false.

Parameters
Themessage to resend.
Returns
NA

§ sendMessage()

virtual void easemob::EMChatManagerInterface::sendMessage ( const EMMessagePtr  )
pure virtual

Send a message.

Note: Will callback user by EMChatManagerListener if user doesn't provide a callback in the message or callback return false.

Parameters
Themessage to send.
Returns
NA

§ sendReadAckForMessage()

virtual void easemob::EMChatManagerInterface::sendReadAckForMessage ( const EMMessagePtr  )
pure virtual

Send read ask for a message.

Parameters
Themessage to send read ack.
Returns
NA

§ setEncryptProvider()

virtual void easemob::EMChatManagerInterface::setEncryptProvider ( EMEncryptProviderInterface provider)
pure virtual

Application can customize encrypt method through EMEncryptProvider.

Note: If EMConfigManager::KEY_USE_ENCRYPTION is true, but don't provider encryptprovider, SDK will use default encrypt method.

Parameters
EMEncryptProviderCustomized encrypt method provider.
Returns
NA

The documentation for this class was generated from the following file: