NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_chatroom_def.h 文件参考

聊天室 接口相关的常量函数等定义头文件 更多...

#include "public_defines.h"

浏览源代码.

struct  _tagNIMChatRoomLocation
 
struct  _tagNIMChatRoomUpdateTagsInfo
 

宏定义

#define EmptyNIMChatRoomConfigGetter   ("")
 

类型定义

typedef struct _tagNIMChatRoomLocation NIMChatRoomLocation
 
typedef struct _tagNIMChatRoomUpdateTagsInfo NIMChatRoomUpdateTagsInfo
 
typedef void(* nim_chatroom_enter_cb_func) (int64_t room_id, int enter_step, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_exit_cb_func) (int64_t room_id, int error_code, int exit_type, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_link_condition_cb_func) (int64_t room_id, int condition, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_sendmsg_arc_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_receive_msg_cb_func) (int64_t room_id, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_receive_notification_cb_func) (int64_t room_id, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_get_members_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_get_msg_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_set_member_attribute_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_get_info_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_kick_member_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_temp_mute_member_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_query_members_count_by_tag_cb_func) (int64_t room_id, int error_code, uint64_t count, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_temp_mute_member_by_tag_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_update_room_info_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_update_my_role_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_queue_offer_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_queue_poll_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_queue_list_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_queue_header_cb_func) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_queue_drop_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_queue_init_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_query_robots_cb_func) (int rescode, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_batch_update_cb) (int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_update_location_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_custom_token_cb_func) (char *auth_token, const uint32_t length, const char *json_params, const void *user_data)
 
typedef void(* nim_chatroom_request_login_token_cb_func) (const char *app_key, const char *account, char *token, const uint32_t length, const char *json_params, const void *user_data)
 
typedef void(* nim_chatroom_request_login_extension_cb_func) (const char *app_key, const char *account, char *login_extension, const uint32_t length, const char *json_params, const void *user_data)
 
typedef void(* nim_chatroom_tags_changed_cb_func) (int64_t room_id, const char *new_tags, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_update_tags_cb_func) (int64_t room_id, int error_code, const char *json_extension, const void *user_data)
 
typedef void(* nim_chatroom_sdk_log_cb_func) (const char *log_content, const void *user_data)
 
typedef const char * NIMChatRoomConfigGetter
 

枚举

enum  NIMSDKLogLevel {
  kNIMSDKLogLevelFatal = 1 , kNIMSDKLogLevelError = 2 , kNIMSDKLogLevelWarn = 3 , kNIMSDKLogLevelApp = 5 ,
  kNIMSDKLogLevelPro = 6
}
 
enum  NIMChatRoomMsgType {
  kNIMChatRoomMsgTypeText = 0 , kNIMChatRoomMsgTypeImage = 1 , kNIMChatRoomMsgTypeAudio = 2 , kNIMChatRoomMsgTypeVideo = 3 ,
  kNIMChatRoomMsgTypeLocation = 4 , kNIMChatRoomMsgTypeNotification = 5 , kNIMChatRoomMsgTypeFile = 6 , kNIMChatRoomMsgTypeRobot = 11 ,
  kNIMChatRoomMsgTypeTips = 10 , kNIMChatRoomMsgTypeCustom = 100 , kNIMChatRoomMsgTypeUnknown = 1000
}
 
enum  NIMChatRoomClientType {
  kNIMChatRoomClientTypeDefault = 0 , kNIMChatRoomClientTypeAndroid = 1 , kNIMChatRoomClientTypeiOS = 2 , kNIMChatRoomClientTypePCWindows = 4 ,
  kNIMChatRoomClientTypeWindowsPhone = 8 , kNIMChatRoomClientTypeWeb = 16 , kNIMChatRoomClientTypeRestAPI = 32 , kNIMChatRoomClientTypeMacOS = 64 ,
  kNIMChatRoomClientTypeHarmonyOS = 128
}
 
enum  NIMChatRoomExitReason {
  kNIMChatRoomExitReasonExit = 0 , kNIMChatRoomExitReasonRoomInvalid = 1 , kNIMChatRoomExitReasonKickByManager = 2 , kNIMChatRoomExitReasonKickByMultiSpot = 3 ,
  kNIMChatRoomExitReasonIllegalState = 4 , kNIMChatRoomExitReasonBeBlacklisted = 5
}
 
enum  NIMChatRoomLoginState { kNIMChatRoomLoginStateLogin = 1 , kNIMChatRoomLoginStateUnLogin = 2 }
 
enum  NIMChatRoomOnlineState { kNIMChatRoomOnlineStateOffline = 0 , kNIMChatRoomOnlineStateOnline = 1 }
 
enum  NIMChatRoomGuestFlag { kNIMChatRoomGuestFlagNoGuest = 0 , kNIMChatRoomGuestFlagGuest = 1 }
 
enum  NIMChatRoomGetMemberType { kNIMChatRoomGetMemberTypeSolid = 0 , kNIMChatRoomGetMemberTypeTemp = 1 , kNIMChatRoomGetMemberTypeSolidOL = 2 , kNIMChatRoomGetMemberTypeTempOL = 3 }
 
enum  NIMChatRoomMemberAttribute { kNIMChatRoomMemberAttributeAdminister = 1 , kNIMChatRoomMemberAttributeNomalMember = 2 , kNIMChatRoomMemberAttributeBlackList = -1 , kNIMChatRoomMemberAttributeMuteList = -2 }
 
enum  NIMChatRoomNotificationId {
  kNIMChatRoomNotificationIdMemberIn = 301 , kNIMChatRoomNotificationIdMemberExit = 302 , kNIMChatRoomNotificationIdAddBlack = 303 , kNIMChatRoomNotificationIdRemoveBlack = 304 ,
  kNIMChatRoomNotificationIdAddMute = 305 , kNIMChatRoomNotificationIdRemoveMute = 306 , kNIMChatRoomNotificationIdAddManager = 307 , kNIMChatRoomNotificationIdRemoveManager = 308 ,
  kNIMChatRoomNotificationIdAddFixed = 309 , kNIMChatRoomNotificationIdRemoveFixed = 310 , kNIMChatRoomNotificationIdClosed = 311 , kNIMChatRoomNotificationIdInfoUpdated = 312 ,
  kNIMChatRoomNotificationIdMemberKicked = 313 , kNIMChatRoomNotificationIdMemberTempMute = 314 , kNIMChatRoomNotificationIdMemberTempUnMute = 315 , kNIMChatRoomNotificationIdMyRoleUpdated = 316 ,
  kNIMChatRoomNotificationIdQueueChanged = 317 , kNIMChatRoomNotificationIdRoomMuted = 318 , kNIMChatRoomNotificationIdRoomDeMuted = 319 , kNIMChatRoomNotificationIdQueueBatchChanged = 320 ,
  kNIMChatRoomNotificationIdTagTempMuteAdd = 321 , kNIMChatRoomNotificationIdTagTempMuteRemove = 322 , kNIMChatRoomNotificationIdRecallMessage = 323 , kNIMChatRoomNotificationIdQueueBatchOffer = 324 ,
  kNIMChatRoomNotificationIdMemberTagChanged = 325
}
 
enum  NIMChatRoomLinkCondition { kNIMChatRoomLinkConditionAlive = 0 , kNIMChatRoomLinkConditionDeadAndRetry = 1 , kNIMChatRoomLinkConditionDead = 2 }
 
enum  NIMChatRoomEnterStep {
  kNIMChatRoomEnterStepInit = 1 , kNIMChatRoomEnterStepServerConnecting = 2 , kNIMChatRoomEnterStepServerConnectOver = 3 , kNIMChatRoomEnterStepRoomAuthing = 4 ,
  kNIMChatRoomEnterStepRoomAuthOver = 5
}
 
enum  NIMChatRoomProxyType {
  kNIMChatRoomProxyNone = 0 , kNIMChatRoomProxyHttp11 = 1 , kNIMChatRoomProxySocks4 = 4 , kNIMChatRoomProxySocks4a = 5 ,
  kNIMChatRoomProxySocks5 = 6
}
 

变量

进入聊天室的可选填信息Json Keys
static const char * kNIMChatRoomEnterKeyNick = "nick"
 string, (匿名登录时必填)进入聊天室后展示的昵称,选填,聊天室成员收到聊天室进入通知中可以获取该数据
 
static const char * kNIMChatRoomEnterKeyAvatar = "avatar"
 string, (匿名登录时必填)设置后通过获取聊天室成员信息接口可以获取该数据
 
static const char * kNIMChatRoomEnterKeyExt = "ext"
 string, 聊天室可用的扩展字段,必须为可以解析为Json的非格式化的字符串,选填,设置后通过获取聊天室成员信息接口可以获取该数据
 
static const char * kNIMChatRoomEnterKeyNotifyExt = "notify_ext"
 string, 进入聊天室通知开发者扩展字段,必须为可以解析为Json的非格式化的字符串,选填,聊天室成员收到聊天室进入通知中可以获取该数据
 
static const char * kNIMChatRoomEnterLoginTags = "login_tags"
 string array 登录标签,可以设置多个,json array 格式,例子:["tag1", "tag2"]
 
static const char * kNIMChatRoomEnterNotifyTags = "notify_tags"
 string 登录登出通知的目标标签
 
static const char * kNIMChatRoomEnterAuthType = "auth_type"
 int 鉴权方式,0表示最初的loginToken的校验方式,1表示基于appSecret计算的token鉴权方式,2表示基于第三方回调的token鉴权方式,默认0
 
static const char * kNIMChatRoomEnterLoginExt = "login_ext"
 string, 登录自定义字段,用于提交给用户的第三方回调服务进行登录检测,不会同步给其他端
 
