7#ifndef _NIM_SDK_CPP_SUPERTEAM_HELPER_H_
8#define _NIM_SDK_CPP_SUPERTEAM_HELPER_H_
42 SetLevel(new_info.GetLevel());
235 bool ExistValue(
const std::string& nim_team_info_key)
const {
return team_info_json_value_.isMember(nim_team_info_key); }
339 bool ExistValue(
const std::string& nim_team_user_key)
const {
return member_info_json_value_.isMember(nim_team_user_key); }
394 const std::string& team_id,
396 const std::string& team_event_json,
421NIM_SDK_CPPWRAPPER_DLL_API
bool ParseSuperTeamInfosJson(
const std::string& team_infos_json, std::list<SuperTeamInfo>& team_infos);
449 std::list<SuperTeamMemberProperty>& team_member_propertys);
Represents a JSON value.
Definition: value.h:196
void ParseSuperTeamInfoJson(const nim_cpp_wrapper_util::Json::Value &team_info_json, SuperTeamInfo &team_info)
解析群组信息
Definition: nim_super_team_helper.cpp:92
bool ParseSuperTeamMemberPropertysJson(const std::string &team_member_props_json, std::list< SuperTeamMemberProperty > &team_member_propertys)
解析群成员信息
Definition: nim_super_team_helper.cpp:177
void ParseSuperTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value &team_member_prop_json, SuperTeamMemberProperty &team_member_property)
解析群成员信息
Definition: nim_super_team_helper.cpp:151
bool ParseSuperTeamInfosJson(const std::string &team_infos_json, std::list< SuperTeamInfo > &team_infos)
解析群组信息
Definition: nim_super_team_helper.cpp:136
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
void ParseSuperTeamEvent(int rescode, const std::string &team_id, const NIMNotificationId notification_id, const std::string &team_event_json, SuperTeamEvent &team_event)
解析群组事件通知
Definition: nim_super_team_helper.cpp:11
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
NIMNotificationId
Definition: nim_msglog_def.h:338
static const char * kNIMSuperTeamInfoKeyUpdateTime
long,群信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:156
static const char * kNIMSuperTeamInfoKeyCustom
string, 第三方扩展字段(仅负责存储和透传)
Definition: nim_super_team_def.h:168
static const char * kNIMSuperTeamUserKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:208
NIMSuperTeamMuteType
Definition: nim_super_team_def.h:187
@ kNIMSuperTeamMuteTypeNomalMute
普通成员禁言
Definition: nim_super_team_def.h:191
static const char * kNIMSuperTeamInfoKeyUpdateInfoMode
谁可以修改群资料,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateInfoModeManager(0)/kNIMTeamUpdateInfoModeEveryone(1)
Definition: nim_super_team_def.h:178
static const char * kNIMSuperTeamInfoKeyValidFlag
int,群有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:148
static const char * kNIMSuperTeamInfoKeyInviteMode
int, 谁可以邀请他人入群,属性本身只有群主管理员可以修改,默认kNIMTeamInviteModeManager(0)/kNIMTeamInviteModeEveryone(1)
Definition: nim_super_team_def.h:176
static const char * kNIMSuperTeamUserKeyMute
int,是否被禁言,0-非禁言(默认),1-禁言
Definition: nim_super_team_def.h:226
static const char * kNIMSuperTeamUserKeyCustom
string,群成员自定义扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_super_team_def.h:224
static const char * kNIMSuperTeamInfoKeyName
string,群名称
Definition: nim_super_team_def.h:136
static const char * kNIMSuperTeamUserKeyCreateTime
long,入群时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:220
static const char * kNIMSuperTeamInfoKeyMemberCount
int,群成员数量,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:150
static const char * kNIMSuperTeamInfoKeyCreator
string 群拥有者ID,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:140
static const char * kNIMSuperTeamInfoKeyMemberMaxCount
int,在创建群时,设置群的最大成员数,不可超过应用设定的最大成员数,否则返回414
Definition: nim_super_team_def.h:144
static const char * kNIMSuperTeamInfoKeyJoinMode
int,入群模式(NIMSuperTeamJoinMode),默认为kNIMSuperTeamJoinModeNoAuth(0),不需要验证
Definition: nim_super_team_def.h:164
static const char * kNIMSuperTeamInfoKeyUpdateCustomMode
谁可以更新群自定义属性,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateCustomModeManager(0)/kNIMTeamUpdateCustomModeEveryone(1)
Definition: nim_super_team_def.h:180
NIMSuperTeamUpdateCustomMode
Definition: nim_super_team_def.h:268
static const char * kNIMSuperTeamUserKeyNick
string,群成员昵称
Definition: nim_super_team_def.h:214
NIMSuperTeamJoinMode
Definition: nim_super_team_def.h:276
static const char * kNIMSuperTeamInfoKeyAnnouncement
string,群公告,长度限制:5000字符
Definition: nim_super_team_def.h:162
static const char * kNIMSuperTeamInfoKeyMemberValid
int,群有效性标记位,客户端用,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:158
NIMSuperTeamInviteMode
Definition: nim_super_team_def.h:252
static const char * kNIMSuperTeamInfoKeyIntro
string,群介绍,长度限制:255字符
Definition: nim_super_team_def.h:160
static const char * kNIMSuperTeamInfoKeyMuteAll
int, 群全员禁言标记 0:未禁言,1:禁言, 开发者只读 无法设置
Definition: nim_super_team_def.h:182
static const char * kNIMSuperTeamInfoKeyListTime
long,群列表时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:152
static const char * kNIMSuperTeamUserKeyBits
long,群成员属性,位操作(NIMSuperTeamBitsConfigMask)
Definition: nim_super_team_def.h:216
static const char * kNIMSuperTeamInfoKeyServerCustom
string, 第三方服务器扩展字段(该配置项只能通过服务器接口设置,对客户端只读)
Definition: nim_super_team_def.h:170
static const char * kNIMSuperTeamInfoKeyBeInviteMode
被邀请人同意方式,属性本身只有群主管理员可以修改,默认kNIMTeamBeInviteModeNeedAgree(0)/kNIMTeamBeInviteModeNotNeedAgree(1)
Definition: nim_super_team_def.h:174
static const char * kNIMSuperTeamInfoKeyIcon
string, 群头像,长度限制:1024字符
Definition: nim_super_team_def.h:172
static const char * kNIMSuperTeamInfoKeyLevel
int,■■已废弃■■ 群等级,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:142
static const char * kNIMSuperTeamUserKeyValidFlag
int,群成员有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:218
static const char * kNIMSuperTeamInfoKeyProperty
string,群性质,长度限制:6000字符
Definition: nim_super_team_def.h:146
NIMSuperTeamUpdateInfoMode
Definition: nim_super_team_def.h:260
static const char * kNIMSuperTeamUserKeyType
int,群成员类型(NIMSuperTeamUserType),默认kNIMSuperTeamUserTypeNomal(0)
Definition: nim_super_team_def.h:212
static const char * kNIMSuperTeamInfoKeyCreateTime
long,群创建时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:154
NIMSuperTeamUserType
Definition: nim_super_team_def.h:230
static const char * kNIMSuperTeamUserKeyAccID
string,群成员id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:210
static const char * kNIMSuperTeamInfoKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:134
static const char * kNIMSuperTeamInfoKeyMuteType
NIMSuperTeamMuteType, 群禁言0不禁言 1普通成员禁言 3全部禁言 包括群主 开发者可以通过设置该属性调整群禁言状态
Definition: nim_super_team_def.h:184
static const char * kNIMSuperTeamUserKeyUpdateTime
long,群成员信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:222
群组事件通知
Definition: nim_super_team_helper.h:358
std::string attach_
扩展字段,目前仅kick和invite事件可选
Definition: nim_super_team_helper.h:378
nim_cpp_wrapper_util::Json::Value src_data_
未解析过的原信息,目前仅支持群消息未读数相关事件
Definition: nim_super_team_helper.h:380
bool opt_
操作
Definition: nim_super_team_helper.h:376
std::list< UserNameCard > namecards_
通知可能涉及到的群成员的用户名片
Definition: nim_super_team_helper.h:370
std::list< std::string > ids_
通知可能涉及到的群成员ID
Definition: nim_super_team_helper.h:366
SuperTeamInfo team_info_
通知可能涉及到的群信息
Definition: nim_super_team_helper.h:372
std::string team_id_
群组ID
Definition: nim_super_team_helper.h:364
std::list< std::string > invalid_ids_
通知可能涉及到的失效的群成员ID,比如邀请入群的成员的群数量超限导致当次邀请失败
Definition: nim_super_team_helper.h:368
SuperTeamMemberProperty member_property_
群成员属性
Definition: nim_super_team_helper.h:374
NIMResCode res_code_
错误码
Definition: nim_super_team_helper.h:360
NIMNotificationId notification_id_
通知类型ID
Definition: nim_super_team_helper.h:362
群组信息
Definition: nim_super_team_helper.h:23
NIMSuperTeamMuteType GetMuteType() const
Definition: nim_super_team_helper.h:223
int GetMemberCount() const
Definition: nim_super_team_helper.h:128
int64_t GetCreateTimetag() const
Definition: nim_super_team_helper.h:140
void SetMemberMaxCount(int count)
Definition: nim_super_team_helper.h:105
int64_t GetMemberListTimetag() const
Definition: nim_super_team_helper.h:134
void SetBeInviteMode(int be_invite_mode)
Definition: nim_super_team_helper.h:191
void SetMemberValid(bool valid)
Definition: nim_super_team_helper.h:149
void SetAnnouncement(const std::string &announcement)
Definition: nim_super_team_helper.h:161
bool ExistValue(const std::string &nim_team_info_key) const
群组信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_super_team_helper.h:235
void SetInviteMode(NIMSuperTeamInviteMode mode)
Definition: nim_super_team_helper.h:197
void operator=(const SuperTeamInfo &new_info)
Definition: nim_super_team_helper.h:33
void SetJoinMode(nim::NIMSuperTeamJoinMode mode)
Definition: nim_super_team_helper.h:167
std::string GetIcon() const
Definition: nim_super_team_helper.h:188
NIMSuperTeamUpdateInfoMode GetUpdateInfoMode() const
Definition: nim_super_team_helper.h:208
void SetUpdateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:143
void SetProperty(const std::string &prop)
Definition: nim_super_team_helper.h:113
void SetUpdateCustomMode(NIMSuperTeamUpdateCustomMode mode)
Definition: nim_super_team_helper.h:213
void SetSuperTeamID(const std::string &id)
Definition: nim_super_team_helper.h:88
int GetMemberMaxCount() const
Definition: nim_super_team_helper.h:111
std::string GetSuperTeamID() const
Definition: nim_super_team_helper.h:91
void SetOwnerID(const std::string &id)
Definition: nim_super_team_helper.h:100
void SetUpdateInfoMode(NIMSuperTeamUpdateInfoMode mode)
Definition: nim_super_team_helper.h:205
void SetCreateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:137
bool IsValid() const
Definition: nim_super_team_helper.h:122
SuperTeamInfo(const std::string &team_id)
Definition: nim_super_team_helper.h:26
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取JsonValue格式的数据
Definition: nim_super_team_helper.h:247
std::string GetOwnerID() const
Definition: nim_super_team_helper.h:103
void SetMemberCount(int count)
Definition: nim_super_team_helper.h:125
void SetServerCustom(const std::string &custom)
Definition: nim_super_team_helper.h:179
void SetCustom(const std::string &custom)
Definition: nim_super_team_helper.h:173
int64_t GetUpdateTimetag() const
Definition: nim_super_team_helper.h:146
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_super_team_helper.h:241
std::string GetAnnouncement() const
Definition: nim_super_team_helper.h:164
std::string GetIntro() const
Definition: nim_super_team_helper.h:158
nim::NIMSuperTeamJoinMode GetJoinMode() const
Definition: nim_super_team_helper.h:170
std::string GetName() const
Definition: nim_super_team_helper.h:97
void SetIntro(const std::string &intro)
Definition: nim_super_team_helper.h:155
void Update(const SuperTeamInfo &new_info)
Definition: nim_super_team_helper.h:36
std::string GetCustom() const
Definition: nim_super_team_helper.h:176
void SetMute(NIMSuperTeamMuteType mute_type)
Definition: nim_super_team_helper.h:220
std::string GetServerCustom() const
Definition: nim_super_team_helper.h:182
SuperTeamInfo()
Definition: nim_super_team_helper.h:29
void SetValid(bool valid)
Definition: nim_super_team_helper.h:119
bool IsMemberValid() const
Definition: nim_super_team_helper.h:152
std::string GetProperty() const
Definition: nim_super_team_helper.h:116
void SetName(const std::string &name)
Definition: nim_super_team_helper.h:94
void SetMemberListTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:131
NIMSuperTeamUpdateCustomMode GetUpdateCustomMode() const
Definition: nim_super_team_helper.h:216
void SetIcon(const std::string &icon)
Definition: nim_super_team_helper.h:185
NIMSuperTeamInviteMode GetInviteMode() const
Definition: nim_super_team_helper.h:200
int GetBeInviteMode() const
Definition: nim_super_team_helper.h:194
群组成员信息
Definition: nim_super_team_helper.h:261
void SetCreateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:311
void SetSuperTeamID(const std::string &id)
Definition: nim_super_team_helper.h:275
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_super_team_helper.h:345
void SetBits(int64_t bit)
Definition: nim_super_team_helper.h:299
void SetUserType(nim::NIMSuperTeamUserType type)
Definition: nim_super_team_helper.h:287
std::string GetNick() const
Definition: nim_super_team_helper.h:296
nim::NIMSuperTeamUserType GetUserType() const
Definition: nim_super_team_helper.h:290
int64_t GetUpdateTimetag() const
Definition: nim_super_team_helper.h:320
std::string GetAccountID() const
Definition: nim_super_team_helper.h:284
int64_t GetBits() const
Definition: nim_super_team_helper.h:302
void SetAccountID(const std::string &id)
Definition: nim_super_team_helper.h:281
std::string GetCustom() const
Definition: nim_super_team_helper.h:332
std::string GetSuperTeamID() const
Definition: nim_super_team_helper.h:278
int64_t GetCreateTimetag() const
Definition: nim_super_team_helper.h:314
void SetValid(bool valid)
Definition: nim_super_team_helper.h:305
bool ExistValue(const std::string &nim_team_user_key) const
群成员信息信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_super_team_helper.h:339
SuperTeamMemberProperty(const std::string &team_id, const std::string &accid, const nim::NIMSuperTeamUserType type)
Definition: nim_super_team_helper.h:264
bool IsValid() const
Definition: nim_super_team_helper.h:308
void SetMute(bool mute)
Definition: nim_super_team_helper.h:323
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取member info json value
Definition: nim_super_team_helper.h:351
SuperTeamMemberProperty()
Definition: nim_super_team_helper.h:271
void SetCustom(const std::string &custom)
Definition: nim_super_team_helper.h:329
void SetUpdateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:317
void SetNick(const std::string &nick)
Definition: nim_super_team_helper.h:293
bool IsMute() const
Definition: nim_super_team_helper.h:326