常量定义
CRIMMessageContentType
消息类型
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMMessageContentTypeText | 101 | 文本消息 |
| CRIMMessageContentTypeImage | 102 | 图片消息 |
| CRIMMessageContentTypeAudio | 103 | 语音消息 |
| CRIMMessageContentTypeVideo | 104 | 视频消息 |
| CRIMMessageContentTypeFile | 105 | 文件消息 |
| CRIMMessageContentTypeAt | 106 | @消息 |
| CRIMMessageContentTypeMerge | 107 | 合并消息 |
| CRIMMessageContentTypeCard | 108 | 名片消息 |
| CRIMMessageContentTypeLocation | 109 | 位置消息 |
| CRIMMessageContentTypeCustom | 110 | 自定义消息 |
| CRIMMessageContentTypeTyping | 113 | 正在输入状态 |
| CRIMMessageContentTypeQuote | 114 | 引用消息 |
| CRIMMessageContentTypeFace | 115 | 动图消息 |
| CRIMMessageContentTypeAdvancedText | 117 | Advanced消息 |
| CRIMMessageContentTypeCustomMsgNotTriggerConversation | 119 | 后端API会用到 |
| CRIMMessageContentTypeCustomMsgOnlineOnly | 120 | 后端API会用到 |
| CRIMMessageContentTypeFriendAppApproved | 1201 | 同意加好友申请通知 |
| CRIMMessageContentTypeFriendAppRejected | 1202 | 拒绝加好友申请通知 |
| CRIMMessageContentTypeFriendReq | 1203 | 加好友通知 |
| CRIMMessageContentTypeFriendAdded | 1204 | 添加好友通知 |
| CRIMMessageContentTypeFriendDeleted | 1205 | 删除好友通知 |
| CRIMMessageContentTypeFriendRemarkSet | 1206 | 设置好友备注通知 |
| CRIMMessageContentTypeBlackAdded | 1207 | 加黑名单通知 |
| CRIMMessageContentTypeBlackDeleted | 1208 | 移除黑名单通知 |
| CRIMMessageContentTypeConversationOptChange | 1300 | 会话免打扰设置通知 |
| CRIMMessageContentTypeUserInfoUpdated | 1303 | 个人信息变更通知 |
| CRIMMessageContentTypeOANotification | 1400 | oa 通知 |
| CRIMMessageContentTypeGroupCreated | 1501 | 群创建通知 |
| CRIMMessageContentTypeGroupInfoSet | 1502 | 更新群信息通知 |
| CRIMMessageContentTypeJoinGroupReq | 1503 | 申请加群通知 |
| CRIMMessageContentTypeMemberQuit | 1504 | 群成员退出通知 |
| CRIMMessageContentTypeGroupAppAccepted | 1505 | 同意加群申请通知 |
| CRIMMessageContentTypeGroupAppRejected | 1506 | 拒绝加群申请通知 |
| CRIMMessageContentTypeGroupOwnerTransferred | 1507 | 群主更换通知 |
| CRIMMessageContentTypeMemberKicked | 1508 | 群成员被踢通知 |
| CRIMMessageContentTypeMemberInvited | 1509 | 邀请群成员通知 |
| CRIMMessageContentTypeMemberEnter | 1510 | 群成员进群通知 |
| CRIMMessageContentTypeDismissGroup | 1511 | 解散群通知 |
| CRIMMessageContentTypeGroupMemberMutedNotification | 1512 | 群成员禁言通知 |
| CRIMMessageContentTypeGroupMemberCancelMutedNotification | 1513 | 取消群成员禁言通知 |
| CRIMMessageContentTypeGroupMutedNotification | 1514 | 群禁言通知 |
| CRIMMessageContentTypeGroupCancelMutedNotification | 1515 | 取消群禁言通知 |
| CRIMMessageContentTypeGroupMemberInfoSetNotification | 1516 | 设置群成员信息通知 |
| CRIMMessageContentTypeGroupMemberSetToAdminNotification | 1517 | 设置管理员通知 |
| CRIMMessageContentTypeGroupMemberSetToOrdinaryUserNotification | 1518 | 设置成普通成员通知 |
| CRIMMessageContentTypeGroupAnnouncement | 1519 | 群公告 |
| CRIMMessageContentTypeGroupSetNameNotification | 1520 | 修改群名称 |
| CRIMMessageContentTypeIsPrivateMessage | 1701 | 阅后即焚通知 |
| CRIMMessageContentTypeBusiness | 2001 | 业务通知 |
| CRIMMessageContentTypeRevoke | 2101 | 撤回消息 |
| CRIMMessageContentTypeHasReadReceipt | 2150 | 单聊已读回执 |
| CRIMMessageContentTypeGroupHasReadReceipt | 2155 | 群已读回执 |
CRIMMessageStatus
消息状态
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMMessageStatusUndefine | 0 | 为定义 |
| CRIMMessageStatusSending | 1 | 发送中 |
| CRIMMessageStatusSendSuccess | 2 | 发送成功 |
| CRIMMessageStatusSendFailure | 3 | 发送失败 |
| CRIMMessageStatusDeleted | 4 | 已删除 |
| CRIMMessageStatusRevoke | 5 | 已撤回,客户端不用关心 |
CRIMConversationType
会话类型
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMConversationTypeUndefine | 0 | 未定义 |
| CRIMConversationType1v1 | 1 | 单聊 |
| CRIMConversationTypeGroup | 3 | 群聊 |
| CRIMConversationTypeNotification | 4 | 通知 |
CRIMMessageLevel
标识消息级别
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMMessageLevelUser | 100 | 用户 |
| CRIMMessageLevelSystem | 200 | 系统 |
CRIMReceiveMessageOpt
消息接收选项
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMReceiveMessageOptReceive | 0 | 在线正常接收消息,离线时会进行 APNs 推送 |
| CRIMReceiveMessageOptNotReceive | 1 | 不会接收到消息,离线不会有推送通知 |
| CRIMReceiveMessageOptNotNotify | 2 | 在线正常接收消息,离线不会有推送通知 |
CRIMGroupMemberFilter
群成员查询
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGroupMemberFilterAll | 0 | 所有成员 |
| CRIMGroupMemberFilterOwner | 1 | 群主 |
| CRIMGroupMemberFilterAdmin | 2 | 群管理员 |
| CRIMGroupMemberFilterMember | 3 | 群成员 |
| CRIMGroupMemberFilterAdminAndMember | 4 | 管理员和成员 |
| CRIMGroupMemberFilterSuperAndAdmin | 5 | 群主和管理员 |
CRIMGroupMemberRole
群成员角色
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGroupMemberRoleOwner | 100 | 群主 |
| CRIMGroupMemberRoleAdmin | 60 | 群管理员 |
| CRIMGroupMemberRoleMember | 20 | 群成员 |
CRIMGender
性别类型
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGenderMale | 1 | 男性 |
| CRIMGenderFemale | 2 | 女性 |
CRIMApplicationStatus
申请消息状态
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMApplicationStatusDecline | -1 | 已拒绝 |
| CRIMApplicationStatusNormal | 0 | 等待处理 |
| CRIMApplicationStatusAccept | 1 | 已同意 |
CRIMRelationship
用户关系
| 代码 | 数值 | 含义 |
|---|---|---|
| | CRIMRelationshipBlack | 0 | 黑名单 |
| | CRIMRelationshipFriend | 1 | 好友 |
CRIMGroupAtType
强提醒类型
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGroupAtTypeAtNormal | 0 | 无 |
| CRIMGroupAtTypeAtMe | 1 | @我 |
| CRIMGroupAtTypeAtAll | 2 | @所有 |
| CRIMGroupAtTypeAtAllAtMe | 3 | @所有&@我 |
| CRIMGroupAtTypeGroupNotification | 4 | 群通知 |
CRIMGroupVerificationType
进群验证设置选项
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGroupVerificationTypeApplyNeedVerificationInviteDirectly | 0 | 申请入群需审批,邀请可直接入群 |
| CRIMGroupVerificationTypeAllNeedVerification | 1 | 申请入群和群成员邀请需审批,群主或管理员邀请可直接入群 |
| CRIMGroupVerificationTypeDirectly | 2 | 直接入群 |
CRIMGroupStatus
群状态
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGroupStatusOk | 0 | 正常 |
| CRIMGroupStatusBanChat | 1 | 被封 |
| CRIMGroupStatusDismissed | 2 | 解散 |
| CRIMGroupStatusMuted | 3 | 禁言 |
CRIMJoinType
入群方式
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMJoinTypeInvited | 2 | 通过邀请 |
| CRIMJoinTypeSearch | 3 | 通过搜索 |
| CRIMJoinTypeQRCode | 4 | 通过二维码 |
错误码
| 错误码 | 描述 |
|---|---|
| 10000 | 网络请求错误 |
| 10001 | 网络等待超时错误 |
| 10002 | 参数错误 |
| 10003 | 超时错误 |
| 10004 | 资源未加载完毕 |
| 10005 | 未知错误 |
| 10006 | SDK 内部错误 |
| 10100 | 用户不存在 |
| 10101 | 用户已退出登录 |
| 10102 | 重复登录 |
| 10200 | 上传的文件不存在 |
| 10201 | 消息解压失败 |
| 10202 | 消息解码失败 |
| 10203 | 不支持的长连接协议 |
| 10204 | 消息重复发送 |
| 10205 | 消息类型不支持 |
| 10301 | 不支持的会话操作 |
| 10400 | 群组ID不存在 |
| 10401 | 群组类型错误 |
CRIMAllowType
是否允许
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMAllowTypeAllowed | 0 | 允许 |
| CRIMAllowTypeNotAllowed | 1 | 不允许 |
CRIMLoginStatus
登录状态
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMLoginStatusLogout | 1 | 未登录 |
| CRIMLoginStatusLogging | 2 | 登录中 |
| CRIMLoginStatusLogged | 3 | 已登录 |
CRIMGetHistoryViewType
历史消息操作类型
| 代码 | 数值 | 含义 |
|---|---|---|
| CRIMGetHistoryViewTypeHistory | 0 | 拉取历史消息 |
| CRIMGetHistoryViewTypeSearch | 1 | 搜索历史消息 |