NIMSDK-iOS
载入中...
搜索中...
未找到
NIMChatroomManagerProtocol.h 文件参考
#import <Foundation/Foundation.h>

浏览源代码.

protocol  <NIMChatroomManagerDelegate>
 
protocol  <NIMChatroomManager>
 

类型定义

typedef void(^ NIMChatroomHandler) (NSError *__nullable error)
 
typedef void(^ NIMChatroomMemberHandler) (NSError *__nullable error, NIMChatroomMember *__nullable member)
 
typedef void(^ NIMChatroomEnterHandler) (NSError *__nullable error, NIMChatroom *__nullable chatroom, NIMChatroomMember *__nullable me)
 
typedef void(^ NIMChatroomInfoHandler) (NSError *__nullable error, NIMChatroom *__nullable chatroom)
 
typedef void(^ NIMChatroomMembersHandler) (NSError *__nullable error, NSArray< NIMChatroomMember * > *__nullable members)
 
typedef void(^ NIMChatroomMembersCountHandler) (NSError *__nullable error, uint64_t count)
 
typedef void(^ NIMChatroomQueueInfoHandler) (NSError *__nullable error, NSArray< NSDictionary< NSString *, NSString * > * > *__nullable info)
 
typedef void(^ NIMChatroomQueueRemoveHandler) (NSError *__nullable error, NSDictionary< NSString *, NSString * > *__nullable element)
 
typedef void(^ NIMChatroomQueueBatchUpdateHandler) (NSError *__nullable error, NSArray< NSString * > *__nullable elements)
 
typedef void(^ NIMFetchChatroomHistoryBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
 
typedef void(^ NIMGetMessagesByTagsHandler) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)
 
typedef NSString *(^ NIMProvideChatroomDynamicTokenHandler) (NSString *__nullable roomId, NSString *__nullable account)
 

枚举

enum  NIMChatroomConnectionState { NIMChatroomConnectionStateEntering = 0 , NIMChatroomConnectionStateEnterOK = 1 , NIMChatroomConnectionStateEnterFailed = 2 , NIMChatroomConnectionStateLoseConnection = 3 }
 
enum  NIMChatroomKickReason { NIMChatroomKickReasonInvalidRoom = 1 , NIMChatroomKickReasonByManager = 2 , NIMChatroomKickReasonByConflictLogin = 3 , NIMChatroomKickReasonBlacklist = 5 }
 

类型定义说明

◆ NIMChatroomEnterHandler

typedef void(^ NIMChatroomEnterHandler) (NSError *__nullable error, NIMChatroom *__nullable chatroom, NIMChatroomMember *__nullable me)

进入聊天室请求回调

参数
error错误信息
chatroom聊天室信息
me自己在聊天室内的信息

◆ NIMChatroomHandler

typedef void(^ NIMChatroomHandler) (NSError *__nullable error)

聊天室网络请求回调

参数
error错误信息

◆ NIMChatroomInfoHandler

typedef void(^ NIMChatroomInfoHandler) (NSError *__nullable error, NIMChatroom *__nullable chatroom)

聊天室信息请求回调

参数
error错误信息
chatroom聊天室信息

◆ NIMChatroomMemberHandler

typedef void(^ NIMChatroomMemberHandler) (NSError *__nullable error, NIMChatroomMember *__nullable member)

聊天室成员请求回调

参数
error错误信息
member更新后的聊天室成员信息

◆ NIMChatroomMembersCountHandler

typedef void(^ NIMChatroomMembersCountHandler) (NSError *__nullable error, uint64_t count)

聊天室成员数量数量回调

参数
error错误信息

◆ NIMChatroomMembersHandler

typedef void(^ NIMChatroomMembersHandler) (NSError *__nullable error, NSArray< NIMChatroomMember * > *__nullable members)

聊天室成员组网络数据回调

参数
error错误信息

◆ NIMChatroomQueueBatchUpdateHandler

typedef void(^ NIMChatroomQueueBatchUpdateHandler) (NSError *__nullable error, NSArray< NSString * > *__nullable elements)

聊天室队列批量更新元素回调

参数
error错误信息
elements不存在的元素elementKey列表

◆ NIMChatroomQueueInfoHandler

typedef void(^ NIMChatroomQueueInfoHandler) (NSError *__nullable error, NSArray< NSDictionary< NSString *, NSString * > * > *__nullable info)

聊天室队列数据回调

参数
error错误信息

◆ NIMChatroomQueueRemoveHandler

typedef void(^ NIMChatroomQueueRemoveHandler) (NSError *__nullable error, NSDictionary< NSString *, NSString * > *__nullable element)

聊天室队列移除元素回调

参数
error错误信息

◆ NIMFetchChatroomHistoryBlock

typedef void(^ NIMFetchChatroomHistoryBlock) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)

拉取服务器聊天消息记录block

参数
error错误,如果成功则error为nil
messages读取的消息列表

◆ NIMGetMessagesByTagsHandler

typedef void(^ NIMGetMessagesByTagsHandler) (NSError *__nullable error, NSArray< NIMMessage * > *__nullable messages)

根据标签拉取服务器聊天消息记录的回调

参数
error错误,如果成功则error为nil
messages读取的消息列表

◆ NIMProvideChatroomDynamicTokenHandler

typedef NSString *(^ NIMProvideChatroomDynamicTokenHandler) (NSString *__nullable roomId, NSString *__nullable account)

聊天室动态token block

枚举类型说明

◆ NIMChatroomConnectionState

聊天室连接状态

枚举值
NIMChatroomConnectionStateEntering 

正在进入

NIMChatroomConnectionStateEnterOK 

进入聊天室成功

NIMChatroomConnectionStateEnterFailed 

进入聊天室失败

NIMChatroomConnectionStateLoseConnection 

和聊天室失去连接

◆ NIMChatroomKickReason

聊天室被踢原因

枚举值
NIMChatroomKickReasonInvalidRoom 

聊天室已经解散

NIMChatroomKickReasonByManager 

被聊天室管理员踢出

NIMChatroomKickReasonByConflictLogin 

多端被踢

NIMChatroomKickReasonBlacklist 

被拉黑