Easemob Windows SDK
emchatroommanager_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 #ifndef __easemob__emchatroommanager_interface__
14 #define __easemob__emchatroommanager_interface__
15 
16 #include "emchatroommanager_listener.h"
17 #include "emchatroom.h"
18 #include "emerror.h"
19 #include "emcursorresult.h"
20 
21 #include <vector>
22 
23 namespace easemob
24 {
25 
26 typedef std::vector<EMChatroomPtr> EMChatroomList;
27 
28 class EASEMOB_API EMChatroomManagerInterface
29 {
30 public:
31  virtual ~EMChatroomManagerInterface() {};
32 
39  virtual void addListener(EMChatroomManagerListener*) = 0;
40 
47  virtual void removeListener(EMChatroomManagerListener*) = 0;
48 
55  virtual void clearListeners() = 0;
56 
63  virtual EMChatroomPtr chatroomWithId(const std::string &chatroomId) = 0;
64 
71  virtual EMChatroomList fetchAllChatrooms(
72  EMError &error) = 0;
73 
82  virtual EMChatroomPtr fetchChatroomSpecification(
83  const std::string &chatroomId,
84  EMError &error,
85  bool fetchMembers = false
86  ) = 0;
87 
95  virtual EMChatroomPtr joinChatroom(
96  const std::string &chatroomId,
97  EMError &error
98  ) = 0;
99 
107  virtual EMChatroomPtr leaveChatroom(
108  const std::string &chatroomId,
109  EMError &error
110  ) = 0;
111 
121  virtual EMCursorResult fetchChatroomsWithCursor(
122  const std::string &cursor,
123  int pageSize,
124  EMError &error) = 0;
125 
126 
133  virtual EMChatroomPtr joinedChatroomById(const std::string &chatroomId) = 0;
134 };
135 }
136 
137 #endif /* defined(__easemob__emchatroommanager_interface__) */
Definition: emcursorresult.h:24
Definition: emerror.h:27
Definition: emchatroommanager_listener.h:22
Definition: emchatroommanager_interface.h:28
Definition: emattributevalue.h:28