static const char * kNIMChatRoomEnterAntiSpamBusinessID = "anti_spam_business_id"
 string, 反垃圾相关业务id
 
static const char * kNIMChatRoomEnterEnableLocation = "enable_location"
 int 登录时使用的位置信息
 
static const char * kNIMChatRoomEnterLocationX = "location_x"
 
static const char * kNIMChatRoomEnterLocationY = "location_y"
 
static const char * kNIMChatRoomEnterLocationZ = "location_z"
 
static const char * kNIMChatRoomEnterLocationDistance = "location_distance"
 
独立聊天室进入的信息Json Keys
static const char * kNIMChatRoomEnterKeyAppKey = "app_key"
 string, 应用appkey,匿名登录时必填
 
static const char * kNIMChatRoomEnterKeyAppDataPath = "app_data_path"
 
static const char * kNIMChatRoomEnterKeyLogLevel = "log_level"
 int,匿名登录时选填,定义见NIMSDKLogLevel(选填,SDK默认的内置级别为kNIMSDKLogLevelPro)
 
static const char * kNIMChatRoomEnterKeyAddress = "address"
 string array,聊天室地址,地址通过应用服务器接口获取
 
static const char * kNIMChatRoomEnterKeyRandomID = "random_id"
 int,是否开启随机ID模式,默认为关闭(0),建议默认值
 
static const char * kNIMChatRoomEnterKeyAccID = "accid"
 string,登录聊天室的账号非匿名模式下使用
 
static const char * kNIMChatRoomEnterKeyToken = "token"
 string,登录聊天室的密码非匿名模式下使用
 
消息结构 Json Keys
static const char * kNIMChatRoomMsgKeyType = "msg_type"
 int, 消息类型(NIMChatRoomMsgType)
 
static const char * kNIMChatRoomMsgKeyAttach = "msg_attach"
 string, 消息内容,长度限制2048, 如果约定的是json字符串,必须为可以解析为json的非格式化的字符串
 
static const char * kNIMChatRoomMsgKeyClientMsgid = "client_msg_id"
 string,客户端消息id
 
static const char * kNIMChatRoomMsgKeyResendFlag = "resend_flag"
 int,消息重发标记位,第一次发送0,重发1
 
static const char * kNIMChatRoomMsgKeyExt = "ext"
 string, 第三方扩展字段, 长度限制4096, 必须为可以解析为Json的非格式化的字符串
 
static const char * kNIMChatRoomMsgKeyAntiSpamEnable = "anti_spam_enable"
 int, 是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0
 
static const char * kNIMChatRoomMsgKeyAntiSpamContent = "anti_spam_content"
 string, (可选)开发者自定义的反垃圾字段, 长度限制2048
 
static const char * kNIMChatRoomMsgKeyAntiSpamBizId = "anti_spam_business_id"
 string, (可选)用户配置的对某些单条消息另外的反垃圾的业务ID
 
static const char * kNIMChatRoomMsgKeyHistorySave = "history_save"
 int,(可选)该消息是否存储云端历史,可选,0:不是,1:是, 默认1
 
static const char * kNIMChatRoomMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun"
 int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾
 
static const char * kNIMChatRoomMsgKeyBody = "body"
 string,(可选)文本消息内容(聊天室机器人文本消息)
 
static const char * kNIMChatRoomMsgKeyThirdPartyCBEXT = "third_party_callback_ext"
 (可选)string第三方回调回来的自定义扩展字段 v7.8 新增
 
static const char * kNIMChatRoomMsgKeySubType = "msg_sub_type"
 (可选)int,消息的子类型,客户端定义,服务器透传
 
