NIM CPP SDK  7.8.1
Typedefs | Enumerations
nim_chatroom_def.h File Reference

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

#include "public_define/nim_util_include.h"

Go to the source code of this file.

Typedefs

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_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)
 

Enumerations

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
}
 
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
}
 
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
}
 

Variables

进入聊天室的可选填信息Json Keys
static const char * kNIMChatRoomEnterKeyNick = "nick"
 
static const char * kNIMChatRoomEnterKeyAvatar = "avatar"
 
static const char * kNIMChatRoomEnterKeyExt = "ext"
 
static const char * kNIMChatRoomEnterKeyNotifyExt = "notify_ext"
 
独立聊天室进入的信息Json Keys
static const char * kNIMChatRoomEnterKeyAppKey = "app_key"
 
static const char * kNIMChatRoomEnterKeyAppDataPath = "app_data_path"
 
static const char * kNIMChatRoomEnterKeyLogLevel = "log_level"
 
static const char * kNIMChatRoomEnterKeyAddress = "address"
 
static const char * kNIMChatRoomEnterKeyRandomID = "random_id"
 
static const char * kNIMChatRoomEnterKeyAccID = "accid"
 
static const char * kNIMChatRoomEnterKeyToken = "token"
 
消息结构 Json Keys
static const char * kNIMChatRoomMsgKeyType = "msg_type"
 
static const char * kNIMChatRoomMsgKeyAttach = "msg_attach"
 
static const char * kNIMChatRoomMsgKeyClientMsgid = "client_msg_id"
 
static const char * kNIMChatRoomMsgKeyResendFlag = "resend_flag"
 
static const char * kNIMChatRoomMsgKeyExt = "ext"
 
static const char * kNIMChatRoomMsgKeyAntiSpamEnable = "anti_spam_enable"
 
static const char * kNIMChatRoomMsgKeyAntiSpamContent = "anti_spam_content"
 
static const char * kNIMChatRoomMsgKeyAntiSpamBizId = "anti_spam_business_id"
 
static const char * kNIMChatRoomMsgKeyHistorySave = "history_save"
 
static const char * kNIMChatRoomMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun"
 
static const char * kNIMChatRoomMsgKeyBody = "body"
 
static const char * kNIMChatRoomMsgKeyThirdPartyCBEXT = "third_party_callback_ext"
 
static const char * kNIMChatRoomMsgKeySubType = "msg_sub_type"
 
static const char * kNIMChatRoomMsgKeyYiDunAntiCheating = "yidun_anti_cheating"
 
static const char * kNIMChatRoomMsgKeyRoomID = "room_id"
 
static const char * kNIMChatRoomMsgKeyFromAccount = "from_id"
 
static const char * kNIMChatRoomMsgKeyTime = "time"
 
static const char * kNIMChatRoomMsgKeyFromClientType = "from_client_type"
 
static const char * kNIMChatRoomMsgKeyFromNick = "from_nick"
 
static const char * kNIMChatRoomMsgKeyFromAvatar = "from_avator"
 
static const char * kNIMChatRoomMsgKeyFromExt = "from_ext"
 
static const char * kNIMChatRoomMsgKeyHighPriorityFlag = "high_priority_flag"
 
static const char * kNIMChatRoomMsgKeyLocalFilePath = "local_res_path"
 
static const char * kNIMChatRoomMsgKeyLocalResId = "res_id"
 
static const int iNIMMaxBatchQueue = 100
 
进入聊天室回调结果Json Keys
static const char * kNIMChatRoomEnterCallbackKeyRoomInfo = "room_info"
 
static const char * kNIMChatRoomEnterCallbackKeyMyInfo = "my_info"
 
聊天室Info Json Keys
static const char * kNIMChatRoomInfoKeyID = "id"
 
static const char * kNIMChatRoomInfoKeyName = "name"
 
static const char * kNIMChatRoomInfoKeyAnnouncement = "announcement"
 
static const char * kNIMChatRoomInfoKeyBroadcastUrl = "broadcast_url"
 
static const char * kNIMChatRoomInfoKeyCreatorID = "creator_id"
 
static const char * kNIMChatRoomInfoKeyValidFlag = "valid_flag"
 
