7#ifndef WRAPPER_NIM_CHATROOM_CPP_WRAPPER_HELPER_NIM_CHATROOM_HELPER_H_
8#define WRAPPER_NIM_CHATROOM_CPP_WRAPPER_HELPER_NIM_CHATROOM_HELPER_H_
17#if !defined(_WIN32) && !defined(WIN32)
68 for (
auto& tag : login_tags) {
86 values_[kNIMChatRoomEnterLocationX] = location.
x_;
87 values_[kNIMChatRoomEnterLocationY] = location.
y_;
88 values_[kNIMChatRoomEnterLocationZ] = location.
z_;
89 values_[kNIMChatRoomEnterLocationDistance] = location.
distance_;
162 enable_location_ =
false;
172 std::string addr_str;
173 for (
auto& address : address_) {
176 std::string login_tags;
185 values[kNIMChatRoomEnterLocationX] = location_.
x_;
186 values[kNIMChatRoomEnterLocationY] = location_.
y_;
187 values[kNIMChatRoomEnterLocationZ] = location_.
z_;
188 values[kNIMChatRoomEnterLocationDistance] = location_.
distance_;
202 std::string addr_str;
204 for (
auto& address : address_) {
207 std::string login_tags;
216 values[kNIMChatRoomEnterLocationX] = location_.
x_;
217 values[kNIMChatRoomEnterLocationY] = location_.
y_;
218 values[kNIMChatRoomEnterLocationZ] = location_.
z_;
219 values[kNIMChatRoomEnterLocationDistance] = location_.
distance_;
235 location_.
x_ = values[kNIMChatRoomEnterLocationX].asFloat();
236 location_.
y_ = values[kNIMChatRoomEnterLocationY].asFloat();
237 location_.
z_ = values[kNIMChatRoomEnterLocationZ].asFloat();
238 location_.
distance_ = values[kNIMChatRoomEnterLocationDistance].asFloat();
244 address_.push_back(index->asString());
277 std::string addr_str;
278 for (
auto& address : address_) {
295 std::string addr_str;
297 for (
auto& address : address_) {
317 address_.push_back(iter->asString());
352 int online_count_{0};
456 : temp_mute_duration_(0)
475 temp_muted_ = (temp_mute_duration_ != 0);
495 temp_muted_ = (temp_mute_duration_ != 0);
515 std::string ToJsonString()
const {
521 for (
const auto& nick : target_nick_) {
524 for (
const auto&
id : target_ids_) {
531 if (!target_tag_.empty())
533 if (!msg_id_.empty()) {
551 for (
const auto& nick : target_nick_) {
554 for (
const auto&
id : target_ids_) {
561 if (!target_tag_.empty())
563 if (!msg_id_.empty()) {
579 : transient_(false) {}
580 std::string ToJsonString()
const {
583 if (!element_accid_.empty())
639 auto it = members_name.begin();
640 while (it != members_name.end()) {
679 : resend_flag_(false)
680 , anti_spam_enable_(false)
681 , history_save_(true)
682 , anti_spam_bizid_(
"")
683 , anti_spam_using_yidun_(1)
685 , yidun_anti_cheating_(
"")
708 std::string to_accids_str;
798 , third_party_callback_ext_(
"")
897 : timestamp_offset_(0)
924 : timestamp_offset_(0)
955 if (kMsg_Types_List.empty()) {
967 msg_types_.assign(kMsg_Types_List.begin(), kMsg_Types_List.end());
971 auto it = std::find_if(msg_types_.begin(), msg_types_.end(), [&](
const NIMChatRoomMsgType& item) {
974 if (it != msg_types_.end())
975 msg_types_.erase(it);
976 if (msg_types_.empty())
988 auto it = msg_types_.begin();
989 while (it != msg_types_.end()) {
997 static std::vector<NIMChatRoomMsgType> kMsg_Types_List;
1001 std::list<std::string> tags_;
1018 if (kMsg_Types_List.empty()) {
1030 msg_types_.assign(kMsg_Types_List.begin(), kMsg_Types_List.end());
1034 auto it = std::find_if(msg_types_.begin(), msg_types_.end(), [&](
const NIMChatRoomMsgType& item) {
1035 return item == type;
1037 if (it != msg_types_.end())
1038 msg_types_.erase(it);
1039 if (msg_types_.empty())
1050 for (
auto& tag : tags_)
1057 auto it = msg_types_.begin();
1058 while (it != msg_types_.end()) {
1066 static std::vector<NIMChatRoomMsgType> kMsg_Types_List;
1148 , is_blacklist_(false)
1151 , update_timetag_(0)
1152 , temp_muted_(false)
1153 , temp_muted_duration_(0) {}
1265 int need_notify_{0};
1293 ChatRoomInfo& room_info,
1294 ChatRoomMemberInfo& my_info);
1302NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API
bool ParseChatRoomMemberInfos(
const std::string& infos_json_str, std::list<ChatRoomMemberInfo>& infos);
1310NIM_CHATROOM_SDK_CPPWRAPPER_DLL_API
bool ParseChatRoomMsgs(
const std::string& msgs_json_str, std::list<ChatRoomMessage>& msgs);
1383 std::map<std::string, std::string> members_values_;
1387 : members_values_(members) {}
1398 for (
auto it = members_values_.begin(); it != members_values_.end(); ++it) {
Outputs a Value in JSON format without formatting (not human friendly).
Definition: writer.h:168
Represents a JSON value.
Definition: value.h:196
bool isMember(const char *key) const
Definition: json_value.cpp:1241
Members getMemberNames() const
Return a list of the member names.
Definition: json_value.cpp:1248
Value & append(const Value &value)
Append value to array at the end.
Definition: json_value.cpp:1142
String asString() const
Embedded zeroes are possible.
Definition: json_value.cpp:632
聊天室
Definition: nim_chatroom_def_include.h:17
std::list< ChatRoomQueueElement > ChatRoomQueue
聊天室麦序队列
Definition: nim_chatroom_helper.h:1271
std::list< RobotInfo > RobotInfos
机器人信息
Definition: nim_chatroom_helper.h:1362
bool ParseChatRoomMsgs(const std::string &msgs_json_str, std::list< ChatRoomMessage > &msgs)
解析聊天室成员信息
Definition: nim_chatroom_helper.cpp:41
bool ParseChatRoomEnterCallbackResultInfo(const std::string &result, ChatRoomInfo &room_info, ChatRoomMemberInfo &my_info)
解析聊天室登录结果
Definition: nim_chatroom_helper.cpp:17
bool ParseRobotInfosStringToRobotInfos(const std::string &infos_json, RobotInfos &infos)
解析机器人信息
Definition: nim_chatroom_helper.cpp:55
bool ParseBatchInfosStringToNotMembers(const std::string &infos_json, std::list< std::string > &lst_members)
解析成员列表
Definition: nim_chatroom_helper.cpp:84
bool ParseChatRoomMemberInfos(const std::string &infos_json_str, std::list< ChatRoomMemberInfo > &infos)
解析聊天室成员信息
Definition: nim_chatroom_helper.cpp:27
bool ParseRobotInfoStringToRobotInfo(const std::string &info_json, RobotInfo &info)
解析机器人信息
Definition: nim_chatroom_helper.cpp:69
bool operator==(const NIMChatRoomExitReasonInfo &info, NIMChatRoomExitReason code)
Definition: nim_chatroom_helper.cpp:13
bool ParseJsonValue(const std::string &content, nim_cpp_wrapper_util::Json::Value &values)
解析JsonString
Definition: nim_json_util.cpp:70
bool StrListToJsonString(const std::list< std::string > &list, std::string &out)
将一个string类型的list组装成一个Json Array
Definition: nim_json_util.cpp:12
bool JsonArrayStringToList(const std::string &array_str, std::list< std::string > &out)
将一个string类型的Json Array解析成一个string类型的list
Definition: nim_json_util.cpp:54
bool JsonStrArrayToList(const nim_cpp_wrapper_util::Json::Value &array_str, std::list< std::string > &out)
将一个string类型的Json Array解析成一个string类型的list
Definition: nim_json_util.cpp:30
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
static const char * kNIMChatRoomMsgKeyAntiSpamRes
String, 易盾反垃圾返回的结果字段
Definition: nim_chatroom_def.h:467
static const char * kNIMChatRoomMemberInfoKeyTag
string 聊天室成员所属的 tag 信息
Definition: nim_chatroom_def.h:605
static const char * kNIMChatRoomGetMembersKeyLimit
int 数量
Definition: nim_chatroom_def.h:686
static const char * kNIMChatRoomSetMemberAttributeKeyOpt
boolean: true:是,false:否
Definition: nim_chatroom_def.h:714
static const char * kNIMChatRoomMemberInfoKeyLevel
int 成员级别: >=0表示用户开发者可以自定义的级别
Definition: nim_chatroom_def.h:597
static const char * kNIMChatRoomSetMemberAttributeKeyAccoutID
string 成员ID
Definition: nim_chatroom_def.h:710
static const char * kNIMChatRoomGetMembersKeyTag
获取成员时指定的 tag
Definition: nim_chatroom_def.h:682
static const char * kNIMChatRoomMemberInfoKeyEnterTimetag
long 进入聊天室的时间点,对于离线成员该字段为空
Definition: nim_chatroom_def.h:613
static const char * kNIMChatRoomMsgKeyYiDunAntiCheating
(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024
Definition: nim_chatroom_def.h:459
static const char * kNIMChatRoomGetMembersKeyType
NIMChatRoomGetMemberType 成员类型
Definition: nim_chatroom_def.h:680
static const char * kChatRoomNotificationDataKeyExt
string 上层开发自定义的事件通知扩展字段, 必须为可以解析为Json的非格式化的字符串
Definition: nim_chatroom_def.h:727
static const char * kChatRoomNotificationDataKeyTags
string 当通知为 kNIMChatRoomNotificationIdMemberTagChanged 时,代表变更后的 tags 信息
Definition: nim_chatroom_def.h:753
static const char * kNIMChatRoomNotificationQueueChangedKeyType
string 变更类型,目前有OFFER,POLL,DROP,BATCH_UPDATE 类型
Definition: nim_chatroom_def.h:793
static const char * kChatRoomNotificationDataKeyMuteFlag
int 当通知为 kNIMChatRoomNotificationIdMemberIn才有,代表是否禁言状态,1:是 缺省或0:不是
Definition: nim_chatroom_def.h:739
static const char * kChatRoomNotificationDataKeyTarget
string json array 被操作者的accid
Definition: nim_chatroom_def.h:735
static const char * kNIMChatRoomEnterKeyAppKey
string, 应用appkey,匿名登录时必填
Definition: nim_chatroom_def.h:411
static const char * kNIMChatRoomEnterLoginExt
string, 登录自定义字段,用于提交给用户的第三方回调服务进行登录检测,不会同步给其他端
Definition: nim_chatroom_def.h:396
static const char * kNIMChatRoomMsgKeyType
int, 消息类型(NIMChatRoomMsgType)
Definition: nim_chatroom_def.h:433
static const char * kNIMChatRoomMemberInfoKeyMuted
int 是禁言用户
Definition: nim_chatroom_def.h:618
static const char * kNIMChatRoomMsgKeyHistorySave
int,(可选)该消息是否存储云端历史,可选,0:不是,1:是, 默认1
Definition: nim_chatroom_def.h:449
static const char * kNIMChatRoomInfoKeyQueuelevel
int, 队列管理权限:0:所有人都有权限变更队列,1:只有主播管理员才能操作变更
Definition: nim_chatroom_def.h:574
static const char * kNIMRobotInfoKeyAccid
string 帐号
Definition: nim_chatroom_def.h:877
static const char * kChatRoomNotificationDataKeyTempMuteDuration
long 当通知为临时禁言相关时有该值,禁言时kNIMChatRoomNotificationIdMemberTempMute代表本次禁言的时长(秒)
Definition: nim_chatroom_def.h:737
static const char * kChatRoomNotificationKeyData
string 通知内容
Definition: nim_chatroom_def.h:723
NIMChatRoomMemberAttribute
Definition: nim_chatroom_def.h:669
NIMChatRoomGetMemberType
Definition: nim_chatroom_def.h:657
NIMChatRoomOnlineState
Definition: nim_chatroom_def.h:645
@ kNIMChatRoomOnlineStateOffline
Definition: nim_chatroom_def.h:646
static const char * kNIMChatRoomMsgKeyExt
string, 第三方扩展字段, 长度限制4096, 必须为可以解析为Json的非格式化的字符串
Definition: nim_chatroom_def.h:441
NIMChatRoomGuestFlag
Definition: nim_chatroom_def.h:651
@ kNIMChatRoomGuestFlagGuest
Definition: nim_chatroom_def.h:653
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyKey
string 变更元素的key
Definition: nim_chatroom_def.h:807
static const char * kNIMChatRoomGetMsgHistoryKeyEndTime
long 结束时间,单位毫秒
Definition: nim_chatroom_def.h:697
static const char * kNIMChatRoomMsgKeyRoomID
long, 消息所属的聊天室id,服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:481
static const char * kNIMChatRoomMemberInfoKeyRoomID
long 聊天室id
Definition: nim_chatroom_def.h:591
static const char * kNIMChatRoomQueueElementValue
string 元素value
Definition: nim_chatroom_def.h:763
static const char * kNIMChatRoomMsgKeyBody
string,(可选)文本消息内容(聊天室机器人文本消息)
Definition: nim_chatroom_def.h:453
static const char * kNIMChatRoomEnterNotifyTags
string 登录登出通知的目标标签
Definition: nim_chatroom_def.h:392
static const char * kNIMChatRoomNotificationQueueChangedKeyKey
string 变更元素的key
Definition: nim_chatroom_def.h:795
static const char * kNIMChatRoomMsgKeyNotifyTags
(可选)String 消息的目标标签表达式,参见TagPattern和TagCalculator v8.4.0 新增
Definition: nim_chatroom_def.h:463
static const char * kNIMChatRoomMemberInfoKeyUpdateTimetag
long 固定成员的记录更新时间,用于固定成员列表的排列查询
Definition: nim_chatroom_def.h:622
static const char * kNIMChatRoomMsgKeyAntiSpamExt
(可选)String, 易盾反垃圾扩展字段,限制json,长度限制1024
Definition: nim_chatroom_def.h:465
static const char * kChatRoomNotificationDataKeyMemberInTempMutedDuration
long 当通知为 kNIMChatRoomNotificationIdMemberIn,代表临时禁言时长(秒), 其他通知事件不带该数据
Definition: nim_chatroom_def.h:743
static const char * kNIMChatRoomMsgKeyLocationY
(可选)int, 位置信息 Y 轴坐标
Definition: nim_chatroom_def.h:471
static const char * kNIMChatRoomMsgKeyFromClientType
int,消息发送方客户端类型(NIMChatRoomClientType),服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:487
static const char * kNIMChatRoomInfoKeyBroadcastUrl
string, 视频直播拉流地址
Definition: nim_chatroom_def.h:562
static const char * kNIMRobotInfoKeyRobotId
string 机器人ID
Definition: nim_chatroom_def.h:885
static const char * kNIMChatRoomNotificationQueueChangedKeyValue
string 变更元素的内容
Definition: nim_chatroom_def.h:797
static const char * kNIMChatRoomMemberInfoKeyNick
string 聊天室内的昵称字段,预留字段, 可从Uinfo中取
Definition: nim_chatroom_def.h:599
static const char * kNIMChatRoomMsgKeyHighPriorityFlag
int, 高优先级消息标记,1:是; 非高优先级消息不带该字段,服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:495
static const char * kNIMChatRoomMemberInfoKeyNotifyTags
string 聊天室成员登录时指定的 notify_tags 信息
Definition: nim_chatroom_def.h:607
static const char * kNIMChatRoomInfoKeyOnlineCount
int, 当前在线用户数量
Definition: nim_chatroom_def.h:570
static const char * kNIMChatRoomEnterKeyAvatar
string, (匿名登录时必填)设置后通过获取聊天室成员信息接口可以获取该数据
Definition: nim_chatroom_def.h:384
static const char * kNIMRobotInfoKeyIcon
string 头像
Definition: nim_chatroom_def.h:881
static const char * kNIMChatRoomEnterKeyNick
string, (匿名登录时必填)进入聊天室后展示的昵称,选填,聊天室成员收到聊天室进入通知中可以获取该数据
Definition: nim_chatroom_def.h:382
static const char * kNIMChatRoomInfoKeyName
string, 聊天室名称
Definition: nim_chatroom_def.h:558
static const char * kNIMChatRoomEnterKeyRandomID
int,是否开启随机ID模式,默认为关闭(0),建议默认值
Definition: nim_chatroom_def.h:421
NIMChatRoomClientType
Definition: nim_chatroom_def.h:531
@ kNIMChatRoomClientTypeDefault
Definition: nim_chatroom_def.h:532
static const char * kNIMChatRoomEnterKeyAccID
string,登录聊天室的账号非匿名模式下使用
Definition: nim_chatroom_def.h:423
static const char * kNIMChatRoomEnterKeyExt
string, 聊天室可用的扩展字段,必须为可以解析为Json的非格式化的字符串,选填,设置后通过获取聊天室成员信息接口可以获取该数据
Definition: nim_chatroom_def.h:386
static const char * kChatRoomNotificationDataKeyMsgId
string 当通知为 kNIMChatRoomNotificationIdRecallMessage,代表被撤回消息的消息 ID
Definition: nim_chatroom_def.h:751
static const char * kNIMChatRoomMemberInfoKeyValid
int 记录有效标记位
Definition: nim_chatroom_def.h:620
static const char * kNIMChatRoomMemberInfoKeyBlacklist
int 是黑名单
Definition: nim_chatroom_def.h:616
static const char * kNIMChatRoomGetMsgHistoryKeyMsgtypes
array:数组 要查询的消息类型,取值NIMChatRoomMsgType中所枚举类型
Definition: nim_chatroom_def.h:703
static const char * kNIMChatRoomEnterAuthType
int 鉴权方式,0表示最初的loginToken的校验方式,1表示基于appSecret计算的token鉴权方式,2表示基于第三方回调的token鉴权方式,默认0
Definition: nim_chatroom_def.h:394
static const char * kNIMChatRoomMsgKeyFromAvatar
string, 消息发送方头像,服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:491
static const char * kNIMChatRoomMsgKeyAntiSpamContent
string, (可选)开发者自定义的反垃圾字段, 长度限制2048
Definition: nim_chatroom_def.h:445
static const char * kNIMChatRoomMsgKeyEnvConfig
(可选)String, 自定义抄送配置 v8.0.0 新增
Definition: nim_chatroom_def.h:461
static const char * kNIMChatRoomMsgKeyLocalFilePath
string, 暂时不用,多媒体消息资源本地绝对路径,SDK本地维护,发送多媒体消息时必填
Definition: nim_chatroom_def.h:499
static const char * kNIMChatRoomMemberInfoKeyTempMute
int 临时禁言
Definition: nim_chatroom_def.h:624
static const char * kNIMRobotInfoKeyIntro
string 介绍
Definition: nim_chatroom_def.h:883
static const char * kNIMChatRoomQueueElementKey
string 元素key
Definition: nim_chatroom_def.h:761
static const char * kNIMChatRoomGetMsgHistoryKeyTags
array 查询历史消息指定的 tags
Definition: nim_chatroom_def.h:693
static const char * kNIMChatRoomGetMsgHistoryKeyLimit
int 本次返回的消息数量
Definition: nim_chatroom_def.h:699
NIMChatRoomMsgType
Definition: nim_chatroom_def.h:516
@ kNIMChatRoomMsgTypeImage
Definition: nim_chatroom_def.h:518
@ kNIMChatRoomMsgTypeTips
Definition: nim_chatroom_def.h:525
@ kNIMChatRoomMsgTypeCustom
Definition: nim_chatroom_def.h:526
@ kNIMChatRoomMsgTypeText
Definition: nim_chatroom_def.h:517
@ kNIMChatRoomMsgTypeFile
Definition: nim_chatroom_def.h:523
@ kNIMChatRoomMsgTypeLocation
Definition: nim_chatroom_def.h:521
@ kNIMChatRoomMsgTypeNotification
Definition: nim_chatroom_def.h:522
@ kNIMChatRoomMsgTypeAudio
Definition: nim_chatroom_def.h:519
@ kNIMChatRoomMsgTypeRobot
Definition: nim_chatroom_def.h:524
@ kNIMChatRoomMsgTypeVideo
Definition: nim_chatroom_def.h:520
@ kNIMChatRoomMsgTypeUnknown
Definition: nim_chatroom_def.h:527
static const char * kNIMChatRoomMsgKeyResendFlag
int,消息重发标记位,第一次发送0,重发1
Definition: nim_chatroom_def.h:439
static const char * kNIMChatRoomEnterLoginTags
string array 登录标签,可以设置多个,json array 格式,例子:["tag1", "tag2"]
Definition: nim_chatroom_def.h:390
static const char * kNIMChatRoomEnterKeyAppDataPath
Definition: nim_chatroom_def.h:415
static const char * kNIMChatRoomMemberInfoKeyExt
string 开发者扩展字段, 长度限制2k, 必须为可以解析为Json的非格式化的字符串
Definition: nim_chatroom_def.h:603
NIMChatRoomExitReason
Definition: nim_chatroom_def.h:578
static const char * kNIMChatRoomEnterEnableLocation
int 登录时使用的位置信息
Definition: nim_chatroom_def.h:400
static const char * kNIMChatRoomMsgKeyAntiSpamUsingYiDun
int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾而是通用反垃圾 其他都是按照原来的规则
Definition: nim_chatroom_def.h:451
static const char * kNIMRobotInfoKeyName
string 名字
Definition: nim_chatroom_def.h:879
static const char * kChatRoomNotificationDataKeyMsgTimetag
int64_t 当通知为 kNIMChatRoomNotificationIdRecallMessage,代表被撤回消息的消息时间戳
Definition: nim_chatroom_def.h:749
static const char * kNIMChatRoomInfoKeyAnnouncement
string, 聊天室公告
Definition: nim_chatroom_def.h:560
static const char * kNIMChatRoomMsgKeyAntiSpamBizId
string, (可选)用户配置的对某些单条消息另外的反垃圾的业务ID
Definition: nim_chatroom_def.h:447
static const char * kNIMChatRoomMsgKeyThirdPartyCBEXT
(可选)string第三方回调回来的自定义扩展字段 v7.8 新增
Definition: nim_chatroom_def.h:455
static const char * kChatRoomNotificationDataKeyOptNick
string 操作者的账号nick
Definition: nim_chatroom_def.h:731
static const char * kNIMChatRoomQueueOfferOptionTransient
bool (可选参数)true 表示当提交这个新元素的用户从聊天室掉线或退出的时候,需要删除这个元素;默认 false 表示不删除
Definition: nim_chatroom_def.h:771
static const char * kNIMChatRoomMsgKeyToAccids
(可选)string, json array,消息接受者,如果设置了本字段,且不为空,则本消息为聊天室定向消息(聊天室定向消息不会存历史)
Definition: nim_chatroom_def.h:475
static const char * kNIMChatRoomEnterKeyLogLevel
int,匿名登录时选填,定义见NIMSDKLogLevel(选填,SDK默认的内置级别为kNIMSDKLogLevelPro)
Definition: nim_chatroom_def.h:417
static const char * kNIMChatRoomSetMemberAttributeKeyAttribute
NIMChatRoomMemberAttribute.
Definition: nim_chatroom_def.h:712
static const char * kNIMChatRoomQueueOfferOptionElementAccId
string (可选参数)队列元素所属账号,默认不传表示队列元素属于当前操作人,管理员可以指定队列元素归属于其他合法账号
Definition: nim_chatroom_def.h:773
static const char * kChatRoomNotificationDataKeyTargetTag
string 当通知为 kChatRoomNotificationIdTagTempMuteAdd 或 kChatRoomNotificationIdTagTempMuteRemove,代表被禁言的目标...
Definition: nim_chatroom_def.h:747
static const char * kNIMRobotInfoKeyCreateTime
long 创建时间戳 毫秒
Definition: nim_chatroom_def.h:887
static const char * kNIMChatRoomMemberInfoKeyType
成员类型, -1:受限用户; 0:普通;1:创建者;2:管理员;3:临时用户,非固定成员;4:匿名非注册用户,非云信注册用户
Definition: nim_chatroom_def.h:595
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyValue
string 变更元素的内容
Definition: nim_chatroom_def.h:809
static const char * kNIMChatRoomEnterKeyAddress
string array,聊天室地址,地址通过应用服务器接口获取
Definition: nim_chatroom_def.h:419
static const char * kNIMChatRoomMemberInfoKeyTempMuteRestDuration
long 临时禁言的解除时长,单位秒
Definition: nim_chatroom_def.h:626
static const char * kNIMChatRoomMsgKeyLocalResId
string, 暂时不用,多媒体资源id,发送方选填,接收方收到的是客户端消息id
Definition: nim_chatroom_def.h:501
static const char * kNIMChatRoomMsgKeySubType
(可选)int,消息的子类型,客户端定义,服务器透传
Definition: nim_chatroom_def.h:457
static const char * kNIMChatRoomMemberInfoKeyOnlineState
NIMChatRoomOnlineState 成员是否处于在线状态, 仅特殊成员才可能离线, 对游客/匿名用户而言只能是在线
Definition: nim_chatroom_def.h:609
static const char * kNIMChatRoomSetMemberAttributeKeyNotifyExt
string 自定义的事件通知扩展字段, 必须为可以解析为Json的非格式化的字符串
Definition: nim_chatroom_def.h:716
static const char * kNIMChatRoomMsgKeyAttach
string, 消息内容,长度限制2048, 如果约定的是json字符串,必须为可以解析为json的非格式化的字符串
Definition: nim_chatroom_def.h:435
static const char * kNIMRobotInfoKeyUpdateTime
long 更新时间戳 毫秒
Definition: nim_chatroom_def.h:889
NIMChatRoomNotificationId
Definition: nim_chatroom_def.h:816
@ kNIMChatRoomNotificationIdQueueBatchOffer
聊天室麦序队列中有批量增加通知消息 "ext" :{"_e":"BATCH_OFFER","elements":[{"nick":"ddd","accid":"ljmt",...
Definition: nim_chatroom_def.h:841
@ kNIMChatRoomNotificationIdMemberTempUnMute
Definition: nim_chatroom_def.h:831
@ kNIMChatRoomNotificationIdMemberTagChanged
聊天室中有成员 tags 变更
Definition: nim_chatroom_def.h:843
@ kNIMChatRoomNotificationIdQueueBatchChanged
Definition: nim_chatroom_def.h:836
@ kNIMChatRoomNotificationIdTagTempMuteAdd
Definition: nim_chatroom_def.h:837
@ kNIMChatRoomNotificationIdMemberTempMute
Definition: nim_chatroom_def.h:830
@ kNIMChatRoomNotificationIdQueueChanged
Definition: nim_chatroom_def.h:833
@ kNIMChatRoomNotificationIdMemberIn
Definition: nim_chatroom_def.h:817
@ kNIMChatRoomNotificationIdTagTempMuteRemove
Definition: nim_chatroom_def.h:838
@ kNIMChatRoomNotificationIdRecallMessage
Definition: nim_chatroom_def.h:839
static const char * kNIMChatRoomEnterKeyToken
string,登录聊天室的密码非匿名模式下使用
Definition: nim_chatroom_def.h:425
static const char * kNIMChatRoomMemberInfoKeyAvatar
string 聊天室内的头像,预留字段, 可从Uinfo中取icon
Definition: nim_chatroom_def.h:601
static const char * kNIMChatRoomMsgKeyLocationX
(可选)int, 位置信息 X 轴坐标
Definition: nim_chatroom_def.h:469
static const char * kNIMChatRoomInfoKeyValidFlag
int, 聊天室有效标记, 1:有效,0:无效
Definition: nim_chatroom_def.h:566
static const char * kChatRoomNotificationDataKeyOpt
string 操作者的账号accid
Definition: nim_chatroom_def.h:729
static const char * kChatRoomNotificationDataKeyTargetNick
string json array 被操作者的nick列表
Definition: nim_chatroom_def.h:733
static const char * kNIMChatRoomInfoKeyExt
string, 第三方扩展字段, 必须为可以解析为Json的非格式化的字符串, 长度4k
Definition: nim_chatroom_def.h:568
static const char * kNIMChatRoomMsgKeyTime
long, 消息发送的时间戳(毫秒),服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:485
static const char * kNIMChatRoomGetMsgHistoryKeyStartTime
long 开始时间,单位毫秒
Definition: nim_chatroom_def.h:695
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyObject
map 变更元素的内容
Definition: nim_chatroom_def.h:811
static const char * kNIMChatRoomInfoKeyMuteAll
int, 聊天室禁言标志 1:禁言,0:解除禁言
Definition: nim_chatroom_def.h:572
static const char * kNIMChatRoomNotificationQueueBatchChangedKeyType
string 变更类型,目前有OFFER,POLL,DROP,PARTCLEAR四个类型
Definition: nim_chatroom_def.h:805
static const char * kNIMChatRoomGetMsgHistoryKeyReverse
boolean: true:按时间正序起查,正序排列,false:按时间逆序起查,逆序排列
Definition: nim_chatroom_def.h:701
static const char * kChatRoomNotificationDataKeyTempMutedFlag
int 当通知为 kNIMChatRoomNotificationIdMemberIn才有,代表是否临时禁言状态,1:是 缺省或0:不是
Definition: nim_chatroom_def.h:741
static const char * kNIMChatRoomMemberInfoKeyGuestFlag
NIMChatRoomGuestFlag 是否是普通游客类型,0:不是游客,1:是游客; 游客身份在聊天室中没有持久化, 只有在线时才会有内存状态
Definition: nim_chatroom_def.h:611
static const char * kNIMChatRoomEnterKeyNotifyExt
string, 进入聊天室通知开发者扩展字段,必须为可以解析为Json的非格式化的字符串,选填,聊天室成员收到聊天室进入通知中可以获取该数据
Definition: nim_chatroom_def.h:388
static const char * kNIMChatRoomMsgKeyAntiSpamEnable
int, 是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0
Definition: nim_chatroom_def.h:443
static const char * kNIMChatRoomMsgKeyClientMsgid
string,客户端消息id
Definition: nim_chatroom_def.h:437
static const char * kNIMChatRoomMsgKeyLocationZ
(可选)int, 位置信息 Z 轴坐标
Definition: nim_chatroom_def.h:473
static const char * kNIMChatRoomMemberInfoKeyAccID
string 成员账号
Definition: nim_chatroom_def.h:593
static const char * kNIMChatRoomMsgKeyFromAccount
string, 消息发送者的账号,服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:483
static const char * kNIMChatRoomEnterAntiSpamBusinessID
string, 反垃圾相关业务id
Definition: nim_chatroom_def.h:398
static const char * kNIMChatRoomMsgKeyFromExt
string, 消息发送方身份扩展字段,服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:493
static const char * kNIMChatRoomInfoKeyCreatorID
string, 聊天室创建者账号
Definition: nim_chatroom_def.h:564
static const char * kNIMChatRoomGetMembersKeyOffset
long 时间戳,填0会使用当前服务器最新时间开始查询,即第一页
Definition: nim_chatroom_def.h:684
static const char * kChatRoomNotificationKeyID
string 通知类型ID
Definition: nim_chatroom_def.h:725
static const char * kNIMChatRoomInfoKeyID
long, 聊天室ID
Definition: nim_chatroom_def.h:556
static const char * kChatRoomNotificationDataKeyQueueChange
string 当通知为 kNIMChatRoomNotificationIdQueueChange,代表队列变更具体内容,内容解析 参考麦序队列变更通知扩展字段queueChange
Definition: nim_chatroom_def.h:745
static const char * kNIMChatRoomMsgKeyFromNick
string, 消息发送方昵称,服务器填写,发送方不需要填写
Definition: nim_chatroom_def.h:489
nim chatroom 公共数据类型定义总的包含文件
Definition: nim_chatroom_def.h:16
float z_
位置信息 z 坐标
Definition: nim_chatroom_def.h:22
float x_
位置信息 x 坐标
Definition: nim_chatroom_def.h:18
float distance_
距离信息,仅在更新位置信息时会用到,发送消息、加入房间不需要填写
Definition: nim_chatroom_def.h:24
float y_
位置信息 y 坐标
Definition: nim_chatroom_def.h:20
Definition: nim_chatroom_helper.h:250
std::string app_key_
应用appkey,匿名登录时必填
Definition: nim_chatroom_helper.h:258
void ParseJsonValue(const nim_cpp_wrapper_util::Json::Value &values)
解析Json Value
Definition: nim_chatroom_helper.h:313
nim_cpp_wrapper_util::Json::Value ToJsonObject() const
组装Json Value
Definition: nim_chatroom_helper.h:293
std::list< std::string > address_
聊天室地址,地址通过应用服务器接口获取
Definition: nim_chatroom_helper.h:252
std::string app_data_file_
应用数据目录,匿名登录时必填,使用默认路径时只需传入单个目录名(不以反斜杠结尾),使用自定义路径时需传入完整路径(以反斜杠结尾,并确保有正确的读写权限!)
Definition: nim_chatroom_helper.h:254
bool random_id_
是否开启随机ID模式,默认为关闭(false),建议默认值
Definition: nim_chatroom_helper.h:260
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:275
std::string token_
登录聊天室的密码
Definition: nim_chatroom_helper.h:264
std::string accid_
使用自定义用户 ID,一旦指定,SDK 不会自动生成随机 ID,random 参数将无效
Definition: nim_chatroom_helper.h:262
int sdk_log_level_
匿名登录时选填,定义见NIMSDKLogLevel(选填,SDK默认的内置级别为kNIMSDKLogLevelPro)
Definition: nim_chatroom_helper.h:256
聊天室批量更新成员
Definition: nim_chatroom_helper.h:1382
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:1395
ChatRoomBatchMembers()
Definition: nim_chatroom_helper.h:1385
聊天室登录信息
Definition: nim_chatroom_helper.h:31
void SetAuthType(int auth_type)
设置鉴权方式
Definition: nim_chatroom_helper.h:104
void SetNotifyExt(const nim_cpp_wrapper_util::Json::Value ¬ify_ext)
设置进入聊天室通知开发者扩展字段,选填
Definition: nim_chatroom_helper.h:58
void EnableLocation(bool enable)
是否启用聊天室空间位置信息功能,启用后 SetLocation 功能才生效,否则 SDK 不解析 Location 信息
Definition: nim_chatroom_helper.h:97
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:124
void SetLocation(NIMChatRoomLocation location)
登录聊天室时传递的位置信息
Definition: nim_chatroom_helper.h:85
void SetNick(const std::string &nick)
设置进入聊天室后展示的昵称,选填
Definition: nim_chatroom_helper.h:37
void SetLoginExt(const std::string &login_ext)
登录自定义字段
Definition: nim_chatroom_helper.h:111
void SetExt(const nim_cpp_wrapper_util::Json::Value &ext)
设置聊天室可用的扩展字段,选填
Definition: nim_chatroom_helper.h:51
void SetNotifyTags(const std::string &expression)
登录时携带的 notify tag 表达式
Definition: nim_chatroom_helper.h:78
void SetLoginTag(const std::list< std::string > &login_tags)
设置登录携带的 tag 列表,允许多个
Definition: nim_chatroom_helper.h:67
void SetAvatar(const std::string &avatar)
设置进入聊天室后展示的头像,选填
Definition: nim_chatroom_helper.h:44
根据 tag 获取聊天室成员参数
Definition: nim_chatroom_helper.h:914
int limit_
数量
Definition: nim_chatroom_helper.h:920
std::string tag_
成员 tag
Definition: nim_chatroom_helper.h:916
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:931
int64_t timestamp_offset_
成员时间戳偏移量
Definition: nim_chatroom_helper.h:918
ChatRoomGetMembersByTagParameters()
Definition: nim_chatroom_helper.h:923
获取聊天室成员参数
Definition: nim_chatroom_helper.h:887
int64_t timestamp_offset_
成员时间戳偏移量
Definition: nim_chatroom_helper.h:891
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:904
ChatRoomGetMembersParameters()
Definition: nim_chatroom_helper.h:896
NIMChatRoomGetMemberType type_
成员类型
Definition: nim_chatroom_helper.h:889
int limit_
数量
Definition: nim_chatroom_helper.h:893
Definition: nim_chatroom_helper.h:1000
int64_t start_timetag_
开始时间,单位毫秒
Definition: nim_chatroom_helper.h:1003
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:1046
std::vector< NIMChatRoomMsgType > msg_types_
类型
Definition: nim_chatroom_helper.h:1011
ChatRoomGetMsgHistoryByTagsParameters()
Definition: nim_chatroom_helper.h:1013
int64_t end_timetag_
结束时间
Definition: nim_chatroom_helper.h:1005
bool reverse_
是否反向查询
Definition: nim_chatroom_helper.h:1009
int limit_
本次返回的消息数量
Definition: nim_chatroom_helper.h:1007
获取聊天室消息历史参数
Definition: nim_chatroom_helper.h:941
int limit_
本次返回的消息数量
Definition: nim_chatroom_helper.h:945
ChatRoomGetMsgHistoryParameters()
Definition: nim_chatroom_helper.h:951
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:983
int64_t start_timetag_
开始时间,单位毫秒
Definition: nim_chatroom_helper.h:943
bool reverse_
是否反向查询
Definition: nim_chatroom_helper.h:947
std::vector< NIMChatRoomMsgType > msg_types_
类型
Definition: nim_chatroom_helper.h:949
Definition: nim_chatroom_helper.h:131
std::list< std::string > address_
聊天室地址,地址通过应用服务器接口获取
Definition: nim_chatroom_helper.h:133
std::string login_ext_
登录自定义字段
Definition: nim_chatroom_helper.h:155
bool enable_location_
是否启用空间消息能力,true 为启用,false 为关闭,SDK 不解析 location 相关信息
Definition: nim_chatroom_helper.h:151
NIMChatRoomLocation location_
位置坐标描述
Definition: nim_chatroom_helper.h:149
std::string anti_spam_business_id_
反垃圾相关业务id
Definition: nim_chatroom_helper.h:157
std::list< std::string > login_tags_
登录标签,可以设置多个
Definition: nim_chatroom_helper.h:145
std::string app_data_file_
应用数据目录
Definition: nim_chatroom_helper.h:135
std::string token_
登录聊天室的密码
Definition: nim_chatroom_helper.h:143
std::string accid_
登录聊天室的账号
Definition: nim_chatroom_helper.h:141
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:170
int sdk_log_level_
匿名登录时选填,定义见NIMSDKLogLevel(选填,SDK默认的内置级别为kNIMSDKLogLevelPro)
Definition: nim_chatroom_helper.h:137
std::string app_key_
应用appkey,匿名登录时必填
Definition: nim_chatroom_helper.h:139
nim_cpp_wrapper_util::Json::Value ToJsonObject() const
组装Json Value
Definition: nim_chatroom_helper.h:200
std::string notify_tags_
登录登出通知的目标标签
Definition: nim_chatroom_helper.h:147
int auth_type_
鉴权方式,0表示最初的loginToken的校验方式,1表示基于appSecret计算的token鉴权方式,2表示基于第三方回调的token鉴权方式,默认0
Definition: nim_chatroom_helper.h:153
聊天室信息
Definition: nim_chatroom_helper.h:336
ChatRoomInfo()
Definition: nim_chatroom_helper.h:358
std::string announcement_
聊天室公告
Definition: nim_chatroom_helper.h:342
nim_cpp_wrapper_util::Json::Value ToJsonObject() const
组装Json Value
Definition: nim_chatroom_helper.h:405
std::string ext_
第三方扩展字段, 必须为可以解析为json的非格式化的字符串, 长度4k
Definition: nim_chatroom_helper.h:350
int64_t id_
聊天室ID
Definition: nim_chatroom_helper.h:338
std::string name_
聊天室名称
Definition: nim_chatroom_helper.h:340
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:386
std::string broadcast_url_
视频直播拉流地址
Definition: nim_chatroom_helper.h:344
void ParseFromJsonValue(const nim_cpp_wrapper_util::Json::Value &values)
从JsonValue中解析得到聊天室信息
Definition: nim_chatroom_helper.h:369
std::string creator_id_
聊天室创建者账号
Definition: nim_chatroom_helper.h:346
聊天室成员信息
Definition: nim_chatroom_helper.h:1103
std::string account_id_
成员账号
Definition: nim_chatroom_helper.h:1107
int64_t enter_timetag_
进入聊天室的时间点,对于离线成员该字段为空
Definition: nim_chatroom_helper.h:1127
bool is_muted_
是禁言用户
Definition: nim_chatroom_helper.h:1131
std::string avatar_
聊天室内的头像,预留字段, 可从Uinfo中取icon
Definition: nim_chatroom_helper.h:1117
bool temp_muted_
临时禁言
Definition: nim_chatroom_helper.h:1137
int64_t room_id_
聊天室id
Definition: nim_chatroom_helper.h:1105
void ParseFromJsonValue(const nim_cpp_wrapper_util::Json::Value &value)
Definition: nim_chatroom_helper.h:1156
bool is_blacklist_
是黑名单
Definition: nim_chatroom_helper.h:1129
NIMChatRoomOnlineState state_
成员是否处于在线状态, 仅特殊成员才可能离线, 对游客/匿名用户而言只能是在线
Definition: nim_chatroom_helper.h:1123
std::string nick_
聊天室内的昵称字段,预留字段, 可从Uinfo中取
Definition: nim_chatroom_helper.h:1115
int type_
成员类型, -2:未设置;-1:受限用户; 0:普通;1:创建者;2:管理员;3:临时用户,非固定成员;4:匿名非注册用户,非云信注册用户
Definition: nim_chatroom_helper.h:1111
NIMChatRoomGuestFlag guest_flag_
是否是普通游客类型,0:不是游客,1:是游客; 游客身份在聊天室中没有持久化, 只有在线时才会有内存状态
Definition: nim_chatroom_helper.h:1125
std::string ext_
开发者扩展字段, 长度限制2k, 必须为可以解析为json的非格式化的字符串
Definition: nim_chatroom_helper.h:1119
int64_t temp_muted_duration_
临时禁言的解除时长,单位秒
Definition: nim_chatroom_helper.h:1139
std::string tags_
聊天室成员登录时指定的 tag 信息
Definition: nim_chatroom_helper.h:1109
std::string notify_tags_
聊天室成员登录时指定的 notify_tags 信息
Definition: nim_chatroom_helper.h:1121
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:1199
ChatRoomMemberInfo()
Definition: nim_chatroom_helper.h:1141
int level_
成员级别: >=0表示用户开发者可以自定义的级别
Definition: nim_chatroom_helper.h:1113
int64_t update_timetag_
固定成员的记录更新时间,用于固定成员列表的排列查询
Definition: nim_chatroom_helper.h:1135
nim_cpp_wrapper_util::Json::Value ToJsonObject() const
组装Json Value
Definition: nim_chatroom_helper.h:1226
bool is_valid_
记录有效标记位
Definition: nim_chatroom_helper.h:1133
聊天室消息
Definition: nim_chatroom_helper.h:745
int64_t timetag_
消息发送的时间戳(毫秒),服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:752
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:835
std::string msg_body_
文本消息内容(聊天室机器人文本消息)
Definition: nim_chatroom_helper.h:780
std::string from_ext_
发送方身份扩展字段,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:760
ChatRoomMessage()
Definition: nim_chatroom_helper.h:794
std::string from_id_
消息发送者的账号,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:750
void ParseFromJsonValue(const nim_cpp_wrapper_util::Json::Value &values)
从JsonValue中解析得到聊天室消息
Definition: nim_chatroom_helper.h:806
std::string local_res_id_
媒体文件ID(客户端)
Definition: nim_chatroom_helper.h:791
int64_t room_id_
消息所属的聊天室id,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:748
nim_cpp_wrapper_util::Json::Value ToJsonObject() const
组装Json Value
Definition: nim_chatroom_helper.h:862
int32_t sub_type_
消息的子类型,客户端定义,服务器透传
Definition: nim_chatroom_helper.h:785
std::string msg_attach_
消息内容,长度限制2048,json结构, 文本消息和其他消息保持一致
Definition: nim_chatroom_helper.h:776
NIMChatRoomClientType from_client_type_
消息发送方客户端类型,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:754
ChatRoomMessageSetting msg_setting_
消息属性设置
Definition: nim_chatroom_helper.h:782
std::string notify_tags_
对端发送消息或通知时携带的 notify tags 信息
Definition: nim_chatroom_helper.h:767
std::string anti_spam_res_
String, 易盾反垃圾返回的结果字段
Definition: nim_chatroom_helper.h:770
std::string client_msg_id_
客户端消息id
Definition: nim_chatroom_helper.h:778
std::string local_res_path_
媒体文件本地绝对路径(客户端)
Definition: nim_chatroom_helper.h:789
std::string third_party_callback_ext_
第三方回调回来的自定义扩展字段
Definition: nim_chatroom_helper.h:763
std::string from_nick_
发送方昵称,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:756
std::string from_avatar_
发送方头像,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:758
聊天室消息属性设置
Definition: nim_chatroom_helper.h:650
bool history_save_
(可选)是否存云端消息历史,默认存
Definition: nim_chatroom_helper.h:660
int anti_spam_using_yidun_
(可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾而是通用反垃圾,其他都是按照原来的规则
Definition: nim_chatroom_helper.h:664
std::string anti_spam_bizid_
(可选)用户配置的对某些单条消息另外的反垃圾的业务ID
Definition: nim_chatroom_helper.h:662
void ToJsonValue(nim_cpp_wrapper_util::Json::Value &message) const
组装Json Value字符串
Definition: nim_chatroom_helper.h:694
std::string anti_spam_ext_
(可选)String, 易盾反垃圾扩展字段,限制json,长度限制1024
Definition: nim_chatroom_helper.h:672
std::string yidun_anti_cheating_
(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024
Definition: nim_chatroom_helper.h:668
int high_priority_
高优先级消息标记,1:是; 非高优先级消息不带该字段,服务器填写,发送方不需要填写
Definition: nim_chatroom_helper.h:666
bool anti_spam_enable_
是否需要过易盾反垃圾
Definition: nim_chatroom_helper.h:656
void ParseMessageSetting(const nim_cpp_wrapper_util::Json::Value &message)
从Json Value解析出消息属性设置
Definition: nim_chatroom_helper.h:718
NIMChatRoomLocation location_
(可选)发送消息时附加的位置信息
Definition: nim_chatroom_helper.h:674
std::string anti_spam_content_
(可选)开发者自定义的反垃圾字段,长度限制2048
Definition: nim_chatroom_helper.h:658
std::list< std::string > to_accids
(可选)消息接受者,如果设置了本字段,且不为空,则本消息为聊天室定向消息(聊天室定向消息不会存历史)
Definition: nim_chatroom_helper.h:676
bool resend_flag_
消息重发标记位
Definition: nim_chatroom_helper.h:652
std::string ext_
第三方扩展字段, 必须为可以解析为json的非格式化的字符串,长度限制4096
Definition: nim_chatroom_helper.h:654
ChatRoomMessageSetting()
Definition: nim_chatroom_helper.h:678
std::string env_config_
(可选) 自定义抄送配置
Definition: nim_chatroom_helper.h:670
聊天室通知
Definition: nim_chatroom_helper.h:422
std::string target_tag_
当通知为聊天室按标签禁言/解禁、聊天室成员标签变更事件才有,代表当前被禁言或变更的 tag 信息
Definition: nim_chatroom_helper.h:447
bool temp_muted_
当通知为聊天室进入事件才有,代表是否临时禁言状态
Definition: nim_chatroom_helper.h:442
std::string operator_id_
操作者的账号 accid
Definition: nim_chatroom_helper.h:428
nim_cpp_wrapper_util::Json::Value ToJsonObject() const
组装Json Value
Definition: nim_chatroom_helper.h:545
std::list< std::string > target_nick_
被操作者的账号 nick 列表
Definition: nim_chatroom_helper.h:432
NIMChatRoomNotificationId id_
通知类型
Definition: nim_chatroom_helper.h:424
std::string queue_change_
当通知为聊天室队列变更事件才有,代表变更的内容
Definition: nim_chatroom_helper.h:444
std::string operator_nick_
操作者的账号 nick
Definition: nim_chatroom_helper.h:430
std::string msg_id_
当通知为聊天室撤回消息事件时才有,代表当前被撤回的消息 ID
Definition: nim_chatroom_helper.h:450
int64_t temp_mute_duration_
Definition: nim_chatroom_helper.h:438
uint64_t msg_timetag_
当通知为聊天室撤回消息事件时才有,代表当前被撤回消息的时间戳
Definition: nim_chatroom_helper.h:452
ChatRoomNotification()
Definition: nim_chatroom_helper.h:455
std::list< std::string > target_ids_
被操作者的 accid 列表
Definition: nim_chatroom_helper.h:434
std::string ext_
上层开发自定义的事件通知扩展字段, 必须为可以解析为 json 的非格式化的字符串
Definition: nim_chatroom_helper.h:426
void ParseFromJsonValue(const nim_cpp_wrapper_util::Json::Value &values)
从JsonValue中解析得到聊天室通知
Definition: nim_chatroom_helper.h:466
bool muted_
表示是否是被禁言标记
Definition: nim_chatroom_helper.h:440
通知麦序队列中有批量变更,发生在元素提交者离开聊天室或者从聊天室异常掉线时
Definition: nim_chatroom_helper.h:614
std::string value_
队列变更元素的Value
Definition: nim_chatroom_helper.h:620
std::string type_
队列变更类型 OFFER, POLL, DROP
Definition: nim_chatroom_helper.h:616
std::string key_
队列变更元素的Key
Definition: nim_chatroom_helper.h:618
void ParseFromNotification(const ChatRoomNotification ¬ification)
从聊天室通知中解析得到队列变更具体内容
Definition: nim_chatroom_helper.h:629
std::map< std::string, std::string > changed_values_
队列变更元素的Value
Definition: nim_chatroom_helper.h:622
聊天室队列通知内容
Definition: nim_chatroom_helper.h:590
std::string value_
队列变更元素的Value
Definition: nim_chatroom_helper.h:596
void ParseFromNotification(const ChatRoomNotification ¬ification)
从聊天室通知中解析得到队列变更具体内容
Definition: nim_chatroom_helper.h:603
std::string type_
队列变更类型 OFFER, POLL, DROP
Definition: nim_chatroom_helper.h:592
std::string key_
队列变更元素的Key
Definition: nim_chatroom_helper.h:594
聊天室麦序队列元素
Definition: nim_chatroom_helper.h:1251
std::string value_
元素的内容,长度限制4096字节
Definition: nim_chatroom_helper.h:1255
std::string key_
元素的UniqKey,长度限制128字节
Definition: nim_chatroom_helper.h:1253
聊天室麦序添加、更新选项
Definition: nim_chatroom_helper.h:572
std::string element_accid_
队列元素所属账号,默认不传表示队列元素属于当前操作人,管理员可以指定队列元素归属于其他合法账号
Definition: nim_chatroom_helper.h:577
bool transient_
true 表示当提交这个新元素的用户从聊天室掉线或退出的时候,需要删除这个元素;默认 false 表示不删除
Definition: nim_chatroom_helper.h:575
设置聊天室成员身份标识参数
Definition: nim_chatroom_helper.h:1070
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_chatroom_helper.h:1088
bool opt_
true:是,false:否
Definition: nim_chatroom_helper.h:1076
std::string account_id_
成员ID
Definition: nim_chatroom_helper.h:1072
std::string notify_ext_
通知的扩展字段, 必须为可以解析为Json的非格式化的字符串
Definition: nim_chatroom_helper.h:1078
ChatRoomSetMemberAttributeParameters()
Definition: nim_chatroom_helper.h:1081
NIMChatRoomMemberAttribute attribute_
身份标识
Definition: nim_chatroom_helper.h:1074
聊天室退出时的信息
Definition: nim_chatroom_helper.h:1274
NIMChatRoomExitReason code_
enum 退出原因的代码
Definition: nim_chatroom_helper.h:1278
std::string notify_ext_
string 附加信息长度限制2048字节
Definition: nim_chatroom_helper.h:1276
机器人信息
Definition: nim_chatroom_helper.h:1313
std::string GetRobotID() const
Definition: nim_chatroom_helper.h:1343
void SetName(const std::string &name)
Definition: nim_chatroom_helper.h:1322
std::string GetName() const
Definition: nim_chatroom_helper.h:1325
void SetIcon(const std::string &icon)
Definition: nim_chatroom_helper.h:1328
void SetIntro(const std::string &intro)
Definition: nim_chatroom_helper.h:1334
void SetUpdateTime(const uint64_t time)
Definition: nim_chatroom_helper.h:1352
std::string GetIntro() const
Definition: nim_chatroom_helper.h:1337
void SetRobotID(const std::string &id)
Definition: nim_chatroom_helper.h:1340
std::string GetIcon() const
Definition: nim_chatroom_helper.h:1331
void SetAccid(const std::string &accid)
Definition: nim_chatroom_helper.h:1316
std::string GetAccid() const
Definition: nim_chatroom_helper.h:1319
uint64_t GetCreateTime() const
Definition: nim_chatroom_helper.h:1349
uint64_t GetUpdateTime() const
Definition: nim_chatroom_helper.h:1355
void SetCreateTime(const uint64_t time)
Definition: nim_chatroom_helper.h:1346