static const char * kNIMChatRoomMsgKeyYiDunAntiCheating = "yidun_anti_cheating"
 (可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024
 
static const char * kNIMChatRoomMsgKeyEnvConfig = "env_config"
 (可选)String, 自定义抄送配置 v8.0.0 新增
 
static const char * kNIMChatRoomMsgKeyNotifyTags = "notify_tags"
 (可选)String 消息的目标标签表达式,参见TagPattern和TagCalculator v8.4.0 新增
 
static const char * kNIMChatRoomMsgKeyAntiSpamExt = "anti_spam_ext"
 (可选)String, 易盾反垃圾扩展字段,限制json,长度限制1024
 
static const char * kNIMChatRoomMsgKeyAntiSpamRes = "anti_spam_res"
 String, 易盾反垃圾返回的结果字段
 
static const char * kNIMChatRoomMsgKeyLocationX = "location_x"
 (可选)int, 位置信息 X 轴坐标
 
static const char * kNIMChatRoomMsgKeyLocationY = "location_y"
 (可选)int, 位置信息 Y 轴坐标
 
static const char * kNIMChatRoomMsgKeyLocationZ = "location_z"
 (可选)int, 位置信息 Z 轴坐标
 
static const char * kNIMChatRoomMsgKeyToAccids = "to_accids"
 (可选)string, json array,消息接受者,如果设置了本字段,且不为空,则本消息为聊天室定向消息(聊天室定向消息不会存历史)
 
static const char * kNIMChatRoomMsgNeedHighPriorityAck = "need_high_priority_ack"
 (可选)int, 高优消息是否需要ack,0:不需要,1:需要。默认为0
 
static const char * kNIMChatRoomMsgKeyRoomID = "room_id"
 long, 消息所属的聊天室id,服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyFromAccount = "from_id"
 string, 消息发送者的账号,服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyTime = "time"
 long, 消息发送的时间戳(毫秒),服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyFromClientType = "from_client_type"
 int,消息发送方客户端类型(NIMChatRoomClientType),服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyFromNick = "from_nick"
 string, 消息发送方昵称,服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyFromAvatar = "from_avator"
 string, 消息发送方头像,服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyFromExt = "from_ext"
 string, 消息发送方身份扩展字段,服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyHighPriorityFlag = "high_priority_flag"
 int, 高优先级消息标记,1:是; 非高优先级消息不带该字段,服务器填写,发送方不需要填写
 
static const char * kNIMChatRoomMsgKeyLocalFilePath = "local_res_path"
 string, 暂时不用,多媒体消息资源本地绝对路径,SDK本地维护,发送多媒体消息时必填
 
static const char * kNIMChatRoomMsgKeyLocalResId = "res_id"
 string, 暂时不用,多媒体资源id,发送方选填,接收方收到的是客户端消息id
 
static const int iNIMMaxBatchQueue = 100
 int 聊天室更新的批量最大数
 
进入聊天室回调结果Json Keys
static const char * kNIMChatRoomEnterCallbackKeyRoomInfo = "room_info"
 json value, 见聊天室Info Json Keys
 
static const char * kNIMChatRoomEnterCallbackKeyMyInfo = "my_info"
 json value, 见聊天室个人Info Json Keys
 
聊天室Info Json Keys
static const char * kNIMChatRoomInfoKeyID = "id"
 long, 聊天室ID
 
static const char * kNIMChatRoomInfoKeyName = "name"
 string, 聊天室名称
 
static const char * kNIMChatRoomInfoKeyAnnouncement = "announcement"
 string, 聊天室公告
 
static const char * kNIMChatRoomInfoKeyBroadcastUrl = "broadcast_url"
 string, 视频直播拉流地址
 
static const char * kNIMChatRoomInfoKeyCreatorID = "creator_id"
 string, 聊天室创建者账号
 
static const char * kNIMChatRoomInfoKeyValidFlag = "valid_flag"
 int, 聊天室有效标记, 1:有效,0:无效
 
static const char * kNIMChatRoomInfoKeyExt = "ext"
 string, 第三方扩展字段, 必须为可以解析为Json的非格式化的字符串, 长度4k
 
static const char * kNIMChatRoomInfoKeyOnlineCount = "online_count"
 int, 当前在线用户数量
 
static const char * kNIMChatRoomInfoKeyMuteAll = "mute_all"
 int, 聊天室禁言标志 1:禁言,0:解除禁言
 
static const char * kNIMChatRoomInfoKeyQueuelevel = "queuelevel"
 int, 队列管理权限:0:所有人都有权限变更队列,1:只有主播管理员才能操作变更
 
聊天室个人Info Json Keys
static const char * kNIMChatRoomMemberInfoKeyRoomID = "room_id"
 long 聊天室id
 
static const char * kNIMChatRoomMemberInfoKeyAccID = "account_id"
 string 成员账号
 
static const char * kNIMChatRoomMemberInfoKeyType = "type"
 成员类型, -1:受限用户; 0:普通;1:创建者;2:管理员;3:临时用户,非固定成员;4:匿名非注册用户,非云信注册用户
 
static const char * kNIMChatRoomMemberInfoKeyLevel = "level"
 int 成员级别: >=0表示用户开发者可以自定义的级别
 
static const char * kNIMChatRoomMemberInfoKeyNick = "nick"
 string 聊天室内的昵称字段,预留字段, 可从Uinfo中取
 
static const char * kNIMChatRoomMemberInfoKeyAvatar = "avatar"
 string 聊天室内的头像,预留字段, 可从Uinfo中取icon
 
static const char * kNIMChatRoomMemberInfoKeyExt = "ext"
 string 开发者扩展字段, 长度限制2k, 必须为可以解析为Json的非格式化的字符串
 
static const char * kNIMChatRoomMemberInfoKeyTag = "tags"
 string 聊天室成员所属的 tag 信息
 
static const char * kNIMChatRoomMemberInfoKeyNotifyTags = "notify_tags"
 string 聊天室成员登录时指定的 notify_tags 信息
 
static const char * kNIMChatRoomMemberInfoKeyOnlineState = "online_state"
 NIMChatRoomOnlineState 成员是否处于在线状态, 仅特殊成员才可能离线, 对游客/匿名用户而言只能是在线
 
static const char * kNIMChatRoomMemberInfoKeyGuestFlag = "guest_flag"
 NIMChatRoomGuestFlag 是否是普通游客类型,0:不是游客,1:是游客; 游客身份在聊天室中没有持久化, 只有在线时才会有内存状态
 
static const char * kNIMChatRoomMemberInfoKeyEnterTimetag = "enter_timetag"
 long 进入聊天室的时间点,对于离线成员该字段为空
 
static const char * kNIMChatRoomMemberInfoKeyBlacklist = "is_blacklist"
 int 是黑名单
 
static const char * kNIMChatRoomMemberInfoKeyMuted = "is_muted"
 int 是禁言用户
 
static const char * kNIMChatRoomMemberInfoKeyValid = "valid"
 int 记录有效标记位
 
static const char * kNIMChatRoomMemberInfoKeyUpdateTimetag = "update_timetag"
 long 固定成员的记录更新时间,用于固定成员列表的排列查询
 
static const char * kNIMChatRoomMemberInfoKeyTempMute = "temp_mute"
 int 临时禁言
 
static const char * kNIMChatRoomMemberInfoKeyTempMuteRestDuration = "temp_mute_rest_duration"
 long 临时禁言的解除时长,单位秒
 
static const char * kNIMChatRoomAntiSpamBusinessID = "anti_spam_business_id"
 string 反垃圾
 
static const char * kNIMChatRoomMsgKeyStatistics = "statistics"
 string, kNIMChatRoomMsgKeyStatistics
 
static const char * kNIMChatRoomMsgKeyAPICallingTime = "apiCallingTime"
 uint64, api calling time
 
static const char * kNIMChatRoomMsgKeyAttachUploadDuration = "attachUploadDuration"
 uint64_t, attach_upload_duration
 
static const char * kNIMChatRoomMsgKeySendTime = "sendTime"
 uint64_t, send_time
 
更新我的信息扩展字段 Json Keys
static const char * kNIMChatRoomUpdateMyRoleExtNeedSave = "need_save"
 bool 我的资料是否需要持久化保存,默认false
 
分页获取成员列表条件Keys
static const char * kNIMChatRoomGetMembersKeyType = "type"
 NIMChatRoomGetMemberType 成员类型
 
static const char * kNIMChatRoomGetMembersKeyTag = "tag"
 获取成员时指定的 tag
 
static const char * kNIMChatRoomGetMembersKeyOffset = "offset"
 long 时间戳,填0会使用当前服务器最新时间开始查询,即第一页
 
static const char * kNIMChatRoomGetMembersKeyLimit = "limit"
 int 数量
 
分获取历史消息条件Keys
static const char * kNIMChatRoomGetMsgHistoryKeyTags = "tags"
 array 查询历史消息指定的 tags
 
static const char * kNIMChatRoomGetMsgHistoryKeyStartTime = "start"
 long 开始时间,单位毫秒
 
static const char * kNIMChatRoomGetMsgHistoryKeyEndTime = "end"
 long 结束时间,单位毫秒
 
static const char * kNIMChatRoomGetMsgHistoryKeyLimit = "limit"
 int 本次返回的消息数量
 
static const char * kNIMChatRoomGetMsgHistoryKeyReverse = "reverse"
 boolean: true:按时间正序起查,正序排列,false:按时间逆序起查,逆序排列
 
static const char * kNIMChatRoomGetMsgHistoryKeyMsgtypes = "msgtypes"
 array:数组 要查询的消息类型,取值NIMChatRoomMsgType中所枚举类型
 
设定聊天室成员标记身份条件Keys
static const char * kNIMChatRoomSetMemberAttributeKeyAccoutID = "account_id"
 string 成员ID
 
static const char * kNIMChatRoomSetMemberAttributeKeyAttribute = "attribute"
 NIMChatRoomMemberAttribute
 
static const char * kNIMChatRoomSetMemberAttributeKeyOpt = "opt"
 boolean: true:是,false:否
 
static const char * kNIMChatRoomSetMemberAttributeKeyNotifyExt = "notify_ext"
 string 自定义的事件通知扩展字段, 必须为可以解析为Json的非格式化的字符串
 
聊天室通知Keys
static const char * kChatRoomNotificationKeyData = "data"
 string 通知内容
 
static const char * kChatRoomNotificationKeyID = "id"
 string 通知类型ID
 
static const char * kChatRoomNotificationDataKeyExt = "ext"
 string 上层开发自定义的事件通知扩展字段, 必须为可以解析为Json的非格式化的字符串
 
static const char * kChatRoomNotificationDataKeyOpt = "operator"
 string 操作者的账号accid
 
static const char * kChatRoomNotificationDataKeyOptNick = "opeNick"
 string 操作者的账号nick
 
static const char * kChatRoomNotificationDataKeyTargetNick = "tarNick"
 string json array 被操作者的nick列表
 
static const char * kChatRoomNotificationDataKeyTarget = "target"
 string json array 被操作者的accid
 
static const char * kChatRoomNotificationDataKeyTempMuteDuration = "muteDuration"
 long 当通知为临时禁言相关时有该值,禁言时kNIMChatRoomNotificationIdMemberTempMute代表本次禁言的时长(秒)
 
static const char * kChatRoomNotificationDataKeyMuteFlag = "muted"
 int 当通知为 kNIMChatRoomNotificationIdMemberIn才有,代表是否禁言状态,1:是 缺省或0:不是
 
static const char * kChatRoomNotificationDataKeyTempMutedFlag = "tempMuted"
 int 当通知为 kNIMChatRoomNotificationIdMemberIn才有,代表是否临时禁言状态,1:是 缺省或0:不是
 
static const char * kChatRoomNotificationDataKeyMemberInTempMutedDuration = "muteTtl"
 long 当通知为 kNIMChatRoomNotificationIdMemberIn,代表临时禁言时长(秒), 其他通知事件不带该数据
 
static const char * kChatRoomNotificationDataKeyQueueChange = "queueChange"
 string 当通知为 kNIMChatRoomNotificationIdQueueChange,代表队列变更具体内容,内容解析 参考麦序队列变更通知扩展字段queueChange
 
static const char * kChatRoomNotificationDataKeyTargetTag = "targetTag"
 string 当通知为 kChatRoomNotificationIdTagTempMuteAdd 或 kChatRoomNotificationIdTagTempMuteRemove,代表被禁言的目标 tag
 
static const char * kChatRoomNotificationDataKeyMsgTimetag = "msgTime"
 int64_t 当通知为 kNIMChatRoomNotificationIdRecallMessage,代表被撤回消息的消息时间戳
 
static const char * kChatRoomNotificationDataKeyMsgId = "msgId"
 string 当通知为 kNIMChatRoomNotificationIdRecallMessage,代表被撤回消息的消息 ID
 
static const char * kChatRoomNotificationDataKeyTags = "tags"
 string 当通知为 kNIMChatRoomNotificationIdMemberTagChanged 时,代表变更后的 tags 信息
 
聊天室麦序队列元素Keys
static const char * kNIMChatRoomQueueElementKey = "key"
 string 元素key
 
static const char * kNIMChatRoomQueueElementValue = "value"
 string 元素value
 
聊天室添加、更新队列元素选项
static const char * kNIMChatRoomQueueOfferOptionTransient = "transient"
 bool (可选参数)true 表示当提交这个新元素的用户从聊天室掉线或退出的时候,需要删除这个元素;默认 false 表示不删除
 
static const char * kNIMChatRoomQueueOfferOptionElementAccId = "element_accid"
 string (可选参数)队列元素所属账号,默认不传表示队列元素属于当前操作人,管理员可以指定队列元素归属于其他合法账号
 
麦序队列变更通知扩展字段type取值
static const char * kNIMChatRoomNotificationQueueChangedType_OFFER = "OFFER"
 放元素到新队列
 
static const char * kNIMChatRoomNotificationQueueChangedType_POLL = "POLL"
 从队列中取出新队列
 
static const char * kNIMChatRoomNotificationQueueChangedType_DROP = "DROP"
 清理队列操作
 
static const char * kNIMChatRoomNotificationQueueChangedType_PARTCLEAR = "PARTCLEAR"
 部分清理操作(发生在提交元素的用户掉线时,清理这个用户对应的key
 
聊天室通知 麦序队列变更通知扩展字段queueChange keys
static const char * kNIMChatRoomNotificationQueueChangedKeyType = "_e"
 string 变更类型,目前有OFFER,POLL,DROP,BATCH_UPDATE 类型
 
static const char * kNIMChatRoomNotificationQueueChangedKeyKey = "key"
 string 变更元素的key
 
static const char * kNIMChatRoomNotificationQueueChangedKeyValue = "content"
 string 变更元素的内容
 
聊天室通知 麦序队列中有批量变更通知扩展字段queueBatchChange keys

@ 当type为"PARTCLEAR"时,一般情况下只会有_e和kvObject字段,不会有key和content字段

static const char * kNIMChatRoomNotificationQueueBatchChangedKeyType = "_e"
 string 变更类型,目前有OFFER,POLL,DROP,PARTCLEAR四个类型
 
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyKey = "key"
 string 变更元素的key
 
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyValue = "content"
 string 变更元素的内容
 
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyObject = "kvObject"
 map 变更元素的内容
 
机器人信息 Json Keys

例子 { "accid" : "", "create_timetag" : 1430101821372, "icon" : "", "intro":"", "name" : "", "update_timetag" : 1430101821372, "rid":"" }

static const char * kNIMRobotInfoKeyAccid = "accid"
 string 帐号
 
static const char * kNIMRobotInfoKeyName = "name"
 string 名字
 
static const char * kNIMRobotInfoKeyIcon = "icon"
 string 头像
 
static const char * kNIMRobotInfoKeyIntro = "intro"
 string 介绍
 
static const char * kNIMRobotInfoKeyRobotId = "rid"
 string 机器人ID
 
static const char * kNIMRobotInfoKeyCreateTime = "create_timetag"
 long 创建时间戳 毫秒
 
static const char * kNIMRobotInfoKeyUpdateTime = "update_timetag"
 long 更新时间戳 毫秒
 
公共配置 Json Keys
static const char * kEnterKeyPublicConfigRoot = "public_config"
 json obj 公共配置root key
 
static const char * kEnterKeyDedicatedClusteFlag = "dedicated_cluste_flag"
 int 是否为专属集群 1:是 0: 否
 
static const char * kEnterKeyNegoKeyNECA = "nego_key_neca"
 int "交换密钥"协议加密算法 {1(RSA),2(SM2)}, def:1(RSA) 非对称加密
 
static const char * kEnterKeyCommNECA = "comm_enca"
 int 通信加密算法 {1(RC4),2(AES128),4(SM4)} def:1(RC4) 对称加密
 
static const char * kEnterKeyHandShakeType = "hand_shake_type"
 int 登录时使用的握手协议类型 0:支持配置多种对称与非对称加密算法,1:只支持RAS + RC4,缺省 0
 
私有化配置 Json Keys
static const char * kEnterKeyPrivateConfigRoot = "private_config"
 json obj 私有配置root key
 
static const char * kEnterKeyNegoKeyNECAKeyPA = "nego_key_enca_key_parta"
 string "交换密钥"协议加密算法密钥 part A 自定义时则必填 BigNumHex string 不含0x RSA:module,SM2:X
 
static const char * kEnterKeyNegoKeyNECAKeyPB = "nego_key_enca_key_partb"
 string "交换密钥"协议加密算法密钥 part B 自定义时则必填 BigNumHex string 不含0x RSA:EXP,SM2:Y
 
static const char * kEnterKeyNegoKeyNECAKeyV = "nego_key_enca_key_version"
 int 非对称加密算法的 key version 自定义时则必填
 

详细描述

聊天室 接口相关的常量函数等定义头文件

作者
Oleg, Harrison
日期
2015/12/24

宏定义说明

◆ EmptyNIMChatRoomConfigGetter

#define EmptyNIMChatRoomConfigGetter   ("")

类型定义说明

◆ nim_chatroom_batch_update_cb

void(* nim_chatroom_batch_update_cb)(int room_id, const char *result, const char *json_extension, const void *user_data)

批量更新成员列表信息函数

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]result不存在的元素列表 Json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_custom_token_cb_func

void(* nim_chatroom_custom_token_cb_func)(char *&auth_token, uint32_t *length, const char *json_params, const void *user_data)

登录时获取动态token的回调函数,在此回调中填充auth_token

参数
[in]auth_token新的 auth token
[in]lengthtoken缓冲区的长度
[out]json_params输出的json字符串内容
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_enter_cb_func

void(* nim_chatroom_enter_cb_func)(int64_t room_id, int enter_step, int error_code, const char *result, const void *user_data)

进入的回调函数定义

参数
[out]room_id聊天室ID
[out]enter_step进入聊天室的过程(NIMChatRoomEnterStep)
[out]error_code错误码(关注但不仅限200,408,415,10001,13001,13002,13003,如果错误码为10001,聊天室重连机制结束,则需要向IM服务器重新请求进入该聊天室权限)
[out]result聊天室信息
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_exit_cb_func

void(* nim_chatroom_exit_cb_func)(int64_t room_id, int error_code, int exit_type, const char *json_extension, const void *user_data)

退出、被踢的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]exit_type退出原因(ChatRoomExitReason)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_get_info_cb_func

