HyphenateChatSDK 4.2.3
构造函数 | 所有成员列表
<IEMChatroomManager>协议 参考

#import <IEMChatroomManager.h>

类 <IEMChatroomManager> 继承关系图:

构造函数

(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 
(EMPageResult< EMChatroom * > *_Nullable) - getChatroomsFromServerWithPage:pageSize:error:
 
(void) - getChatroomsFromServerWithPage:pageSize:completion:
 
(EMChatroom *) - joinChatroom:error:
 
(void) - joinChatroom:completion:
 
(void) - joinChatroom:ext:leaveOtherRooms:completion:
 
(void) - leaveChatroom:error:
 
(void) - leaveChatroom:completion:
 
(EMChatroom *_Nullable) - getChatroomSpecificationFromServerWithId:error:
 
(void) - getChatroomSpecificationFromServerWithId:completion:
 
(EMCursorResult< NSString * > *_Nullable) - getChatroomMemberListFromServerWithId:cursor:pageSize:error:
 
(void) - getChatroomMemberListFromServerWithId:cursor:pageSize:completion:
 
(NSString *_Nullable) - getChatroomAnnouncementWithId:error:
 
(void) - getChatroomAnnouncementWithId:completion:
 

详细描述

管理聊天室的类。

函数文档

◆ addDelegate:delegateQueue:

- (void) addDelegate: (id< EMChatroomManagerDelegate > _Nonnull)  aDelegate
delegateQueue: (dispatch_queue_t _Nullable)  aQueue 
required

添加回调代理。

参数
aDelegate要添加的代理。
aQueue代理执行的队列。

◆ getChatroomAnnouncementWithId:completion:

- (void) getChatroomAnnouncementWithId: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(NSString *_Nullable aAnnouncement, EMError *_Nullable aError))  aCompletionBlock 
required

获取聊天室公告。

异步方法。

参数
aChatroomId聊天室 ID。
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ getChatroomAnnouncementWithId:error:

- (NSString *_Nullable) getChatroomAnnouncementWithId: (NSString *_Nonnull)  aChatroomId
error: (EMError **_Nullable)  pError 
required

获取聊天室公告。

同步方法,会阻塞当前线程。

参数
aChatroomId聊天室 ID。
pError错误信息。
返回
聊天室公告。

◆ getChatroomMemberListFromServerWithId:cursor:pageSize:completion:

- (void) getChatroomMemberListFromServerWithId: (NSString *_Nonnull)  aChatroomId
cursor: (NSString *_Nullable)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(EMCursorResult< NSString * > *_Nullable aResult, EMError *_Nullable aError))  aCompletionBlock 
required

获取聊天室成员列表。

异步方法。

参数
aChatroomId聊天室 ID。
aCursor游标,首次调用传空。
aPageSize获取多少条。
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ getChatroomMemberListFromServerWithId:cursor:pageSize:error:

- (EMCursorResult< NSString * > *_Nullable) getChatroomMemberListFromServerWithId: (NSString *_Nonnull)  aChatroomId
cursor: (NSString *_Nullable)  aCursor
pageSize: (NSInteger)  aPageSize
error: (EMError **_Nullable)  pError 
required

获取聊天室成员列表。

同步方法,会阻塞当前线程。

参数
aChatroomId聊天室 ID。
aCursor游标,首次调用传空。
aPageSize获取多少条。
pError错误信息。
返回
聊天室成员列表和游标。

◆ getChatroomsFromServerWithPage:pageSize:completion:

- (void) getChatroomsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
completion: (void(^)(EMPageResult< EMChatroom * > *_Nullable aResult, EMError *_Nullable aError))  aCompletionBlock 
required

从服务器获取指定数目的聊天室。

异步方法。

参数
aPageNum获取第几页。
aPageSize获取多少条。
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ getChatroomsFromServerWithPage:pageSize:error:

- (EMPageResult< EMChatroom * > *_Nullable) getChatroomsFromServerWithPage: (NSInteger)  aPageNum
pageSize: (NSInteger)  aPageSize
error: (EMError **_Nullable)  pError 
required

从服务器获取指定数目的聊天室。

同步方法,会阻塞当前线程。

参数
aPageNum获取第几页。
aPageSize获取多少条。
pError出错信息。
返回
获取的聊天室列表,详见 EMPageResult。

◆ getChatroomSpecificationFromServerWithId:completion:

- (void) getChatroomSpecificationFromServerWithId: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError))  aCompletionBlock 
required

获取聊天室详情。

异步方法。

参数
aChatroomId聊天室 ID
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ getChatroomSpecificationFromServerWithId:error:

- (EMChatroom *_Nullable) getChatroomSpecificationFromServerWithId: (NSString *_Nonnull)  aChatroomId
error: (EMError *_Nullable *)  pError 
required

获取指定的聊天室。

同步方法,会阻塞当前线程。

参数
aChatroomId聊天室 ID。
pError错误信息。
返回
聊天室实例,详见 EMChatroom。

◆ joinChatroom:completion:

- (void) joinChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError))  aCompletionBlock 
required

加入聊天室。

异步方法。

参数
aChatroomId聊天室的 ID。
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ joinChatroom:error:

- (EMChatroom *) joinChatroom: (NSString *_Nonnull)  aChatroomId
error: (EMError **_Nullable)  pError 
required

加入一个聊天室。

同步方法,会阻塞当前线程。

参数
aChatroomId聊天室的 ID。
pError返回的错误信息。
返回
所加入的聊天室,详见 EMChatroom。

◆ joinChatroom:ext:leaveOtherRooms:completion:

- (void) joinChatroom: (NSString *_Nonnull)  aChatroomId
ext: (NSString *_Nullable)  ext
leaveOtherRooms: (BOOL)  leaveOtherRooms
completion: (void(^)(EMChatroom *_Nullable aChatroom, EMError *_Nullable aError))  aCompletionBlock 
required

加入聊天室。

异步方法。

参数
aChatroomId聊天室 ID。
ext扩展信息。
leaveOtherRooms加入聊天室时候,是否退出已加入的聊天室。
  • YES:加入该聊天室时,退出其他聊天室。
  • (默认)NO:加入该聊天室时,不退出其他聊天室。
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ leaveChatroom:completion:

- (void) leaveChatroom: (NSString *_Nonnull)  aChatroomId
completion: (void(^)(EMError *_Nullable aError))  aCompletionBlock 
required

退出聊天室。

异步方法。

参数
aChatroomId聊天室 ID。
aCompletionBlock该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。

◆ leaveChatroom:error:

- (void) leaveChatroom: (NSString *_Nonnull)  aChatroomId
error: (EMError **_Nullable)  pError 
required

退出聊天室。

同步方法,会阻塞当前线程。

参数
aChatroomId聊天室 ID。
pError错误信息。

◆ removeDelegate:

- (void) removeDelegate: (id< EMChatroomManagerDelegate > _Nonnull)  aDelegate
required

移除回调代理。

参数
aDelegate要移除的代理。

该协议的文档由以下文件生成: