最近更新时间:2024.03.11 19:19:40
首次发布时间:2023.04.24 11:11:45
@protocol BIMFriendListener <NSObject>
好友事件回调监听方。
- (void)onFriendApply:(BIMFriendApplyInfo *)applyInfo;
申请成为好友回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
applyInfo | BIMFriendApplyInfo* | 申请信息,参看 BIMFriendApplyInfo。 |
- (void)onFriendDelete:(long long)uid;
删除好友回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
uid | long long | 用户 ID。 |
- (void)onFriendAdd:(BIMUserFullInfo *)info;
好友新增(同意好友)。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
info | BIMUserFullInfo* | 好友信息,参看 BIMUserFullInfo。 |
- (void)onFriendApplyAgree:(BIMFriendApplyInfo *)applyInfo;
通过好友申请。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
applyInfo | BIMFriendApplyInfo* | 好友申请信息,参看 BIMFriendApplyInfo。 |
- (void)onFriendApplyRefuse:(BIMFriendApplyInfo *)applyInfo;
拒绝好友申请。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
applyInfo | BIMFriendApplyInfo* | 好友申请信息,参看 BIMFriendApplyInfo。 |
- (void)onFriendApplyUnreadCountChanged:(long long)count;
好友申请未读数变化。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
count | long long | 变化后的未读数。 |
- (void)onFriendUpdate:(BIMUserFullInfo *)info;
好友信息变更回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
info | BIMUserFullInfo* | 好友信息,参看 BIMFriendInfo。 |
- (void)onBlackListAdd:(BIMUserFullInfo *)blacklistFriendInfo;
添加黑名单回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
blacklistFriendInfo | BIMUserFullInfo* | 黑名单信息,参看 BIMUserFullInfo。 |
- (void)onBlackListDelete:(long long)uid;
删除黑名单回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
uid | long long | 用户ID。 |
- (void)onBlackListUpdate:(BIMUserFullInfo *)blacklistFriendInfo;
修改黑名单回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
blacklistFriendInfo | BIMUserFullInfo* | 黑名单信息,参看 BIMUserFullInfo。 |
- (void)onUserProfileUpdate:(BIMUserFullInfo *)info;
用户信息更新回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
info | BIMUserFullInfo* | 用户信息,参看 BIMUserFullInfo。 |
@protocol BIMLiveConversationListener <NSObject>
会话监听方。
返回 | 名称 |
---|---|
void | onConversationChanged: |
- (void)onConversationChanged:(BIMConversation *)conversation;
会话发生更新。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
@protocol BIMLiveGroupMemberEventListener <NSObject>
群成员事件监听方。
- (void)onMemberJoined:(BIMConversation *)conversation memberList:(NSArray<id<BIMMember>> *)memberList;
成员加入直播群。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
memberList | NSArray<id | 成员列表,参看 BIMMember。 |
- (void)onMemberLeave:(BIMConversation *)conversation memberList:(NSArray<id<BIMMember>> *)memberList;
成员离开直播群。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
memberList | NSArray<id | 成员列表,参看 BIMMember。 |
- (void)onMemberKicked:(BIMConversation *)conversation memberList:(NSArray<id<BIMMember>> *)memberList operatorID:(long)operatorID;
成员被踢出直播群。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
memberList | NSArray<id | 成员列表,参看 BIMMember。 |
operatorID | long | 操作用户 UID。 |
- (void)onMemberOwnerChanged:(BIMConversation *)conversation fromUID:(long long)fromUID toUID:(long long)toUID;
群主发生变化。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
fromUID | long long | 旧群主 UID。 |
toUID | long long | 新群主 UID。 |
- (void)onMemberSilent:(BIMConversation *)conversation memberSilentList:(NSArray<id<BIMMember>> *)memberSilentList status:(BIMBlockStatus)status operatorID:(long long)operatorID;
群成员被禁言/解禁。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息, 参看 BIMConversation。 |
memberSilentList | NSArray<id | 禁言、取消成员列表 |
status | BIMBlockStatus | 禁言状态,参看 BIMBlockStatus。 |
operatorID | long long | 操作用户 UID |
- (void)onAllMemberSilent:(BIMConversation *)conversation status:(BIMBlockStatus)status;
禁言、取消会话(禁言、取消所有人)。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息, 参看 BIMConversation。 |
status | BIMBlockStatus | 禁言状态,参看 BIMBlockStatus。 |
- (void)onAddAdmin:(BIMConversation *)conversation memberList:(NSArray<id<BIMMember>> *)memberList operatorID:(long)operatorID;
添加管理员
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
memberList | NSArray<id | 添加的管理员列表,参看 BIMMember。 |
operatorID | long | 操作用户 UID。 |
- (void)onRemoveAdmin:(BIMConversation *)conversation memberList:(NSArray<id<BIMMember>> *)memberList operatorID:(long)operatorID;
移除管理员。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
memberList | NSArray<id | 移除的管理员列表,参看 BIMMember。 |
operatorID | long | 操作用户 UID。 |
- (void)onMemberInfoChanged:(BIMConversation *)conversation member:(id<BIMMember>)member;
成员信息变更。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
member | id | 变更的群成员信息,参看 BIMMember。 |
- (void)onBatchMemberInfoChanged:(BIMConversation *_Nullable)conversation members:(NSArray<id<BIMMember>> *_Nullable)members;
批量成员信息变更。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
members | NSArray<id | 批量变更的群成员信息,参看 BIMMember。 |
@protocol BIMLiveMessageListener <NSObject>
消息监听方。
返回 | 名称 |
---|---|
void | onReceiveMessage: |
void | onDeleteMessage: |
void | onUpdateMessage: |
void | onSendMessage: |
- (void)onReceiveMessage:(BIMMessage *)message;
收到新消息。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
- (void)onDeleteMessage:(NSString *)msgID;
收到的消息被删除。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
msgID | NSString* | 消息ID |
- (void)onUpdateMessage:(BIMMessage *)message;
收到的消息被修改。(内容+扩展)
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
- (void)onSendMessage:(BIMMessage *)message;
发送消息请求前调用。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
@protocol BIMConnectListener <NSObject>
长链状态监听方。
返回 | 名称 |
---|---|
void | onConnectStatusChanged: |
void | onTokenInvalid |
- (void)onConnectStatusChanged:(BIMConnectStauts)status;
长链状态改变回调。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
status | BIMConnectStauts | 长链状态码,参看 BIMConnectStauts。 |
- (void)onTokenInvalid;
Token 失效回调。
@protocol BIMMessageListener <NSObject>
消息监听方。
返回 | 名称 |
---|---|
void | onReceiveMessage: |
void | onDeleteMessage: |
void | onRecallMessage: |
void | onUpdateMessage: |
void | onSendMessage: |
void | onReceiveMessagesReadReceipt: |
- (void)onReceiveMessage:(BIMMessage *)message;
收到新消息。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
- (void)onDeleteMessage:(NSString *)msgID;
收到的消息被删除。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
msgID | NSString* | 消息ID |
- (void)onRecallMessage:(BIMMessage *)message;
收到的消息被撤回。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
- (void)onUpdateMessage:(BIMMessage *)message;
收到的消息被修改。(内容+扩展)
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
- (void)onSendMessage:(BIMMessage *)message;
发送消息入库完成。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
message | BIMMessage* | 消息体,参看 BIMMessage。 |
- (void)onReceiveMessagesReadReceipt:(NSArray<BIMMessageReadReceipt *> *)receiptList;
收到消息已读回执。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
receiptList | NSArray<BIMMessageReadReceipt>** | 消息已读回执列表,参看 BIMMessageReadReceipt。 |
@protocol BIMConversationListListener <NSObject>
会话监听方。
返回 | 名称 |
---|---|
void | onNewConversation: |
void | onConversationChanged: |
void | onTotalUnreadMessageCountChanged: |
void | onConversationDeleted: |
void | onConversationRead:fromUid: |
- (void)onNewConversation:(NSArray<BIMConversation *> *)conversationList;
获取到新的会话。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversationList | NSArray<BIMConversation>** | 会话列表,参看 BIMConversation。 |
- (void)onConversationChanged:(NSArray<BIMConversation *> *)conversationList;
会话发生更新。
某些会话的关键信息发生变化(未读计数发生变化、最后一条消息被更新等等),可以根据会话的 lastMessage 重新对会话列表做排序。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversationList | NSArray<BIMConversation>** | 会话列表,参看 BIMConversation。 |
- (void)onTotalUnreadMessageCountChanged:(UInt64)totalUnreadCount;
会话未读消息数发生变化。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
totalUnreadCount | UInt64 | 会话未读消息数。 |
注意
会话未读消息不包括设置为免打扰会话中的未读消息。
- (void)onConversationDeleted:(NSArray<NSString *> *)conversationIdList;
会话被删除。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversationIdList | NSArray<NSString>** | 会话列表。 |
- (void)onConversationRead:(NSString * _Nonnull)conversationId fromUid:(long long)uid;
收到会话已读回执。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversationId | NSString* | 会话ID。 |
uid | long long | 发送会话已读回执的用户ID。 |
@protocol BIMLiveGroupMarkTypeListener <NSObject>
直播群标记类型监听方。
返回 | 名称 |
---|---|
void | onMarkTypesAdded:changeInfo: |
void | onMarkTypesDeleted:changeInfo: |
- (void)onMarkTypesAdded:(BIMConversation *_Nonnull)conversation changeInfo:(BIMLiveGroupMarkTypeChangeInfo *_Nullable)changeInfo;
新增标记类型。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
changeInfo | BIMLiveGroupMarkTypeChangeInfo* | 变更信息,参看 BIMLiveGroupMarkTypeChangeInfo。 |
- (void)onMarkTypesDeleted:(BIMConversation *_Nonnull)conversation changeInfo:(BIMLiveGroupMarkTypeChangeInfo *_Nullable)changeInfo;
删除标记类型。
传入参数
参数名 | 类型 | 说明 |
---|---|---|
conversation | BIMConversation* | 会话信息,参看 BIMConversation。 |
changeInfo | BIMLiveGroupMarkTypeChangeInfo* | 变更信息,参看 BIMLiveGroupMarkTypeChangeInfo。 |