static const char * kNIMChatRoomInfoKeyExt = "ext"
 
static const char * kNIMChatRoomInfoKeyOnlineCount = "online_count"
 
static const char * kNIMChatRoomInfoKeyMuteAll = "mute_all"
 
static const char * kNIMChatRoomInfoKeyQueuelevel = "queuelevel"
 
聊天室个人Info Json Keys
static const char * kNIMChatRoomMemberInfoKeyRoomID = "room_id"
 
static const char * kNIMChatRoomMemberInfoKeyAccID = "account_id"
 
static const char * kNIMChatRoomMemberInfoKeyType = "type"
 
static const char * kNIMChatRoomMemberInfoKeyLevel = "level"
 
static const char * kNIMChatRoomMemberInfoKeyNick = "nick"
 
static const char * kNIMChatRoomMemberInfoKeyAvatar = "avatar"
 
static const char * kNIMChatRoomMemberInfoKeyExt = "ext"
 
static const char * kNIMChatRoomMemberInfoKeyOnlineState = "online_state"
 
static const char * kNIMChatRoomMemberInfoKeyGuestFlag = "guest_flag"
 
static const char * kNIMChatRoomMemberInfoKeyEnterTimetag = "enter_timetag"
 
static const char * kNIMChatRoomMemberInfoKeyBlacklist = "is_blacklist"
 
static const char * kNIMChatRoomMemberInfoKeyMuted = "is_muted"
 
static const char * kNIMChatRoomMemberInfoKeyValid = "valid"
 
static const char * kNIMChatRoomMemberInfoKeyUpdateTimetag = "update_timetag"
 
static const char * kNIMChatRoomMemberInfoKeyTempMute = "temp_mute"
 
static const char * kNIMChatRoomMemberInfoKeyTempMuteRestDuration = "temp_mute_rest_duration"
 
更新我的信息扩展字段 Json Keys
static const char * kNIMChatRoomUpdateMyRoleExtNeedSave = "need_save"
 
分页获取成员列表条件Keys
static const char * kNIMChatRoomGetMembersKeyType = "type"
 
static const char * kNIMChatRoomGetMembersKeyOffset = "offset"
 
static const char * kNIMChatRoomGetMembersKeyLimit = "limit"
 
分获取历史消息条件Keys
static const char * kNIMChatRoomGetMsgHistoryKeyStartTime = "start"
 
static const char * kNIMChatRoomGetMsgHistoryKeyLimit = "limit"
 
static const char * kNIMChatRoomGetMsgHistoryKeyReverse = "reverse"
 
static const char * kNIMChatRoomGetMsgHistoryKeyMsgtypes = "msgtypes"
 
设定聊天室成员标记身份条件Keys
static const char * kNIMChatRoomSetMemberAttributeKeyAccoutID = "account_id"
 
static const char * kNIMChatRoomSetMemberAttributeKeyAttribute = "attribute"
 
static const char * kNIMChatRoomSetMemberAttributeKeyOpt = "opt"
 
static const char * kNIMChatRoomSetMemberAttributeKeyNotifyExt = "notify_ext"
 
聊天室通知Keys
static const char * kChatRoomNotificationKeyData = "data"
 
static const char * kChatRoomNotificationKeyID = "id"
 
static const char * kChatRoomNotificationDataKeyExt = "ext"
 
static const char * kChatRoomNotificationDataKeyOpt = "operator"
 
static const char * kChatRoomNotificationDataKeyOptNick = "opeNick"
 
static const char * kChatRoomNotificationDataKeyTargetNick = "tarNick"
 
static const char * kChatRoomNotificationDataKeyTarget = "target"
 
static const char * kChatRoomNotificationDataKeyTempMuteDuration = "muteDuration"
 
static const char * kChatRoomNotificationDataKeyMuteFlag = "muted"
 
static const char * kChatRoomNotificationDataKeyTempMutedFlag = "tempMuted"
 
static const char * kChatRoomNotificationDataKeyMemberInTempMutedDuration = "muteTtl"
 
static const char * kChatRoomNotificationDataKeyQueueChange = "queueChange"
 
聊天室麦序队列元素Keys
static const char * kNIMChatRoomQueueElementKey = "key"
 
