Easemob Windows SDK
emcontactmanager_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 #ifndef EMCORE_CONTACT_MANAGER_H
13 #define EMCORE_CONTACT_MANAGER_H
14 
15 #include <string>
16 #include <vector>
17 #include "emerror.h"
18 
19 using namespace std;
20 
21 namespace easemob {
22 
23 class EMContactListener;
24 
25 class EASEMOB_API EMContactManagerInterface {
26 public:
27  virtual ~EMContactManagerInterface() { };
28 
34  virtual void registerContactListener(EMContactListener* listener) = 0;
35 
41  virtual void removeContactListener(EMContactListener* listener) = 0;
42 
48  virtual std::vector<std::string> allContacts(EMError &error) = 0;
49 
55  virtual std::vector<std::string> getContactsFromServer(EMError &error) = 0;
56 
62  virtual std::vector<std::string> getContactsFromDB(EMError &error) = 0;
63 
70  virtual void inviteContact(const std::string& username, const std::string& message, EMError &error) = 0;
71 
78  virtual void deleteContact(const std::string& username, EMError &error) = 0;
79 
85  virtual void acceptInvitation(const std::string& username, EMError &error) = 0;
86 
92  virtual void declineInvitation(const std::string& username, EMError &error) = 0;
93 
94  // -------------------------- blacklist --------------------------
101  virtual std::vector<std::string> blacklist(EMError &error) = 0;
102 
111  virtual std::vector<std::string> getBlackListFromServer(EMError &error) = 0;
112 
118  virtual std::vector<std::string> getBlackListFromDB(EMError &error) = 0;
119 
128  virtual void saveBlackList(const std::vector<std::string> &blacklist, EMError &error) = 0;
129 
138  virtual void addToBlackList(std::string username, bool both, EMError &error) = 0;
139 
147  virtual void removeFromBlackList(std::string username, EMError &error) = 0;
148 };
149 
150 }
151 #endif
Definition: emerror.h:27
Definition: emcontactmanager_interface.h:25
Definition: emattributevalue.h:28
Definition: emcontactlistener.h:31