NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
v2_nim_def_callback.hpp
浏览该文件的文档.
1#ifndef V2_NIM_DEF_CALLBACK_H
2#define V2_NIM_DEF_CALLBACK_H
4namespace v2 {
6template <typename T>
7class V2NIMSuccessCallback : public nstd::function<void(T)> {
8public:
9 using nstd::function<void(T)>::function;
10 using nstd::function<void(T)>::operator=;
11 using nstd::function<void(T)>::operator();
14};
15
16template <>
17class V2NIMSuccessCallback<void> : public nstd::function<void()> {
18public:
19 using nstd::function<void()>::function;
20 using nstd::function<void()>::operator=;
21 using nstd::function<void()>::operator();
23 : nstd::function<void()>(func) {}
24};
25
29
32using V2NIMProgressCallback = nstd::function<void(uint32_t progress)>;
33
37using V2NIMReconnectDelayProvider = nstd::function<uint32_t(uint32_t defaultDelay)>;
38
50 bool operator==(const V2NIMLoginListener& other) const {
53 }
54};
55
67 bool operator==(const V2NIMLoginDetailListener& other) const {
69 onDataSync == other.onDataSync;
70 }
71};
72
88 nstd::function<void(uint32_t unreadCount)> onTotalUnreadCountChanged;
92 nstd::function<void(const nstd::string& conversationId, time_t readTime)> onConversationReadTimeUpdated;
93};
94
107};
108
131};
132
139};
140
156 nstd::function<void(V2NIMTeam team, bool isKicked)> onTeamLeft;
169};
170
177};
178
187};
188
201};
202
213};
214
230 nstd::function<void(bool tempChatBanned, uint64_t tempChatBannedDuration)> onSelfTempChatBannedUpdated;
236 nstd::function<void(nstd::string messageClientId, uint64_t messageTime)> onMessageRevokedNotification;
241};
242
247};
248
259};
260
273};
274
275} // namespace v2
276
277#endif
Definition: ne_stl_continuous_container.h:15
Definition: ne_stl_string.h:19
通用成功
Definition: v2_nim_def_callback.hpp:7
Definition: v2_nim_ai_service.hpp:4
V2NIMChatroomMemberRole
Definition: v2_nim_def_enum.hpp:1411
V2NIMFriendDeletionType
Definition: v2_nim_def_enum.hpp:1397
V2NIMChatroomStatus
Definition: v2_nim_def_enum.hpp:1461
V2NIMLoginClientChange
Definition: v2_nim_def_enum.hpp:1196
V2NIMLoginStatus
Definition: v2_nim_def_enum.hpp:1176
V2NIMTeamType
Definition: v2_nim_def_enum.hpp:1266
V2NIMDataSyncType
Definition: v2_nim_def_enum.hpp:1223
V2NIMP2PMessageMuteMode
Definition: v2_nim_def_enum.hpp:1359
V2NIMConnectStatus
Definition: v2_nim_def_enum.hpp:1205
V2NIMDataSyncState
Definition: v2_nim_def_enum.hpp:1232
V2NIMTeamMessageMuteMode
Definition: v2_nim_def_enum.hpp:1350
Definition: ne_stl_optional.h:16
Definition: ne_stl_bind.h:132
Definition: v2_nim_def_callback.hpp:244
nstd::function< void(V2NIMAIModelCallResult response)> onProxyAIModelCall
AI 消息的响应的回调
Definition: v2_nim_def_callback.hpp:246
Definition: v2_nim_def_struct.hpp:761
Definition: v2_nim_def_callback.hpp:204
nstd::function< void(nstd::optional< V2NIMError > error)> onChatroomExited
退出聊天室
Definition: v2_nim_def_callback.hpp:210
nstd::function< void()> onChatroomEntered
进入聊天室
Definition: v2_nim_def_callback.hpp:208
nstd::function< void(V2NIMChatroomStatus status, nstd::optional< V2NIMError > error)> onChatroomStatus
聊天室状态
Definition: v2_nim_def_callback.hpp:206
nstd::function< void(V2NIMChatroomKickedInfo kickedInfo)> onChatroomKicked
自己被踢出聊天室
Definition: v2_nim_def_callback.hpp:212
Definition: v2_nim_def_struct.hpp:1773
Definition: v2_nim_def_struct.hpp:1813
Definition: v2_nim_def_callback.hpp:216
nstd::function< void(V2NIMChatroomMember member)> onChatroomMemberEnter
聊天室成员进入
Definition: v2_nim_def_callback.hpp:220
nstd::function< void(V2NIMChatroomInfo chatroomInfo)> onChatroomInfoUpdated
聊天室信息更新
Definition: v2_nim_def_callback.hpp:232
nstd::function< void(bool chatBanned)> onSelfChatBannedUpdated
自己的禁言状态变更
Definition: v2_nim_def_callback.hpp:228
nstd::function< void(bool tempChatBanned, uint64_t tempChatBannedDuration)> onSelfTempChatBannedUpdated
自己的临时禁言状态变更
Definition: v2_nim_def_callback.hpp:230
nstd::function< void(nstd::vector< V2NIMChatroomMessage > messages)> onReceiveMessages
收到新消息
Definition: v2_nim_def_callback.hpp:218
nstd::function< void(nstd::vector< nstd::string > tags)> onChatroomTagsUpdated
更新角色标签
Definition: v2_nim_def_callback.hpp:238
nstd::function< void(nstd::string accountId)> onChatroomMemberExit
聊天室成员退出
Definition: v2_nim_def_callback.hpp:222
nstd::function< void(V2NIMChatroomMember member)> onChatroomMemberInfoUpdated
成员信息更新
Definition: v2_nim_def_callback.hpp:226
nstd::function< void(nstd::string messageClientId, uint64_t messageTime)> onMessageRevokedNotification
消息撤回回调
Definition: v2_nim_def_callback.hpp:236
nstd::function< void(const V2NIMChatroomMessage &message)> onSendMessage
本端发送消息状态回调
Definition: v2_nim_def_callback.hpp:240
nstd::function< void(V2NIMChatroomMemberRole previousRole, V2NIMChatroomMember member)> onChatroomMemberRoleUpdated
成员角色更新
Definition: v2_nim_def_callback.hpp:224
nstd::function< void(bool chatBanned)> onChatroomChatBannedUpdated
聊天室禁言状态更新
Definition: v2_nim_def_callback.hpp:234
Definition: v2_nim_def_struct.hpp:152
Definition: v2_nim_def_struct.hpp:1838
Definition: v2_nim_def_struct.hpp:1262
Definition: v2_nim_def_struct.hpp:1271
Definition: v2_nim_def_callback.hpp:96
nstd::function< void(V2NIMConversationGroup conversationGroup)> onConversationGroupChanged
会话分组更新
Definition: v2_nim_def_callback.hpp:102
nstd::function< void(nstd::string groupId, nstd::vector< nstd::string > conversationIds)> onConversationsRemovedFromGroup
会话移出会话分组
Definition: v2_nim_def_callback.hpp:106
nstd::function< void(nstd::string groupId)> onConversationGroupDeleted
会话分组删除
Definition: v2_nim_def_callback.hpp:100
nstd::function< void(nstd::string groupId, nstd::vector< V2NIMConversation > conversationList)> onConversationsAddedToGroup
会话加入会话分组
Definition: v2_nim_def_callback.hpp:104
nstd::function< void(V2NIMConversationGroup conversationGroup)> onConversationGroupCreated
会话分组创建
Definition: v2_nim_def_callback.hpp:98
Definition: v2_nim_def_struct.hpp:1201
Definition: v2_nim_def_callback.hpp:74
nstd::function< void(V2NIMConversation conversation)> onConversationCreated
会话创建
Definition: v2_nim_def_callback.hpp:82
nstd::function< void(nstd::vector< nstd::string > conversationIds)> onConversationDeleted
会话删除
Definition: v2_nim_def_callback.hpp:84
nstd::function< void(nstd::vector< V2NIMConversation > conversationList)> onConversationChanged
会话更新
Definition: v2_nim_def_callback.hpp:86
nstd::function< void(V2NIMConversationFilter filter, uint32_t unreadCount)> onUnreadCountChangedByFilter
根据过滤条件订阅的会话未读数变更
Definition: v2_nim_def_callback.hpp:90
nstd::function< void()> onSyncStarted
会话同步开始
Definition: v2_nim_def_callback.hpp:76
nstd::function< void(uint32_t unreadCount)> onTotalUnreadCountChanged
会话总未读数变更
Definition: v2_nim_def_callback.hpp:88
nstd::function< void(V2NIMError error)> onSyncFailed
会话同步错误
Definition: v2_nim_def_callback.hpp:80
nstd::function< void(const nstd::string &conversationId, time_t readTime)> onConversationReadTimeUpdated
同账号多端标记会话 ACK 通知时间戳变更
Definition: v2_nim_def_callback.hpp:92
nstd::function< void()> onSyncFinished
会话同步完成
Definition: v2_nim_def_callback.hpp:78
Definition: v2_nim_def_struct.hpp:7
Definition: v2_nim_def_struct.hpp:1606
Definition: v2_nim_def_struct.hpp:1578
Definition: v2_nim_def_callback.hpp:190
nstd::function< void(V2NIMFriendAddApplication rejectionInfo)> onFriendAddRejected
添加好友申请被拒绝
Definition: v2_nim_def_callback.hpp:198
nstd::function< void(V2NIMFriendAddApplication applicationInfo)> onFriendAddApplication
添加好友申请
Definition: v2_nim_def_callback.hpp:196
nstd::function< void(V2NIMFriend friendInfo)> onFriendInfoChanged
更新好友信息
Definition: v2_nim_def_callback.hpp:200
nstd::function< void(nstd::string accountId, V2NIMFriendDeletionType deletionType)> onFriendDeleted
删除好友
Definition: v2_nim_def_callback.hpp:194
nstd::function< void(V2NIMFriend friendInfo)> onFriendAdded
添加好友
Definition: v2_nim_def_callback.hpp:192
Definition: v2_nim_def_struct.hpp:1154
Definition: v2_nim_def_callback.hpp:57
nstd::function< void(V2NIMError)> onConnectFailed
连接失败
Definition: v2_nim_def_callback.hpp:63
bool operator==(const V2NIMLoginDetailListener &other) const
Definition: v2_nim_def_callback.hpp:67
nstd::function< void(V2NIMConnectStatus)> onConnectStatus
连接状态变更
Definition: v2_nim_def_callback.hpp:59
nstd::function< void(nstd::optional< V2NIMError >)> onDisconnected
连接断开
Definition: v2_nim_def_callback.hpp:61
nstd::function< void(V2NIMDataSyncType, V2NIMDataSyncState, nstd::optional< V2NIMError >)> onDataSync
数据同步
Definition: v2_nim_def_callback.hpp:65
Definition: v2_nim_def_callback.hpp:40
bool operator==(const V2NIMLoginListener &other) const
Definition: v2_nim_def_callback.hpp:50
nstd::function< void(V2NIMError)> onLoginFailed
登录失败
Definition: v2_nim_def_callback.hpp:44
nstd::function< void(V2NIMLoginClientChange, nstd::vector< V2NIMLoginClient >)> onLoginClientChanged
登录客户端变更
Definition: v2_nim_def_callback.hpp:48
nstd::function< void(V2NIMLoginStatus)> onLoginStatus
登录状态变更
Definition: v2_nim_def_callback.hpp:42
nstd::function< void(V2NIMKickedOfflineDetail)> onKickedOffline
被踢下线
Definition: v2_nim_def_callback.hpp:46
Definition: v2_nim_def_struct.hpp:625
Definition: v2_nim_def_callback.hpp:110
nstd::function< void(nstd::vector< V2NIMMessageRevokeNotification > revokeNotifications)> onMessageRevokeNotifications
消息撤回
Definition: v2_nim_def_callback.hpp:118
nstd::function< void(nstd::vector< V2NIMP2PMessageReadReceipt > readReceipts)> onReceiveP2PMessageReadReceipts
点对点已读回执
Definition: v2_nim_def_callback.hpp:114
nstd::function< void(nstd::vector< V2NIMMessageDeletedNotification > messageDeletedNotification)> onMessageDeletedNotifications
消息被删除
Definition: v2_nim_def_callback.hpp:124
nstd::function< void(nstd::vector< V2NIMMessage > messages)> onReceiveMessagesModified
更新消息在线同步通知
Definition: v2_nim_def_callback.hpp:130
nstd::function< void(V2NIMMessagePinNotification pinNotification)> onMessagePinNotification
消息 pin 状态
Definition: v2_nim_def_callback.hpp:120
nstd::function< void(nstd::vector< V2NIMMessage > messages)> onReceiveMessages
收到一条新消息
Definition: v2_nim_def_callback.hpp:112
nstd::function< void(const V2NIMMessage &message)> onSendMessage
本端发送消息状态回调
Definition: v2_nim_def_callback.hpp:128
nstd::function< void(nstd::vector< V2NIMTeamMessageReadReceipt > readReceipts)> onReceiveTeamMessageReadReceipts
群已读回执
Definition: v2_nim_def_callback.hpp:116
nstd::function< void(nstd::vector< V2NIMClearHistoryNotification > clearHistoryNotification)> onClearHistoryNotifications
清空会话历史消息
Definition: v2_nim_def_callback.hpp:126
nstd::function< void(V2NIMMessageQuickCommentNotification quickCommentNotification)> onMessageQuickCommentNotification
消息快捷评论
Definition: v2_nim_def_callback.hpp:122
Definition: v2_nim_def_struct.hpp:883
Definition: v2_nim_def_struct.hpp:1024
Definition: v2_nim_def_callback.hpp:134
nstd::function< void(nstd::vector< V2NIMCustomNotification > customNotification)> onReceiveCustomNotifications
收到自定义
Definition: v2_nim_def_callback.hpp:136
nstd::function< void(nstd::vector< V2NIMBroadcastNotification > broadcastNotification)> onReceiveBroadcastNotifications
收到广播
Definition: v2_nim_def_callback.hpp:138
Definition: v2_nim_def_callback.hpp:172
nstd::function< void(nstd::string teamId, V2NIMTeamType teamType, V2NIMTeamMessageMuteMode muteMode)> onTeamMessageMuteModeChanged
群组消息免打扰
Definition: v2_nim_def_callback.hpp:174
nstd::function< void(nstd::string accountId, V2NIMP2PMessageMuteMode muteMode)> onP2PMessageMuteModeChanged
点对点消息免打扰
Definition: v2_nim_def_callback.hpp:176
信令事件
Definition: v2_nim_def_struct.hpp:2312
Definition: v2_nim_def_callback.hpp:250
nstd::function< void(const V2NIMSignallingEvent &event)> onMultiClientEvent
多端事件操作同步回调
Definition: v2_nim_def_callback.hpp:256
nstd::function< void(const nstd::vector< V2NIMSignallingRoomInfo > &roomInfoList)> onSyncRoomInfoList
登录后,同步还在的信令频道房间列表
Definition: v2_nim_def_callback.hpp:258
nstd::function< void(const nstd::vector< V2NIMSignallingEvent > &events)> onOfflineEvent
离线事件回调
Definition: v2_nim_def_callback.hpp:254
nstd::function< void(const V2NIMSignallingEvent &event)> onOnlineEvent
在线事件回调
Definition: v2_nim_def_callback.hpp:252
Definition: v2_nim_def_callback.hpp:262
nstd::function< void(const nstd::vector< V2NIMUserStatus > &)> onUserStatusChanged
Definition: v2_nim_def_callback.hpp:272
Definition: v2_nim_def_struct.hpp:1331
Definition: v2_nim_def_struct.hpp:1500
Definition: v2_nim_def_callback.hpp:142
nstd::function< void(V2NIMTeam team, bool isKicked)> onTeamLeft
离开群组
Definition: v2_nim_def_callback.hpp:156
nstd::function< void(nstd::string operateAccountId, nstd::vector< V2NIMTeamMember > teamMembers)> onTeamMemberKicked
群组成员被踢
Definition: v2_nim_def_callback.hpp:162
nstd::function< void(V2NIMTeam team)> onTeamJoined
加入群组
Definition: v2_nim_def_callback.hpp:154
nstd::function< void()> onSyncStarted
群组信息同步开始
Definition: v2_nim_def_callback.hpp:144
nstd::function< void(V2NIMTeam team)> onTeamInfoUpdated
群组信息更新
Definition: v2_nim_def_callback.hpp:158
nstd::function< void(nstd::vector< V2NIMTeamMember > teamMembers)> onTeamMemberInfoUpdated
群组成员信息变更
Definition: v2_nim_def_callback.hpp:166
nstd::function< void(V2NIMTeam team)> onTeamCreated
群组创建
Definition: v2_nim_def_callback.hpp:150
nstd::function< void(V2NIMTeamJoinActionInfo joinActionInfo)> onReceiveTeamJoinActionInfo
收到入群信息
Definition: v2_nim_def_callback.hpp:168
nstd::function< void(nstd::vector< V2NIMTeamMember > teamMembers)> onTeamMemberJoined
群组成员加入
Definition: v2_nim_def_callback.hpp:160
nstd::function< void(nstd::vector< V2NIMTeamMember > teamMembers)> onTeamMemberLeft
群组成员退出群组
Definition: v2_nim_def_callback.hpp:164
nstd::function< void(const V2NIMTeam &team)> onTeamDismissed
群组解散
Definition: v2_nim_def_callback.hpp:152
nstd::function< void(V2NIMError error)> onSyncFailed
群组信息同步失败
Definition: v2_nim_def_callback.hpp:148
nstd::function< void()> onSyncFinished
群组信息同步完成
Definition: v2_nim_def_callback.hpp:146
Definition: v2_nim_def_struct.hpp:1522
Definition: v2_nim_def_callback.hpp:180
nstd::function< void(nstd::vector< V2NIMUser > users)> onUserProfileChanged
用户资料变更
Definition: v2_nim_def_callback.hpp:182
nstd::function< void(nstd::string accountId)> onBlockListRemoved
移除黑名单
Definition: v2_nim_def_callback.hpp:186
nstd::function< void(V2NIMUser user)> onBlockListAdded
添加黑名单
Definition: v2_nim_def_callback.hpp:184