static const char * kNIMChatRoomQueueElementValue = "value"
 
麦序队列变更通知扩展字段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"
 
聊天室通知 麦序队列变更通知扩展字段queueChange keys
static const char * kNIMChatRoomNotificationQueueChangedKeyType = "_e"
 
static const char * kNIMChatRoomNotificationQueueChangedKeyKey = "key"
 
static const char * kNIMChatRoomNotificationQueueChangedKeyValue = "content"
 
聊天室通知 麦序队列中有批量变更通知扩展字段queueBatchChange keys

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

static const char * kNIMChatRoomNotificationQueueBatchChangedKeyType = "_e"
 
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyKey = "key"
 
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyValue = "content"
 
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyObject = "kvObject"
 
机器人信息 Json Keys

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

static const char * kNIMRobotInfoKeyAccid = "accid"
 
static const char * kNIMRobotInfoKeyName = "name"
 
static const char * kNIMRobotInfoKeyIcon = "icon"
 
static const char * kNIMRobotInfoKeyIntro = "intro"
 
static const char * kNIMRobotInfoKeyRobotId = "rid"
 
static const char * kNIMRobotInfoKeyCreateTime = "create_timetag"
 
static const char * kNIMRobotInfoKeyUpdateTime = "update_timetag"
 

Detailed Description

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

Author
Oleg, Harrison
Date
2015/12/24

Typedef Documentation

◆ 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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]result不存在的元素列表 Json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

进入的回调函数定义

Parameters
[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只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]exit_type退出原因(ChatRoomExitReason)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultmember info json string , json key定义见 聊天室Info Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson string , json key定义见 聊天室个人Info Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson string , json key定义见 消息结构 Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

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

◆ nim_chatroom_link_condition_cb_func

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

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

Parameters
[out]room_id聊天室ID
[out]condition网络状况
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]rescode错误码,200:一切正常
[out]result机器人信息 Json string array
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson object string (聊天室麦序队列元素Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson array string (聊天室麦序队列元素Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

取出元素的回调函数定义

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson object string (聊天室麦序队列元素Keys)
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

接收消息的回调函数定义

Parameters
[out]room_id聊天室ID
[out]resultjson string, json key定义见 消息结构 Json Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]resultjson string, json key定义见 聊天室通知Keys
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码(关注但不仅限200,408,416,13004,13006)
[out]resultjson string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultjson string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]resultmember info json string
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

Parameters
[out]room_id聊天室ID
[out]error_code错误码
[out]json_extensionjson扩展数据(备用)
[out]user_dataAPP的自定义用户数据,SDK只负责传回给回调函数,不做任何处理!
Returns
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)

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

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

Enumeration Type Documentation

◆ NIMChatRoomClientType

聊天室消息来源端

Enumerator
kNIMChatRoomClientTypeDefault 

default,unset

kNIMChatRoomClientTypeAndroid 

android

kNIMChatRoomClientTypeiOS 

iOS

kNIMChatRoomClientTypePCWindows 

PC

kNIMChatRoomClientTypeWindowsPhone 

WindowsPhone

kNIMChatRoomClientTypeWeb 

Web

kNIMChatRoomClientTypeRestAPI 

RestAPI

kNIMChatRoomClientTypeMacOS 

Mac

◆ NIMChatRoomEnterStep

聊天室进入状态

Enumerator
kNIMChatRoomEnterStepInit 

本地服务初始化

kNIMChatRoomEnterStepServerConnecting 

服务器连接中

kNIMChatRoomEnterStepServerConnectOver 

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

kNIMChatRoomEnterStepRoomAuthing 

聊天室鉴权中

kNIMChatRoomEnterStepRoomAuthOver 

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

◆ NIMChatRoomExitReason

聊天室离开原因

Enumerator
kNIMChatRoomExitReasonExit 

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

kNIMChatRoomExitReasonRoomInvalid 

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

kNIMChatRoomExitReasonKickByManager 

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

kNIMChatRoomExitReasonKickByMultiSpot 

多端被踢

kNIMChatRoomExitReasonIllegalState 

当前链接状态异常

kNIMChatRoomExitReasonBeBlacklisted 

被加黑了

◆ NIMChatRoomGetMemberType

查询成员的成员类型

