Easemob Windows SDK
emchatmanager_interface.h
1 /************************************************************
2  * * EaseMob CONFIDENTIAL
3  * __________________
4  * Copyright (C) 2015 EaseMob Technologies. All rights reserved.
5  *
6  * NOTICE: All information contained herein is, and remains
7  * the property of EaseMob Technologies.
8  * Dissemination of this information or reproduction of this material
9  * is strictly forbidden unless prior written permission is obtained
10  * from EaseMob Technologies.
11  */
12 //
13 // EMChatManagerInterface.h
14 //
15 // Copyright (c) 2015 EaseMob Inc. All rights reserved.
16 //
17 
18 #ifndef __easemob__EMChatManagerInterface__
19 #define __easemob__EMChatManagerInterface__
20 
21 #include "message/emmessage.h"
22 #include "emcallback.h"
23 #include "emchatmanager_listener.h"
24 #include "emconversation.h"
25 #include "emencryptprovider_interface.h"
26 
27 namespace easemob {
28 
29 class EASEMOB_API EMChatManagerInterface
30 {
31 public:
38  virtual ~EMChatManagerInterface() { };
39 
47  virtual void sendMessage(const EMMessagePtr) = 0;
48 
55  virtual void sendReadAckForMessage(const EMMessagePtr) = 0;
56 
64  virtual void resendMessage(const EMMessagePtr) = 0;
65 
75  virtual void downloadMessageThumbnail(const EMMessagePtr) = 0;
76 
85  virtual void downloadMessageAttachments(const EMMessagePtr) = 0;
86 
95  virtual void removeConversation(const std::string &conversationId, bool isRemoveMessages = true) = 0;
96 
106  virtual EMConversationPtr conversationWithType(const std::string &conversationId, EMConversation::EMConversationType type, bool createIfNotExist = true) = 0;
107 
115  virtual EMConversationList getConversations() = 0;
116 
123  virtual EMConversationList loadAllConversationsFromDB() = 0;
124 
131  virtual void addListener(EMChatManagerListener*) = 0;
132 
139  virtual void removeListener(EMChatManagerListener*) = 0;
140 
147  virtual void clearListeners() = 0;
148 
157  virtual void setEncryptProvider(EMEncryptProviderInterface *provider) = 0;
158 
165  virtual EMEncryptProviderInterface *getEncryptProvider(bool createIfNotExist = false) = 0;
166 
172  virtual bool insertMessages(const EMMessageList& list) = 0;
173 
180  virtual EMMessagePtr getMessage(const std::string &messageId) = 0;
181 
185  virtual void uploadLog() = 0;
186 };
187 
188 }
189 
190 #endif /* defined(__easemob__EMChatManagerInterface__) */
virtual ~EMChatManagerInterface()
Destructor.
Definition: emchatmanager_interface.h:38
EMConversationType
Definition: emconversation.h:42
Definition: emencryptprovider_interface.h:15
Definition: emchatmanager_interface.h:29
Definition: emattributevalue.h:28
Definition: emchatmanager_listener.h:29