void(* nim_chatroom_get_info_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

获取当前聊天室信息的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultmember info json string , json key定义见 聊天室Info Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_get_members_cb_func

void(* nim_chatroom_get_members_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

获取指定/分页获取成员列表的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson string , json key定义见 聊天室个人Info Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_get_msg_cb_func

void(* nim_chatroom_get_msg_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

获取历史消息的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson string , json key定义见 消息结构 Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_kick_member_cb_func

void(* nim_chatroom_kick_member_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

踢掉指定成员的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_link_condition_cb_func

void(* nim_chatroom_link_condition_cb_func)(int64_t room_id, int condition, const void *user_data)

聊天室链接状况的回调函数定义

参数
[out]room_id聊天室ID
[out]condition网络状况
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_query_members_count_by_tag_cb_func

void(* nim_chatroom_query_members_count_by_tag_cb_func)(int64_t room_id, int error_code, uint64_t count, const char *json_extension, const void *user_data)

查询指定 tag 在聊天室的成员数量回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]count指定 tag 的成员数量
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_query_robots_cb_func

void(* nim_chatroom_query_robots_cb_func)(int rescode, const char *result, const char *json_extension, const void *user_data)

获取机器人信息的函数定义

参数
[out]rescode错误码,200:一切正常
[out]result机器人信息 Json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_queue_drop_cb_func

void(* nim_chatroom_queue_drop_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

删除麦序队列的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_queue_header_cb_func

void(* nim_chatroom_queue_header_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

查看头元素的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson object string (聊天室麦序队列元素Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_queue_init_cb_func

void(* nim_chatroom_queue_init_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

麦序队列初始化的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_queue_list_cb_func

void(* nim_chatroom_queue_list_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

排序列出所有元素的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson array string (聊天室麦序队列元素Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_queue_offer_cb_func

void(* nim_chatroom_queue_offer_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

新加(更新)队列元素的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_queue_poll_cb_func

void(* nim_chatroom_queue_poll_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

取出元素的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson object string (聊天室麦序队列元素Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_receive_msg_cb_func

void(* nim_chatroom_receive_msg_cb_func)(int64_t room_id, const char *result, const char *json_extension, const void *user_data)

接收消息的回调函数定义

参数
[out]room_id聊天室ID
[out]resultjson string, json key定义见 消息结构 Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_receive_notification_cb_func

void(* nim_chatroom_receive_notification_cb_func)(int64_t room_id, const char *result, const char *json_extension, const void *user_data)

聊天室通知的回调函数定义

参数
[out]room_id聊天室ID
[out]resultjson string, json key定义见 聊天室通知Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_request_login_extension_cb_func

void(* nim_chatroom_request_login_extension_cb_func)(const char *app_key, const char *account, char *login_extension, uint32_t *length, const char *json_params, const void *user_data)

登录时获取第三方鉴权扩展信息的回调函数,在此回调中填充

参数
[in]app_keyAPPKEY
[in]account账号
[in]login_extension新的 login extension
[in]length缓冲区的长度
[out]json_params输出的json字符串内容
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_request_login_token_cb_func

void(* nim_chatroom_request_login_token_cb_func)(const char *app_key, const char *account, char *token, uint32_t *length, const char *json_params, const void *user_data) 登录时获取第三方鉴权扩展信息的回调函数,在此回调中填充
参数
[in]app_keyAPPKEY
[in]account账号
[in]token新的 token
[in]length缓冲区的长度
[out]json_params输出的json字符串内容
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_sdk_log_cb_func

void(* nim_chatroom_sdk_log_cb_func)(const char *log_content, const void *user_data)

SDK系统日志回调

参数
[out]log_content日志内容
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_sendmsg_arc_cb_func

void(* nim_chatroom_sendmsg_arc_cb_func)(int64_t room_id, int error_code, const char *result, const void *user_data)

发送消息回执的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码(关注但不仅限200,408,416,13004,13006)
[out]resultjson string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_set_member_attribute_cb_func

void(* nim_chatroom_set_member_attribute_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

设定聊天室成员标记身份的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_tags_changed_cb_func

void(* nim_chatroom_tags_changed_cb_func)(int64_t room_id, const char *new_tags,, const char *json_extension, const void *user_data)

注册聊天室中自己 tags 变更回调

参数
[in]room_id聊天室 ID
[in]new_tags变更后的 tags 信息
[out]json_extensionjson 扩展数据(备用)
[out]user_dataAPP 的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_temp_mute_member_by_tag_cb_func

void(* nim_chatroom_temp_mute_member_by_tag_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

临时禁言指定 tag 下的成员回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultmember info json string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_temp_mute_member_cb_func

void(* nim_chatroom_temp_mute_member_cb_func)(int64_t room_id, int error_code, const char *result, const char *json_extension, const void *user_data)

临时禁言指定成员的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]resultmember info json string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_update_location_cb_func

void(* nim_chatroom_update_location_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

更新聊天室位置信息回调函数

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_update_my_role_cb_func

void(* nim_chatroom_update_my_role_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

更新我的信息的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_update_room_info_cb_func

void(* nim_chatroom_update_room_info_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

更新聊天室信息的回调函数定义

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ nim_chatroom_update_tags_cb_func

void(* nim_chatroom_update_tags_cb_func)(int64_t room_id, int error_code, const char *json_extension, const void *user_data)

更新聊天室标签回调函数

参数
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
返回
void 无返回值

◆ NIMChatRoomConfigGetter

typedef const char* NIMChatRoomConfigGetter

◆ NIMChatRoomLocation

◆ NIMChatRoomUpdateTagsInfo

枚举类型说明

◆ NIMChatRoomClientType

聊天室消息来源端

枚举值
kNIMChatRoomClientTypeDefault 

default,unset

kNIMChatRoomClientTypeAndroid 

android

kNIMChatRoomClientTypeiOS 

iOS

kNIMChatRoomClientTypePCWindows 

PC

kNIMChatRoomClientTypeWindowsPhone 

WindowsPhone

kNIMChatRoomClientTypeWeb 

Web

kNIMChatRoomClientTypeRestAPI 

RestAPI

kNIMChatRoomClientTypeMacOS 

Mac

kNIMChatRoomClientTypeHarmonyOS 

HarmonyOS

◆ NIMChatRoomEnterStep

聊天室进入状态

枚举值
kNIMChatRoomEnterStepInit 

本地服务初始化

kNIMChatRoomEnterStepServerConnecting 

服务器连接中

kNIMChatRoomEnterStepServerConnectOver 

服务器连接结束,连接结果见error_code

kNIMChatRoomEnterStepRoomAuthing 

聊天室鉴权中

kNIMChatRoomEnterStepRoomAuthOver 

聊天室鉴权结束,鉴权结果见error_code, error_code非408则需要开发者重新请求聊天室进入信息

◆ NIMChatRoomExitReason

聊天室离开原因

枚举值
kNIMChatRoomExitReasonExit 

自行退出,重登前需要重新请求进入

kNIMChatRoomExitReasonRoomInvalid 

聊天室已经被解散,重登前需要重新请求进入

kNIMChatRoomExitReasonKickByManager 

被管理员踢出,重登前需要重新请求进入

kNIMChatRoomExitReasonKickByMultiSpot 

多端被踢

kNIMChatRoomExitReasonIllegalState 

当前链接状态异常

kNIMChatRoomExitReasonBeBlacklisted 

被加黑了

◆ NIMChatRoomGetMemberType

查询成员的成员类型

枚举值
kNIMChatRoomGetMemberTypeSolid 

固定成员,固定成员,包括创建者,管理员,普通等级用户,受限用户(禁言+黑名单)即使非在线也可以在列表中看到,有数量限制,查询时时间戳使用"updatetime"

kNIMChatRoomGetMemberTypeTemp 

非固定成员,非固定成员,又称临时成员,只有在线时才能在列表中看到,数量无上限,查询时时间戳使用"进入聊天室时间"

kNIMChatRoomGetMemberTypeSolidOL 

在线固定成员 查询时时间戳使用"updatetime"

kNIMChatRoomGetMemberTypeTempOL 

非固定成员(反向查询) 查询时时间戳使用"进入聊天室时间"

◆ NIMChatRoomGuestFlag

成员类型

枚举值
kNIMChatRoomGuestFlagNoGuest 

非游客

kNIMChatRoomGuestFlagGuest 

游客

◆ NIMChatRoomLinkCondition

聊天室链接情况,一般都是有本地网路情况引起

枚举值
kNIMChatRoomLinkConditionAlive 

链接正常

kNIMChatRoomLinkConditionDeadAndRetry 

链接失败,sdk尝试重链

kNIMChatRoomLinkConditionDead 

链接失败,开发者需要重新申请聊天室进入信息

◆ NIMChatRoomLoginState

登录状态

枚举值
kNIMChatRoomLoginStateLogin 

登录状态

kNIMChatRoomLoginStateUnLogin 

未登录状态

◆ NIMChatRoomMemberAttribute

设置成员的成员身份

枚举值
kNIMChatRoomMemberAttributeAdminister 

管理员,operator必须是创建者

kNIMChatRoomMemberAttributeNomalMember 

普通成员,operator必须是创建者或管理员

kNIMChatRoomMemberAttributeBlackList 

黑名单,operator必须是创建者或管理员

kNIMChatRoomMemberAttributeMuteList 

禁言,operator必须是创建者或管理员

◆ NIMChatRoomMsgType

聊天室消息类型

枚举值
kNIMChatRoomMsgTypeText 

文本类型消息

kNIMChatRoomMsgTypeImage 

图片类型消息

kNIMChatRoomMsgTypeAudio 

声音类型消息

kNIMChatRoomMsgTypeVideo 

视频类型消息

kNIMChatRoomMsgTypeLocation 

位置类型消息

kNIMChatRoomMsgTypeNotification 

活动室通知

kNIMChatRoomMsgTypeFile 

文件类型消息

kNIMChatRoomMsgTypeRobot 

波特机器人消息

kNIMChatRoomMsgTypeTips 

提醒类型消息

kNIMChatRoomMsgTypeCustom 

自定义消息

kNIMChatRoomMsgTypeUnknown 

未知类型消息,作为默认值

◆ NIMChatRoomNotificationId

聊天室通知类型 {"data" : {"ext":"", "operator":"", "opeNick":"", "tarNick":["",...], "target":["",...], ...}, "id": 301}

枚举值
kNIMChatRoomNotificationIdMemberIn 

成员进入聊天室

kNIMChatRoomNotificationIdMemberExit 

成员离开聊天室

kNIMChatRoomNotificationIdAddBlack 

成员被加黑

kNIMChatRoomNotificationIdRemoveBlack 

成员被取消黑名单

kNIMChatRoomNotificationIdAddMute 

成员被设置禁言

kNIMChatRoomNotificationIdRemoveMute 

成员被取消禁言

kNIMChatRoomNotificationIdAddManager 

设置为管理员

kNIMChatRoomNotificationIdRemoveManager 

取消管理员

kNIMChatRoomNotificationIdAddFixed 

成员设定为固定成员

kNIMChatRoomNotificationIdRemoveFixed 

成员取消固定成员

kNIMChatRoomNotificationIdClosed 

聊天室被关闭了

kNIMChatRoomNotificationIdInfoUpdated 

聊天室信息被更新了

kNIMChatRoomNotificationIdMemberKicked 

成员被踢了

kNIMChatRoomNotificationIdMemberTempMute 

临时禁言

kNIMChatRoomNotificationIdMemberTempUnMute 

主动解除临时禁言

kNIMChatRoomNotificationIdMyRoleUpdated 

成员主动更新了聊天室内的角色信息(仅指nick/avator/ext)

kNIMChatRoomNotificationIdQueueChanged 

麦序队列中有变更 "ext" : {"_e":"OFFER", "key":"element_key", "content":"element_value"}

kNIMChatRoomNotificationIdRoomMuted 

聊天室被禁言了,只有管理员可以发言,其他人都处于禁言状态

kNIMChatRoomNotificationIdRoomDeMuted 

聊天室解除全体禁言状态

kNIMChatRoomNotificationIdQueueBatchChanged 

麦序队列中有批量变更,发生在元素提交者离开聊天室或者从聊天室异常掉线时

kNIMChatRoomNotificationIdTagTempMuteAdd 

聊天室新增标签禁言,包括的字段是muteDuration、targetTag、operator、opeNick字段

kNIMChatRoomNotificationIdTagTempMuteRemove 

聊天室移除标签禁言,包括的字段是muteDuration、targetTag、operator、opeNick字段

kNIMChatRoomNotificationIdRecallMessage 

聊天室消息撤回,包括的字段是operator、target、msgTime、msgId、ext字段

kNIMChatRoomNotificationIdQueueBatchOffer 

聊天室麦序队列中有批量增加通知消息 "ext" :{"_e":"BATCH_OFFER","elements":[{"nick":"ddd","accid":"ljmt","value":"v2","key":"hzlj02_key2"}]}

kNIMChatRoomNotificationIdMemberTagChanged 

聊天室中有成员 tags 变更

◆ NIMChatRoomOnlineState

在线状态

枚举值
kNIMChatRoomOnlineStateOffline 

不在线

kNIMChatRoomOnlineStateOnline 

在线

◆ NIMChatRoomProxyType

代理类型

枚举值
kNIMChatRoomProxyNone 

不使用代理

kNIMChatRoomProxyHttp11 

HTTP 1.1 Proxy(暂不支持)

kNIMChatRoomProxySocks4 

Socks4 Proxy

kNIMChatRoomProxySocks4a 

Socks4a Proxy

kNIMChatRoomProxySocks5 

Socks5 Proxy

◆ NIMSDKLogLevel

聊天室日志级别

枚举值
kNIMSDKLogLevelFatal 

SDK Fatal级别Log

kNIMSDKLogLevelError 

SDK Error级别Log

kNIMSDKLogLevelWarn 

SDK Warn级别Log

kNIMSDKLogLevelApp 

SDK应用级别Log,正式发布时为了精简sdk log,可采用此级别

kNIMSDKLogLevelPro 

SDK调试过程级别Log,更加详细,更有利于开发调试

变量说明

◆ iNIMMaxBatchQueue

const int iNIMMaxBatchQueue = 100
static

int 聊天室更新的批量最大数

◆ kChatRoomNotificationDataKeyExt

const char* kChatRoomNotificationDataKeyExt = "ext"
static

string 上层开发自定义的事件通知扩展字段, 必须为可以解析为Json的非格式化的字符串

◆ kChatRoomNotificationDataKeyMemberInTempMutedDuration

const char* kChatRoomNotificationDataKeyMemberInTempMutedDuration = "muteTtl"
static

long 当通知为 kNIMChatRoomNotificationIdMemberIn,代表临时禁言时长(秒), 其他通知事件不带该数据

◆ kChatRoomNotificationDataKeyMsgId

const char* kChatRoomNotificationDataKeyMsgId = "msgId"
static

string 当通知为 kNIMChatRoomNotificationIdRecallMessage,代表被撤回消息的消息 ID

◆ kChatRoomNotificationDataKeyMsgTimetag

const char* kChatRoomNotificationDataKeyMsgTimetag = "msgTime"
static

int64_t 当通知为 kNIMChatRoomNotificationIdRecallMessage,代表被撤回消息的消息时间戳

◆ kChatRoomNotificationDataKeyMuteFlag

const char* kChatRoomNotificationDataKeyMuteFlag = "muted"
static

int 当通知为 kNIMChatRoomNotificationIdMemberIn才有,代表是否禁言状态,1:是 缺省或0:不是

◆ kChatRoomNotificationDataKeyOpt

const char* kChatRoomNotificationDataKeyOpt = "operator"
static

string 操作者的账号accid

◆ kChatRoomNotificationDataKeyOptNick

const char* kChatRoomNotificationDataKeyOptNick = "opeNick"
static

string 操作者的账号nick

◆ kChatRoomNotificationDataKeyQueueChange

const char* kChatRoomNotificationDataKeyQueueChange = "queueChange"
static

string 当通知为 kNIMChatRoomNotificationIdQueueChange,代表队列变更具体内容,内容解析 参考麦序队列变更通知扩展字段queueChange

◆ kChatRoomNotificationDataKeyTags

const char* kChatRoomNotificationDataKeyTags = "tags"
static

string 当通知为 kNIMChatRoomNotificationIdMemberTagChanged 时,代表变更后的 tags 信息

◆ kChatRoomNotificationDataKeyTarget

const char* kChatRoomNotificationDataKeyTarget = "target"
static

string json array 被操作者的accid

◆ kChatRoomNotificationDataKeyTargetNick

const char* kChatRoomNotificationDataKeyTargetNick = "tarNick"
static

string json array 被操作者的nick列表

◆ kChatRoomNotificationDataKeyTargetTag

const char* kChatRoomNotificationDataKeyTargetTag = "targetTag"
static

string 当通知为 kChatRoomNotificationIdTagTempMuteAdd 或 kChatRoomNotificationIdTagTempMuteRemove,代表被禁言的目标 tag

◆ kChatRoomNotificationDataKeyTempMutedFlag

const char* kChatRoomNotificationDataKeyTempMutedFlag = "tempMuted"
static

int 当通知为 kNIMChatRoomNotificationIdMemberIn才有,代表是否临时禁言状态,1:是 缺省或0:不是

◆ kChatRoomNotificationDataKeyTempMuteDuration

const char* kChatRoomNotificationDataKeyTempMuteDuration = "muteDuration"
static

long 当通知为临时禁言相关时有该值,禁言时kNIMChatRoomNotificationIdMemberTempMute代表本次禁言的时长(秒)

◆ kChatRoomNotificationKeyData

const char* kChatRoomNotificationKeyData = "data"
static

string 通知内容

◆ kChatRoomNotificationKeyID

const char* kChatRoomNotificationKeyID = "id"
static

string 通知类型ID

◆ kEnterKeyCommNECA

const char* kEnterKeyCommNECA = "comm_enca"
static

int 通信加密算法 {1(RC4),2(AES128),4(SM4)} def:1(RC4) 对称加密

◆ kEnterKeyDedicatedClusteFlag

const char* kEnterKeyDedicatedClusteFlag = "dedicated_cluste_flag"
static

int 是否为专属集群 1:是 0: 否

◆ kEnterKeyHandShakeType

const char* kEnterKeyHandShakeType = "hand_shake_type"
static

int 登录时使用的握手协议类型 0:支持配置多种对称与非对称加密算法,1:只支持RAS + RC4,缺省 0

◆ kEnterKeyNegoKeyNECA

const char* kEnterKeyNegoKeyNECA = "nego_key_neca"
static

int "交换密钥"协议加密算法 {1(RSA),2(SM2)}, def:1(RSA) 非对称加密

◆ kEnterKeyNegoKeyNECAKeyPA

const char* kEnterKeyNegoKeyNECAKeyPA = "nego_key_enca_key_parta"
static

string "交换密钥"协议加密算法密钥 part A 自定义时则必填 BigNumHex string 不含0x RSA:module,SM2:X

◆ kEnterKeyNegoKeyNECAKeyPB

const char* kEnterKeyNegoKeyNECAKeyPB = "nego_key_enca_key_partb"
static

string "交换密钥"协议加密算法密钥 part B 自定义时则必填 BigNumHex string 不含0x RSA:EXP,SM2:Y

◆ kEnterKeyNegoKeyNECAKeyV

const char* kEnterKeyNegoKeyNECAKeyV = "nego_key_enca_key_version"
static

int 非对称加密算法的 key version 自定义时则必填

◆ kEnterKeyPrivateConfigRoot

const char* kEnterKeyPrivateConfigRoot = "private_config"
static

json obj 私有配置root key

◆ kEnterKeyPublicConfigRoot

const char* kEnterKeyPublicConfigRoot = "public_config"
static

json obj 公共配置root key

◆ kNIMChatRoomAntiSpamBusinessID

const char* kNIMChatRoomAntiSpamBusinessID = "anti_spam_business_id"
static

string 反垃圾

◆ kNIMChatRoomEnterAntiSpamBusinessID

const char* kNIMChatRoomEnterAntiSpamBusinessID = "anti_spam_business_id"
static

string, 反垃圾相关业务id

◆ kNIMChatRoomEnterAuthType

const char* kNIMChatRoomEnterAuthType = "auth_type"
static

int 鉴权方式,0表示最初的loginToken的校验方式,1表示基于appSecret计算的token鉴权方式,2表示基于第三方回调的token鉴权方式,默认0

◆ kNIMChatRoomEnterCallbackKeyMyInfo

const char* kNIMChatRoomEnterCallbackKeyMyInfo = "my_info"
static

json value, 见聊天室个人Info Json Keys

◆ kNIMChatRoomEnterCallbackKeyRoomInfo

const char* kNIMChatRoomEnterCallbackKeyRoomInfo = "room_info"
static

json value, 见聊天室Info Json Keys

◆ kNIMChatRoomEnterEnableLocation

const char* kNIMChatRoomEnterEnableLocation = "enable_location"
static

int 登录时使用的位置信息

◆ kNIMChatRoomEnterKeyAccID

const char* kNIMChatRoomEnterKeyAccID = "accid"
static

string,登录聊天室的账号非匿名模式下使用

◆ kNIMChatRoomEnterKeyAddress

const char* kNIMChatRoomEnterKeyAddress = "address"
static

string array,聊天室地址,地址通过应用服务器接口获取

◆ kNIMChatRoomEnterKeyAppDataPath

const char* kNIMChatRoomEnterKeyAppDataPath = "app_data_path"
static

string 应用数据目录,匿名登录时必填,使用默认路径时只需传入单个目录名(不以反斜杠结尾) 使用自定义路径时需传入完整路径(以反斜杠结尾,并确保有正确的读写权限!)

◆ kNIMChatRoomEnterKeyAppKey

const char* kNIMChatRoomEnterKeyAppKey = "app_key"
static

string, 应用appkey,匿名登录时必填

◆ kNIMChatRoomEnterKeyAvatar

const char* kNIMChatRoomEnterKeyAvatar = "avatar"
static

string, (匿名登录时必填)设置后通过获取聊天室成员信息接口可以获取该数据

◆ kNIMChatRoomEnterKeyExt

const char* kNIMChatRoomEnterKeyExt = "ext"
static

string, 聊天室可用的扩展字段,必须为可以解析为Json的非格式化的字符串,选填,设置后通过获取聊天室成员信息接口可以获取该数据

◆ kNIMChatRoomEnterKeyLogLevel

const char* kNIMChatRoomEnterKeyLogLevel = "log_level"
static

int,匿名登录时选填,定义见NIMSDKLogLevel(选填,SDK默认的内置级别为kNIMSDKLogLevelPro)

◆ kNIMChatRoomEnterKeyNick

const char* kNIMChatRoomEnterKeyNick = "nick"
static

string, (匿名登录时必填)进入聊天室后展示的昵称,选填,聊天室成员收到聊天室进入通知中可以获取该数据

◆ kNIMChatRoomEnterKeyNotifyExt

const char* kNIMChatRoomEnterKeyNotifyExt = "notify_ext"
static

string, 进入聊天室通知开发者扩展字段,必须为可以解析为Json的非格式化的字符串,选填,聊天室成员收到聊天室进入通知中可以获取该数据

◆ kNIMChatRoomEnterKeyRandomID

const char* kNIMChatRoomEnterKeyRandomID = "random_id"
static

int,是否开启随机ID模式,默认为关闭(0),建议默认值

◆ kNIMChatRoomEnterKeyToken

const char* kNIMChatRoomEnterKeyToken = "token"
static

string,登录聊天室的密码非匿名模式下使用

◆ kNIMChatRoomEnterLocationDistance

const char* kNIMChatRoomEnterLocationDistance = "location_distance"
static

◆ kNIMChatRoomEnterLocationX

const char* kNIMChatRoomEnterLocationX = "location_x"
static

◆ kNIMChatRoomEnterLocationY

const char* kNIMChatRoomEnterLocationY = "location_y"
static

◆ kNIMChatRoomEnterLocationZ

const char* kNIMChatRoomEnterLocationZ = "location_z"
static

◆ kNIMChatRoomEnterLoginExt

const char* kNIMChatRoomEnterLoginExt = "login_ext"
static

string, 登录自定义字段,用于提交给用户的第三方回调服务进行登录检测,不会同步给其他端

◆ kNIMChatRoomEnterLoginTags

const char* kNIMChatRoomEnterLoginTags = "login_tags"
static

string array 登录标签,可以设置多个,json array 格式,例子:["tag1", "tag2"]

◆ kNIMChatRoomEnterNotifyTags

const char* kNIMChatRoomEnterNotifyTags = "notify_tags"
static

string 登录登出通知的目标标签

◆ kNIMChatRoomGetMembersKeyLimit

const char* kNIMChatRoomGetMembersKeyLimit = "limit"
static

int 数量

◆ kNIMChatRoomGetMembersKeyOffset

const char* kNIMChatRoomGetMembersKeyOffset = "offset"
static

long 时间戳,填0会使用当前服务器最新时间开始查询,即第一页

◆ kNIMChatRoomGetMembersKeyTag

const char* kNIMChatRoomGetMembersKeyTag = "tag"
static

获取成员时指定的 tag

◆ kNIMChatRoomGetMembersKeyType

const char* kNIMChatRoomGetMembersKeyType = "type"
static

NIMChatRoomGetMemberType 成员类型

◆ kNIMChatRoomGetMsgHistoryKeyEndTime

const char* kNIMChatRoomGetMsgHistoryKeyEndTime = "end"
static

long 结束时间,单位毫秒

◆ kNIMChatRoomGetMsgHistoryKeyLimit

const char* kNIMChatRoomGetMsgHistoryKeyLimit = "limit"
static

int 本次返回的消息数量

◆ kNIMChatRoomGetMsgHistoryKeyMsgtypes

const char* kNIMChatRoomGetMsgHistoryKeyMsgtypes = "msgtypes"
static

array:数组 要查询的消息类型,取值NIMChatRoomMsgType中所枚举类型

◆ kNIMChatRoomGetMsgHistoryKeyReverse

const char* kNIMChatRoomGetMsgHistoryKeyReverse = "reverse"
static

boolean: true:按时间正序起查,正序排列,false:按时间逆序起查,逆序排列

◆ kNIMChatRoomGetMsgHistoryKeyStartTime

const char* kNIMChatRoomGetMsgHistoryKeyStartTime = "start"
static

long 开始时间,单位毫秒

◆ kNIMChatRoomGetMsgHistoryKeyTags

const char* kNIMChatRoomGetMsgHistoryKeyTags = "tags"
static

array 查询历史消息指定的 tags

◆ kNIMChatRoomInfoKeyAnnouncement

const char* kNIMChatRoomInfoKeyAnnouncement = "announcement"
static

string, 聊天室公告

◆ kNIMChatRoomInfoKeyBroadcastUrl

const char* kNIMChatRoomInfoKeyBroadcastUrl = "broadcast_url"
static

string, 视频直播拉流地址

◆ kNIMChatRoomInfoKeyCreatorID

const char* kNIMChatRoomInfoKeyCreatorID = "creator_id"
static

string, 聊天室创建者账号

◆ kNIMChatRoomInfoKeyExt

const char* kNIMChatRoomInfoKeyExt = "ext"
static

string, 第三方扩展字段, 必须为可以解析为Json的非格式化的字符串, 长度4k

◆ kNIMChatRoomInfoKeyID

const char* kNIMChatRoomInfoKeyID = "id"
static

long, 聊天室ID

◆ kNIMChatRoomInfoKeyMuteAll

const char* kNIMChatRoomInfoKeyMuteAll = "mute_all"
static

int, 聊天室禁言标志 1:禁言,0:解除禁言

◆ kNIMChatRoomInfoKeyName

const char* kNIMChatRoomInfoKeyName = "name"
static

string, 聊天室名称

◆ kNIMChatRoomInfoKeyOnlineCount

const char* kNIMChatRoomInfoKeyOnlineCount = "online_count"
static

int, 当前在线用户数量

◆ kNIMChatRoomInfoKeyQueuelevel

const char* kNIMChatRoomInfoKeyQueuelevel = "queuelevel"
static

int, 队列管理权限:0:所有人都有权限变更队列,1:只有主播管理员才能操作变更

◆ kNIMChatRoomInfoKeyValidFlag

const char* kNIMChatRoomInfoKeyValidFlag = "valid_flag"
static

int, 聊天室有效标记, 1:有效,0:无效

◆ kNIMChatRoomMemberInfoKeyAccID

const char* kNIMChatRoomMemberInfoKeyAccID = "account_id"
static

string 成员账号

◆ kNIMChatRoomMemberInfoKeyAvatar

const char* kNIMChatRoomMemberInfoKeyAvatar = "avatar"
static

string 聊天室内的头像,预留字段, 可从Uinfo中取icon

◆ kNIMChatRoomMemberInfoKeyBlacklist

const char* kNIMChatRoomMemberInfoKeyBlacklist = "is_blacklist"
static

int 是黑名单

◆ kNIMChatRoomMemberInfoKeyEnterTimetag

const char* kNIMChatRoomMemberInfoKeyEnterTimetag = "enter_timetag"
static

long 进入聊天室的时间点,对于离线成员该字段为空

◆ kNIMChatRoomMemberInfoKeyExt

const char* kNIMChatRoomMemberInfoKeyExt = "ext"
static

string 开发者扩展字段, 长度限制2k, 必须为可以解析为Json的非格式化的字符串

◆ kNIMChatRoomMemberInfoKeyGuestFlag

const char* kNIMChatRoomMemberInfoKeyGuestFlag = "guest_flag"
static

NIMChatRoomGuestFlag 是否是普通游客类型,0:不是游客,1:是游客; 游客身份在聊天室中没有持久化, 只有在线时才会有内存状态

◆ kNIMChatRoomMemberInfoKeyLevel

const char* kNIMChatRoomMemberInfoKeyLevel = "level"
static

int 成员级别: >=0表示用户开发者可以自定义的级别

◆ kNIMChatRoomMemberInfoKeyMuted

const char* kNIMChatRoomMemberInfoKeyMuted = "is_muted"
static

int 是禁言用户

◆ kNIMChatRoomMemberInfoKeyNick

const char* kNIMChatRoomMemberInfoKeyNick = "nick"
static

string 聊天室内的昵称字段,预留字段, 可从Uinfo中取

◆ kNIMChatRoomMemberInfoKeyNotifyTags

const char* kNIMChatRoomMemberInfoKeyNotifyTags = "notify_tags"
static

string 聊天室成员登录时指定的 notify_tags 信息

◆ kNIMChatRoomMemberInfoKeyOnlineState

const char* kNIMChatRoomMemberInfoKeyOnlineState = "online_state"
static

NIMChatRoomOnlineState 成员是否处于在线状态, 仅特殊成员才可能离线, 对游客/匿名用户而言只能是在线

◆ kNIMChatRoomMemberInfoKeyRoomID

const char* kNIMChatRoomMemberInfoKeyRoomID = "room_id"
static

long 聊天室id

◆ kNIMChatRoomMemberInfoKeyTag

const char* kNIMChatRoomMemberInfoKeyTag = "tags"
static

string 聊天室成员所属的 tag 信息

◆ kNIMChatRoomMemberInfoKeyTempMute

const char* kNIMChatRoomMemberInfoKeyTempMute = "temp_mute"
static

int 临时禁言

◆ kNIMChatRoomMemberInfoKeyTempMuteRestDuration

const char* kNIMChatRoomMemberInfoKeyTempMuteRestDuration = "temp_mute_rest_duration"
static

long 临时禁言的解除时长,单位秒

◆ kNIMChatRoomMemberInfoKeyType

const char* kNIMChatRoomMemberInfoKeyType = "type"
static

成员类型, -1:受限用户; 0:普通;1:创建者;2:管理员;3:临时用户,非固定成员;4:匿名非注册用户,非云信注册用户

◆ kNIMChatRoomMemberInfoKeyUpdateTimetag

const char* kNIMChatRoomMemberInfoKeyUpdateTimetag = "update_timetag"
static

long 固定成员的记录更新时间,用于固定成员列表的排列查询

◆ kNIMChatRoomMemberInfoKeyValid

const char* kNIMChatRoomMemberInfoKeyValid = "valid"
static

int 记录有效标记位

◆ kNIMChatRoomMsgKeyAntiSpamBizId

const char* kNIMChatRoomMsgKeyAntiSpamBizId = "anti_spam_business_id"
static

string, (可选)用户配置的对某些单条消息另外的反垃圾的业务ID

◆ kNIMChatRoomMsgKeyAntiSpamContent

const char* kNIMChatRoomMsgKeyAntiSpamContent = "anti_spam_content"
static

string, (可选)开发者自定义的反垃圾字段, 长度限制2048

◆ kNIMChatRoomMsgKeyAntiSpamEnable

const char* kNIMChatRoomMsgKeyAntiSpamEnable = "anti_spam_enable"
static

int, 是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0

◆ kNIMChatRoomMsgKeyAntiSpamExt

const char* kNIMChatRoomMsgKeyAntiSpamExt = "anti_spam_ext"
static

(可选)String, 易盾反垃圾扩展字段,限制json,长度限制1024

◆ kNIMChatRoomMsgKeyAntiSpamRes

const char* kNIMChatRoomMsgKeyAntiSpamRes = "anti_spam_res"
static

String, 易盾反垃圾返回的结果字段

◆ kNIMChatRoomMsgKeyAntiSpamUsingYiDun

const char* kNIMChatRoomMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun"
static

int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾

◆ kNIMChatRoomMsgKeyAPICallingTime

const char* kNIMChatRoomMsgKeyAPICallingTime = "apiCallingTime"
static

uint64, api calling time

◆ kNIMChatRoomMsgKeyAttach

const char* kNIMChatRoomMsgKeyAttach = "msg_attach"
static

string, 消息内容,长度限制2048, 如果约定的是json字符串,必须为可以解析为json的非格式化的字符串

◆ kNIMChatRoomMsgKeyAttachUploadDuration

const char* kNIMChatRoomMsgKeyAttachUploadDuration = "attachUploadDuration"
static

uint64_t, attach_upload_duration

◆ kNIMChatRoomMsgKeyBody

const char* kNIMChatRoomMsgKeyBody = "body"
static

string,(可选)文本消息内容(聊天室机器人文本消息)

◆ kNIMChatRoomMsgKeyClientMsgid

const char* kNIMChatRoomMsgKeyClientMsgid = "client_msg_id"
static

string,客户端消息id

◆ kNIMChatRoomMsgKeyEnvConfig

const char* kNIMChatRoomMsgKeyEnvConfig = "env_config"
static

(可选)String, 自定义抄送配置 v8.0.0 新增

◆ kNIMChatRoomMsgKeyExt

const char* kNIMChatRoomMsgKeyExt = "ext"
static

string, 第三方扩展字段, 长度限制4096, 必须为可以解析为Json的非格式化的字符串

◆ kNIMChatRoomMsgKeyFromAccount

const char* kNIMChatRoomMsgKeyFromAccount = "from_id"
static

string, 消息发送者的账号,服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyFromAvatar

const char* kNIMChatRoomMsgKeyFromAvatar = "from_avator"
static

string, 消息发送方头像,服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyFromClientType

const char* kNIMChatRoomMsgKeyFromClientType = "from_client_type"
static

int,消息发送方客户端类型(NIMChatRoomClientType),服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyFromExt

const char* kNIMChatRoomMsgKeyFromExt = "from_ext"
static

string, 消息发送方身份扩展字段,服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyFromNick

const char* kNIMChatRoomMsgKeyFromNick = "from_nick"
static

string, 消息发送方昵称,服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyHighPriorityFlag

const char* kNIMChatRoomMsgKeyHighPriorityFlag = "high_priority_flag"
static

int, 高优先级消息标记,1:是; 非高优先级消息不带该字段,服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyHistorySave

const char* kNIMChatRoomMsgKeyHistorySave = "history_save"
static

int,(可选)该消息是否存储云端历史,可选,0:不是,1:是, 默认1

◆ kNIMChatRoomMsgKeyLocalFilePath

const char* kNIMChatRoomMsgKeyLocalFilePath = "local_res_path"
static

string, 暂时不用,多媒体消息资源本地绝对路径,SDK本地维护,发送多媒体消息时必填

◆ kNIMChatRoomMsgKeyLocalResId

const char* kNIMChatRoomMsgKeyLocalResId = "res_id"
static

string, 暂时不用,多媒体资源id,发送方选填,接收方收到的是客户端消息id

◆ kNIMChatRoomMsgKeyLocationX

const char* kNIMChatRoomMsgKeyLocationX = "location_x"
static

(可选)int, 位置信息 X 轴坐标

◆ kNIMChatRoomMsgKeyLocationY

const char* kNIMChatRoomMsgKeyLocationY = "location_y"
static

(可选)int, 位置信息 Y 轴坐标

◆ kNIMChatRoomMsgKeyLocationZ

const char* kNIMChatRoomMsgKeyLocationZ = "location_z"
static

(可选)int, 位置信息 Z 轴坐标

◆ kNIMChatRoomMsgKeyNotifyTags

const char* kNIMChatRoomMsgKeyNotifyTags = "notify_tags"
static

(可选)String 消息的目标标签表达式,参见TagPattern和TagCalculator v8.4.0 新增

◆ kNIMChatRoomMsgKeyResendFlag

const char* kNIMChatRoomMsgKeyResendFlag = "resend_flag"
static

int,消息重发标记位,第一次发送0,重发1

◆ kNIMChatRoomMsgKeyRoomID

const char* kNIMChatRoomMsgKeyRoomID = "room_id"
static

long, 消息所属的聊天室id,服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeySendTime

const char* kNIMChatRoomMsgKeySendTime = "sendTime"
static

uint64_t, send_time

◆ kNIMChatRoomMsgKeyStatistics

const char* kNIMChatRoomMsgKeyStatistics = "statistics"
static

string, kNIMChatRoomMsgKeyStatistics

◆ kNIMChatRoomMsgKeySubType

const char* kNIMChatRoomMsgKeySubType = "msg_sub_type"
static

(可选)int,消息的子类型,客户端定义,服务器透传

◆ kNIMChatRoomMsgKeyThirdPartyCBEXT

const char* kNIMChatRoomMsgKeyThirdPartyCBEXT = "third_party_callback_ext"
static

(可选)string第三方回调回来的自定义扩展字段 v7.8 新增

◆ kNIMChatRoomMsgKeyTime

const char* kNIMChatRoomMsgKeyTime = "time"
static

long, 消息发送的时间戳(毫秒),服务器填写,发送方不需要填写

◆ kNIMChatRoomMsgKeyToAccids

const char* kNIMChatRoomMsgKeyToAccids = "to_accids"
static

(可选)string, json array,消息接受者,如果设置了本字段,且不为空,则本消息为聊天室定向消息(聊天室定向消息不会存历史)

◆ kNIMChatRoomMsgKeyType

const char* kNIMChatRoomMsgKeyType = "msg_type"
static

int, 消息类型(NIMChatRoomMsgType)

◆ kNIMChatRoomMsgKeyYiDunAntiCheating

const char* kNIMChatRoomMsgKeyYiDunAntiCheating = "yidun_anti_cheating"
static

(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024

◆ kNIMChatRoomMsgNeedHighPriorityAck

const char* kNIMChatRoomMsgNeedHighPriorityAck = "need_high_priority_ack"
static

(可选)int, 高优消息是否需要ack,0:不需要,1:需要。默认为0

◆ kNIMChatRoomNotificationQueueBatchChangedKeyKey

const char* kNIMChatRoomNotificationQueueBatchChangedKeyKey = "key"
static

string 变更元素的key

◆ kNIMChatRoomNotificationQueueBatchChangedKeyObject

const char* kNIMChatRoomNotificationQueueBatchChangedKeyObject = "kvObject"
static

map 变更元素的内容

◆ kNIMChatRoomNotificationQueueBatchChangedKeyType

const char* kNIMChatRoomNotificationQueueBatchChangedKeyType = "_e"
static

string 变更类型,目前有OFFER,POLL,DROP,PARTCLEAR四个类型

◆ kNIMChatRoomNotificationQueueBatchChangedKeyValue

const char* kNIMChatRoomNotificationQueueBatchChangedKeyValue = "content"
static

string 变更元素的内容

◆ kNIMChatRoomNotificationQueueChangedKeyKey

const char* kNIMChatRoomNotificationQueueChangedKeyKey = "key"
static

string 变更元素的key

◆ kNIMChatRoomNotificationQueueChangedKeyType

const char* kNIMChatRoomNotificationQueueChangedKeyType = "_e"
static

string 变更类型,目前有OFFER,POLL,DROP,BATCH_UPDATE 类型

◆ kNIMChatRoomNotificationQueueChangedKeyValue

const char* kNIMChatRoomNotificationQueueChangedKeyValue = "content"
static

string 变更元素的内容

◆ kNIMChatRoomNotificationQueueChangedType_DROP

const char* kNIMChatRoomNotificationQueueChangedType_DROP = "DROP"
static

清理队列操作

◆ kNIMChatRoomNotificationQueueChangedType_OFFER

const char* kNIMChatRoomNotificationQueueChangedType_OFFER = "OFFER"
static

放元素到新队列

◆ kNIMChatRoomNotificationQueueChangedType_PARTCLEAR

const char* kNIMChatRoomNotificationQueueChangedType_PARTCLEAR = "PARTCLEAR"
static

部分清理操作(发生在提交元素的用户掉线时,清理这个用户对应的key

◆ kNIMChatRoomNotificationQueueChangedType_POLL

const char* kNIMChatRoomNotificationQueueChangedType_POLL = "POLL"
static

从队列中取出新队列

◆ kNIMChatRoomQueueElementKey

const char* kNIMChatRoomQueueElementKey = "key"
static

string 元素key

◆ kNIMChatRoomQueueElementValue

const char* kNIMChatRoomQueueElementValue = "value"
static

string 元素value

◆ kNIMChatRoomQueueOfferOptionElementAccId

const char* kNIMChatRoomQueueOfferOptionElementAccId = "element_accid"
static

string (可选参数)队列元素所属账号,默认不传表示队列元素属于当前操作人,管理员可以指定队列元素归属于其他合法账号

◆ kNIMChatRoomQueueOfferOptionTransient

const char* kNIMChatRoomQueueOfferOptionTransient = "transient"
static

bool (可选参数)true 表示当提交这个新元素的用户从聊天室掉线或退出的时候,需要删除这个元素;默认 false 表示不删除

◆ kNIMChatRoomSetMemberAttributeKeyAccoutID

const char* kNIMChatRoomSetMemberAttributeKeyAccoutID = "account_id"
static

string 成员ID

◆ kNIMChatRoomSetMemberAttributeKeyAttribute

const char* kNIMChatRoomSetMemberAttributeKeyAttribute = "attribute"
static

NIMChatRoomMemberAttribute

◆ kNIMChatRoomSetMemberAttributeKeyNotifyExt

const char* kNIMChatRoomSetMemberAttributeKeyNotifyExt = "notify_ext"
static

string 自定义的事件通知扩展字段, 必须为可以解析为Json的非格式化的字符串

◆ kNIMChatRoomSetMemberAttributeKeyOpt

const char* kNIMChatRoomSetMemberAttributeKeyOpt = "opt"
static

boolean: true:是,false:否

◆ kNIMChatRoomUpdateMyRoleExtNeedSave

const char* kNIMChatRoomUpdateMyRoleExtNeedSave = "need_save"
static

bool 我的资料是否需要持久化保存,默认false

◆ kNIMRobotInfoKeyAccid

const char* kNIMRobotInfoKeyAccid = "accid"
static

string 帐号

◆ kNIMRobotInfoKeyCreateTime

const char* kNIMRobotInfoKeyCreateTime = "create_timetag"
static

long 创建时间戳 毫秒

◆ kNIMRobotInfoKeyIcon

const char* kNIMRobotInfoKeyIcon = "icon"
static

string 头像

◆ kNIMRobotInfoKeyIntro

const char* kNIMRobotInfoKeyIntro = "intro"
static

string 介绍

◆ kNIMRobotInfoKeyName

const char* kNIMRobotInfoKeyName = "name"
static

string 名字

◆ kNIMRobotInfoKeyRobotId

const char* kNIMRobotInfoKeyRobotId = "rid"
static

string 机器人ID

◆ kNIMRobotInfoKeyUpdateTime

const char* kNIMRobotInfoKeyUpdateTime = "update_timetag"
static

long 更新时间戳 毫秒