Enumerator
kNIMChatRoomGetMemberTypeSolid 

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

kNIMChatRoomGetMemberTypeTemp 

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

kNIMChatRoomGetMemberTypeSolidOL 

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

kNIMChatRoomGetMemberTypeTempOL 

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

◆ NIMChatRoomGuestFlag

成员类型

Enumerator
kNIMChatRoomGuestFlagNoGuest 

非游客

kNIMChatRoomGuestFlagGuest 

游客

◆ NIMChatRoomLinkCondition

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

Enumerator
kNIMChatRoomLinkConditionAlive 

链接正常

kNIMChatRoomLinkConditionDeadAndRetry 

链接失败,sdk尝试重链

kNIMChatRoomLinkConditionDead 

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

◆ NIMChatRoomLoginState

登录状态

Enumerator
kNIMChatRoomLoginStateLogin 

登录状态

kNIMChatRoomLoginStateUnLogin 

未登录状态

◆ NIMChatRoomMemberAttribute

设置成员的成员身份

Enumerator
kNIMChatRoomMemberAttributeAdminister 

管理员,operator必须是创建者

kNIMChatRoomMemberAttributeNomalMember 

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

kNIMChatRoomMemberAttributeBlackList 

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

kNIMChatRoomMemberAttributeMuteList 

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

◆ NIMChatRoomMsgType

聊天室消息类型

Enumerator
kNIMChatRoomMsgTypeText 

文本类型消息

kNIMChatRoomMsgTypeImage 

图片类型消息

kNIMChatRoomMsgTypeAudio 

声音类型消息

kNIMChatRoomMsgTypeVideo 

视频类型消息

kNIMChatRoomMsgTypeLocation 

位置类型消息

kNIMChatRoomMsgTypeNotification 

活动室通知

kNIMChatRoomMsgTypeFile 

文件类型消息

kNIMChatRoomMsgTypeRobot 

波特机器人消息

kNIMChatRoomMsgTypeTips 

提醒类型消息

kNIMChatRoomMsgTypeCustom 

自定义消息

kNIMChatRoomMsgTypeUnknown 

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

◆ NIMChatRoomNotificationId

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

Enumerator
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 

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

◆ NIMChatRoomOnlineState

在线状态

Enumerator
kNIMChatRoomOnlineStateOffline 

不在线

kNIMChatRoomOnlineStateOnline 

在线

◆ NIMChatRoomProxyType

代理类型

Enumerator
kNIMChatRoomProxyNone 

不使用代理

kNIMChatRoomProxyHttp11 

HTTP 1.1 Proxy(暂不支持)

kNIMChatRoomProxySocks4 

Socks4 Proxy

kNIMChatRoomProxySocks4a 

Socks4a Proxy

kNIMChatRoomProxySocks5 

Socks5 Proxy

Variable Documentation

◆ kChatRoomNotificationDataKeyExt

const char* kChatRoomNotificationDataKeyExt = "ext"
static

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

◆ kChatRoomNotificationDataKeyMemberInTempMutedDuration

const char* kChatRoomNotificationDataKeyMemberInTempMutedDuration = "muteTtl"
static

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

◆ 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 keys

◆ kChatRoomNotificationDataKeyTarget

const char* kChatRoomNotificationDataKeyTarget = "target"
static

string json array 被操作者的accid

◆ kChatRoomNotificationDataKeyTargetNick

const char* kChatRoomNotificationDataKeyTargetNick = "tarNick"
static

string json array 被操作者的nick列表

◆ kChatRoomNotificationDataKeyTempMutedFlag

const char* kChatRoomNotificationDataKeyTempMutedFlag = "tempMuted"
static

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

◆ kChatRoomNotificationDataKeyTempMuteDuration

const char* kChatRoomNotificationDataKeyTempMuteDuration = "muteDuration"
static

long 当通知为临时禁言相关时有该值,禁言时kNIMChatRoomNotificationIdMemberTempMute代表本次禁言的时长(秒),解禁时kNIMChatRoomNotificationIdMemberTempUnMute代表本次禁言剩余时长(秒); 其他通知事件不带该数据

◆ kChatRoomNotificationKeyData

const char* kChatRoomNotificationKeyData = "data"
static

string 通知内容

