ShengwangChatSDK 1.3.2
构造函数 | 所有成员列表
<IAgoraChatThreadManager>协议 参考
类 <IAgoraChatThreadManager> 继承关系图:

构造函数

(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 
(void) - getChatThreadFromSever:completion:
 
(void) - getJoinedChatThreadsFromServerWithCursor:pageSize:completion:
 
(void) - getChatThreadsFromServerWithParentId:cursor:pageSize:completion:
 
(void) - getJoinedChatThreadsFromServerWithParentId:cursor:pageSize:completion:
 
(void) - getChatThreadMemberListFromServerWithId:cursor:pageSize:completion:
 
(void) - getLastMessageFromSeverWithChatThreads:completion:
 
(void) - removeMemberFromChatThread:threadId:completion:
 
(void) - updateChatThreadName:threadId:completion:
 
(void) - createChatThread:messageId:parentId:completion:
 
(void) - joinChatThread:completion:
 
(void) - leaveChatThread:completion:
 
(void) - destroyChatThread:completion:
 

函数文档

◆ addDelegate:delegateQueue:

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

Add delegate

参数
aDelegateDelegate is kindof protocol AgoraChatThreadManagerDelegate
aQueue(optional) The queue of calling delegate methods. Pass in nil to run on main thread.

◆ createChatThread:messageId:parentId:completion:

- (void) createChatThread: (NSString *)  threadName
messageId: (NSString *)  messageId
parentId: (NSString *)  parentId
completion: (void(^)(AgoraChatThread *_Nullable thread, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Create a subsection

参数
threadNameThe id of the subarea to get(limit 64 character)
messageIdThe message id of the operation to create the sub-area
parentIdThe session id where the message of the operation creates the sub-area is also the to of that message
completionReturns the callback, containing an AgoraChatThread object and an AgoraChatError error object

◆ destroyChatThread:completion:

- (void) destroyChatThread: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

destroy a subsection

参数
threadIdThe id of the subzone to destroy
aCompletionBlockreturn callback, success or failure

◆ getChatThreadFromSever:completion:

- (void) getChatThreadFromSever: (NSString *)  threadId
completion: (void(^)(AgoraChatThread *_Nullable thread, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the thread detail

参数
threadIdThe id of the subarea to get
aCompletionBlockReturns the callback, containing an AgoraChatThread object and an AgoraChatError error object

◆ getChatThreadMemberListFromServerWithId:cursor:pageSize:completion:

- (void) getChatThreadMemberListFromServerWithId: (NSString *)  threadId
cursor: (NSString *)  aCursor
pageSize: (NSInteger)  pageSize
completion: (void(^)(AgoraChatCursorResult< NSString * > *_Nullable aResult, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get a list of members in a subsection

参数
threadIdThe id of the subarea to get members
aCursorcursor The position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getChatThreadsFromServerWithParentId:cursor:pageSize:completion:

- (void) getChatThreadsFromServerWithParentId: (NSString *)  parentId
cursor: (NSString *)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatThread * > *_Nullable result, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the subareas under a group from the server

参数
parentIdThe session id of the upper level of the sub-area
aCursorThe position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getJoinedChatThreadsFromServerWithCursor:pageSize:completion:

- (void) getJoinedChatThreadsFromServerWithCursor: (NSString *)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatThread * > *_Nullable result, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the subzones the user has joined from the server

参数
aCursorcursor The position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getJoinedChatThreadsFromServerWithParentId:cursor:pageSize:completion:

- (void) getJoinedChatThreadsFromServerWithParentId: (NSString *)  parentId
cursor: (NSString *)  aCursor
pageSize: (NSInteger)  aPageSize
completion: (void(^)(AgoraChatCursorResult< AgoraChatThread * > *_Nullable result, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the mine subareas under a group from the server

参数
parentIdThe session id of the upper level of the sub-area
aCursorThe position cursor of the last fetch
pageSizeNumber of single requests limit 50
aCompletionBlockReturns the callback, containing an AgoraChatCursorResult object and an AgoraChatError error object

◆ getLastMessageFromSeverWithChatThreads:completion:

- (void) getLastMessageFromSeverWithChatThreads: (NSArray< NSString * > *)  threadIds
completion: (void(^)(NSDictionary< NSString *, AgoraChatMessage * > *_Nullable messageMap, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Get the thread detail

参数
threadIdsThe ids of the subarea to get(No more than 20 ids for a single request)
aCompletionBlockReturn the callback, including a dictionary key is the sub-area id, value is the AgoraChatMessage object

◆ joinChatThread:completion:

- (void) joinChatThread: (NSString *)  threadId
completion: (void(^)(AgoraChatThread *_Nullable thread, AgoraChatError *_Nullable aError))  aCompletionBlock 
required

join a subsection

参数
threadIdThe id of the subzone to join
aCompletionBlockreturn callback, success or failure

◆ leaveChatThread:completion:

- (void) leaveChatThread: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

leave a subsection

参数
threadIdThe id of the subzone to leave
aCompletionBlockreturn callback, success or failure

◆ removeDelegate:

- (void) removeDelegate: (id< AgoraChatThreadManagerDelegate >)  aDelegate
required

Remove delegate

参数
aDelegateDelegate is kindof protocol AgoraChatThreadManagerDelegate

◆ removeMemberFromChatThread:threadId:completion:

- (void) removeMemberFromChatThread: (NSString *)  aUser
threadId: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Remove sub-zone members (only available for group management)

参数
aUserTo remove the user's ease id
athreadIdsubarea id to operate
aCompletionBlockreturn callback, success or failure

◆ updateChatThreadName:threadId:completion:

- (void) updateChatThreadName: (NSString *)  name
threadId: (NSString *)  athreadId
completion: (void(^)(AgoraChatError *_Nullable aError))  aCompletionBlock 
required

Update subzone name (only available for group managers or creators)

参数
namethe name you want to change(limit 64 character)
threadIdsubarea id to operate
aCompletionBlockreturn callback, success or failure

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