◆ kChatRoomNotificationKeyID

const char* kChatRoomNotificationKeyID = "id"
static

string 通知类型ID

◆ kNIMChatRoomEnterCallbackKeyMyInfo

const char* kNIMChatRoomEnterCallbackKeyMyInfo = "my_info"
static

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

◆ kNIMChatRoomEnterCallbackKeyRoomInfo

const char* kNIMChatRoomEnterCallbackKeyRoomInfo = "room_info"
static

json value, 见聊天室Info Json Keys

◆ 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,登录聊天室的密码非匿名模式下使用

◆ kNIMChatRoomGetMembersKeyLimit

const char* kNIMChatRoomGetMembersKeyLimit = "limit"
static

int 数量

◆ kNIMChatRoomGetMembersKeyOffset

const char* kNIMChatRoomGetMembersKeyOffset = "offset"
static

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

◆ kNIMChatRoomGetMembersKeyType

const char* kNIMChatRoomGetMembersKeyType = "type"
static

NIMChatRoomGetMemberType 成员类型

◆ 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 开始时间,单位毫秒

◆ 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中取

◆ kNIMChatRoomMemberInfoKeyOnlineState

const char* kNIMChatRoomMemberInfoKeyOnlineState = "online_state"
static

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

◆ kNIMChatRoomMemberInfoKeyRoomID

const char* kNIMChatRoomMemberInfoKeyRoomID = "room_id"
static

long 聊天室id

◆ kNIMChatRoomMemberInfoKeyTempMute

const char* kNIMChatRoomMemberInfoKeyTempMute = "temp_mute"
static

int 临时禁言

◆ kNIMChatRoomMemberInfoKeyTempMuteRestDuration

const char* kNIMChatRoomMemberInfoKeyTempMuteRestDuration = "temp_mute_rest_duration"
static

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

◆ kNIMChatRoomMemberInfoKeyType

const char* kNIMChatRoomMemberInfoKeyType = "type"
static

int 成员类型, -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

◆ kNIMChatRoomMsgKeyAntiSpamUsingYiDun

const char* kNIMChatRoomMsgKeyAntiSpamUsingYiDun = "anti_spam_using_yidun"
static

int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾而是通用反垃圾 其他都是按照原来的规则

◆ kNIMChatRoomMsgKeyAttach

const char* kNIMChatRoomMsgKeyAttach = "msg_attach"
static

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

◆ kNIMChatRoomMsgKeyBody

const char* kNIMChatRoomMsgKeyBody = "body"
static

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

◆ kNIMChatRoomMsgKeyClientMsgid

const char* kNIMChatRoomMsgKeyClientMsgid = "client_msg_id"
static

string,客户端消息id

◆ 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

◆ kNIMChatRoomMsgKeyResendFlag

const char* kNIMChatRoomMsgKeyResendFlag = "resend_flag"
static

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

◆ kNIMChatRoomMsgKeyRoomID

const char* kNIMChatRoomMsgKeyRoomID = "room_id"
static

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

◆ kNIMChatRoomMsgKeySubType

const char* kNIMChatRoomMsgKeySubType = "msg_sub_type"
static

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

◆ kNIMChatRoomMsgKeyThirdPartyCBEXT

const char* kNIMChatRoomMsgKeyThirdPartyCBEXT = "third_party_callback_ext"
static

(可选)string第三方回调回来的自定义扩展字段

◆ kNIMChatRoomMsgKeyTime

const char* kNIMChatRoomMsgKeyTime = "time"
static

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

◆ kNIMChatRoomMsgKeyType

const char* kNIMChatRoomMsgKeyType = "msg_type"
static

int, 消息类型(NIMChatRoomMsgType)

◆ kNIMChatRoomMsgKeyYiDunAntiCheating

const char* kNIMChatRoomMsgKeyYiDunAntiCheating = "yidun_anti_cheating"
static

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

◆ 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 变更元素的内容

◆ kNIMChatRoomQueueElementKey

const char* kNIMChatRoomQueueElementKey = "key"
static

string 元素key

◆ kNIMChatRoomQueueElementValue

const char* kNIMChatRoomQueueElementValue = "value"
static

string 元素value

◆ 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 更新时间戳 毫秒