NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_super_team_helper.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_SUPERTEAM_HELPER_H_
8#define _NIM_SDK_CPP_SUPERTEAM_HELPER_H_
9
10#include <functional>
11#include <list>
12#include <set>
13#include <string>
17#include "nim_define_include.h"
22namespace nim {
25public:
27 SuperTeamInfo(const std::string& team_id) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyID] = team_id; }
28
31
32public:
34 void operator=(const SuperTeamInfo& new_info) { Update(new_info); }
35
37 void Update(const SuperTeamInfo& new_info) {
39 SetName(new_info.GetName());
41 SetOwnerID(new_info.GetOwnerID());
43 SetLevel(new_info.GetLevel());
45 SetProperty(new_info.GetProperty());
47 SetIntro(new_info.GetIntro());
49 SetAnnouncement(new_info.GetAnnouncement());
51 SetJoinMode(new_info.GetJoinMode());
52 // 群属性,开发者无需关注 20161011 by Oleg
53 // if (new_info.ExistValue(kSuperTeamInfoKeyConfigBits))
54 // SetConfigBits(new_info.GetConfigBits());
56 SetCustom(new_info.GetCustom());
58 SetIcon(new_info.GetIcon());
60 SetBeInviteMode(new_info.GetBeInviteMode());
62 SetInviteMode(new_info.GetInviteMode());
64 SetUpdateInfoMode(new_info.GetUpdateInfoMode());
66 SetUpdateCustomMode(new_info.GetUpdateCustomMode());
68 SetSuperTeamID(new_info.GetSuperTeamID());
70 SetValid(new_info.IsValid());
72 SetMemberValid(new_info.IsMemberValid());
74 SetMemberCount(new_info.GetMemberCount());
76 SetMemberListTimetag(new_info.GetMemberListTimetag());
78 SetCreateTimetag(new_info.GetCreateTimetag());
80 SetUpdateTimetag(new_info.GetUpdateTimetag());
82 SetServerCustom(new_info.GetServerCustom());
84 SetMute(new_info.GetMuteType());
85 }
86
87public:
89 void SetSuperTeamID(const std::string& id) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyID] = id; }
90
92 std::string GetSuperTeamID() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyID].asString(); }
93
95 void SetName(const std::string& name) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyName] = name; }
96
98 std::string GetName() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyName].asString(); }
99
101 void SetOwnerID(const std::string& id) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreator] = id; }
102
104 std::string GetOwnerID() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreator].asString(); }
106 void SetMemberMaxCount(int count) {
107 team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberMaxCount] = count;
108 team_info_json_value_[nim::kNIMSuperTeamInfoKeyLevel] = count;
109 }
110
112 int GetMemberMaxCount() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberMaxCount].asUInt(); }
114 void SetProperty(const std::string& prop) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyProperty] = prop; }
115
117 std::string GetProperty() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyProperty].asString(); }
118
120 void SetValid(bool valid) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyValidFlag] = valid ? 1 : 0; }
121
123 bool IsValid() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyValidFlag].asUInt() == 1; }
124
126 void SetMemberCount(int count) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberCount] = count; }
127
129 int GetMemberCount() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberCount].asUInt(); }
130
132 void SetMemberListTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyListTime] = timetag; }
133
135 int64_t GetMemberListTimetag() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyListTime].asUInt64(); }
136
138 void SetCreateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreateTime] = timetag; }
139
141 int64_t GetCreateTimetag() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreateTime].asUInt64(); }
142
144 void SetUpdateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateTime] = timetag; }
145
147 int64_t GetUpdateTimetag() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateTime].asUInt64(); }
148
150 void SetMemberValid(bool valid) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberValid] = valid ? 1 : 0; }
151
153 bool IsMemberValid() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberValid].asUInt() == 1; }
154
156 void SetIntro(const std::string& intro) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyIntro] = intro; }
157
159 std::string GetIntro() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyIntro].asString(); }
160
162 void SetAnnouncement(const std::string& announcement) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyAnnouncement] = announcement; }
163
165 std::string GetAnnouncement() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyAnnouncement].asString(); }
166
168 void SetJoinMode(nim::NIMSuperTeamJoinMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyJoinMode] = mode; }
169
171 nim::NIMSuperTeamJoinMode GetJoinMode() const { return (NIMSuperTeamJoinMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyJoinMode].asUInt(); }
172
174 void SetCustom(const std::string& custom) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyCustom] = custom; }
175
177 std::string GetCustom() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyCustom].asString(); }
178
180 void SetServerCustom(const std::string& custom) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyServerCustom] = custom; }
181
183 std::string GetServerCustom() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyServerCustom].asString(); }
184
186 void SetIcon(const std::string& icon) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyIcon] = icon; }
187
189 std::string GetIcon() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyIcon].asString(); }
190
192 void SetBeInviteMode(int be_invite_mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyBeInviteMode] = be_invite_mode; }
193
195 int GetBeInviteMode() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyBeInviteMode].asUInt(); }
196
198 void SetInviteMode(NIMSuperTeamInviteMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyInviteMode] = mode; }
199
202 return (NIMSuperTeamInviteMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyInviteMode].asUInt();
203 }
204
206 void SetUpdateInfoMode(NIMSuperTeamUpdateInfoMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateInfoMode] = mode; }
207
210 return (NIMSuperTeamUpdateInfoMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateInfoMode].asUInt();
211 }
212
214 void SetUpdateCustomMode(NIMSuperTeamUpdateCustomMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateCustomMode] = mode; }
215
218 return (NIMSuperTeamUpdateCustomMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateCustomMode].asUInt();
219 }
221 void SetMute(NIMSuperTeamMuteType mute_type) { team_info_json_value_[nim::kNIMTeamInfoKeyMuteType] = mute_type; }
222
225 if (team_info_json_value_.isMember(nim::kNIMSuperTeamInfoKeyMuteAll) &&
226 team_info_json_value_[nim::kNIMSuperTeamInfoKeyMuteType].asUInt() == 1)
228 return (NIMSuperTeamMuteType)team_info_json_value_[nim::kNIMSuperTeamInfoKeyMuteType].asUInt();
229 }
230
236 bool ExistValue(const std::string& nim_team_info_key) const { return team_info_json_value_.isMember(nim_team_info_key); }
237
242 std::string ToJsonString() const { return GetJsonStringWithNoStyled(team_info_json_value_); }
243
248 nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return team_info_json_value_; }
249
250private:
252 void SetLevel(int level) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyLevel] = level; }
253
255 int GetLevel() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyLevel].asUInt(); }
256
257public:
259};
260
263public:
265 SuperTeamMemberProperty(const std::string& team_id, const std::string& accid, const nim::NIMSuperTeamUserType type) {
266 member_info_json_value_[kNIMSuperTeamUserKeyID] = team_id;
267 member_info_json_value_[kNIMSuperTeamUserKeyAccID] = accid;
268 member_info_json_value_[kNIMSuperTeamUserKeyType] = type;
269 }
270
273
274public:
276 void SetSuperTeamID(const std::string& id) { member_info_json_value_[kNIMSuperTeamUserKeyID] = id; }
277
279 std::string GetSuperTeamID() const { return member_info_json_value_[kNIMSuperTeamUserKeyID].asString(); }
280
282 void SetAccountID(const std::string& id) { member_info_json_value_[kNIMSuperTeamUserKeyAccID] = id; }
283
285 std::string GetAccountID() const { return member_info_json_value_[kNIMSuperTeamUserKeyAccID].asString(); }
286
288 void SetUserType(nim::NIMSuperTeamUserType type) { member_info_json_value_[kNIMSuperTeamUserKeyType] = type; }
289
291 nim::NIMSuperTeamUserType GetUserType() const { return (nim::NIMSuperTeamUserType)member_info_json_value_[kNIMSuperTeamUserKeyType].asUInt(); }
292
294 void SetNick(const std::string& nick) { member_info_json_value_[kNIMSuperTeamUserKeyNick] = nick; }
295
297 std::string GetNick() const { return member_info_json_value_[kNIMSuperTeamUserKeyNick].asString(); }
298
300 void SetBits(int64_t bit) { member_info_json_value_[kNIMSuperTeamUserKeyBits] = bit; }
301
303 int64_t GetBits() const { return member_info_json_value_[kNIMSuperTeamUserKeyBits].asUInt64(); }
304
306 void SetValid(bool valid) { member_info_json_value_[kNIMSuperTeamUserKeyValidFlag] = valid ? 1 : 0; }
307
309 bool IsValid() const { return member_info_json_value_[kNIMSuperTeamUserKeyValidFlag].asUInt() == 1; }
310
312 void SetCreateTimetag(int64_t timetag) { member_info_json_value_[kNIMSuperTeamUserKeyCreateTime] = timetag; }
313
315 int64_t GetCreateTimetag() const { return member_info_json_value_[kNIMSuperTeamUserKeyCreateTime].asUInt64(); }
316
318 void SetUpdateTimetag(int64_t timetag) { member_info_json_value_[kNIMSuperTeamUserKeyUpdateTime] = timetag; }
319
321 int64_t GetUpdateTimetag() const { return member_info_json_value_[kNIMSuperTeamUserKeyUpdateTime].asUInt64(); }
322
324 void SetMute(bool mute) { member_info_json_value_[kNIMSuperTeamUserKeyMute] = mute ? 1 : 0; }
325
327 bool IsMute() const { return member_info_json_value_[kNIMSuperTeamUserKeyMute].asUInt() == 1; }
328
330 void SetCustom(const std::string& custom) { member_info_json_value_[kNIMSuperTeamUserKeyCustom] = custom; }
331
333 std::string GetCustom() const { return member_info_json_value_[kNIMSuperTeamUserKeyCustom].asString(); }
334 void SetFollowMember(const std::string& follow_member) {
337 reader.parse(follow_member, follow_member_array);
338 member_info_json_value_[kNIMTeamUserKeyFollowMember] = follow_member_array;
339 }
340 std::vector<std::string> GetFollowMember() const {
341 nim_cpp_wrapper_util::Json::Value follow_member_array = member_info_json_value_[kNIMTeamUserKeyFollowMember];
342 std::vector<std::string> follow_member;
343 for (auto& it : follow_member_array) {
344 follow_member.push_back(it.asString());
345 }
346 return follow_member;
347 }
348
354 bool ExistValue(const std::string& nim_team_user_key) const { return member_info_json_value_.isMember(nim_team_user_key); }
355
360 std::string ToJsonString() const { return GetJsonStringWithNoStyled(member_info_json_value_); }
361
366 nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return member_info_json_value_; }
367
368public:
370};
371
379 std::string team_id_;
381 std::list<std::string> ids_;
383 std::list<std::string> invalid_ids_;
385 std::list<UserNameCard> namecards_;
391 bool opt_;
393 std::string attach_;
396};
397
401 std::list<SuperTeamMemberProperty> team_member_propertys_;
403 uint32_t offset_{0};
405 bool finished_{false};
406};
407
413};
414
418 std::string team_id_;
420 std::string keyword_;
422 uint32_t offset_{0};
426 uint32_t limit_{10};
427};
428
432 std::set<nim::NIMSuperTeamUserType> role_types_;
434 uint32_t offset_{0};
438 uint32_t limit_{10};
439};
440
452 const std::string& team_id,
453 const NIMNotificationId notification_id,
454 const std::string& team_event_json,
455 SuperTeamEvent& team_event);
456
463NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamInfoJson(const nim_cpp_wrapper_util::Json::Value& team_info_json, SuperTeamInfo& team_info);
464
471NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamInfoJson(const std::string& team_info_json, SuperTeamInfo& team_info);
472
479NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamInfosJson(const std::string& team_infos_json, std::list<SuperTeamInfo>& team_infos);
480
489 SuperTeamMemberProperty& team_member_property);
490
497NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamMemberPropertyJson(const std::string& team_member_prop_json,
498 SuperTeamMemberProperty& team_member_property);
499
506NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamMemberPropertysJson(const std::string& team_member_props_json,
507 std::list<SuperTeamMemberProperty>& team_member_propertys);
508} // namespace nim
509
510#endif //_NIM_SDK_CPP_SUPERTEAM_HELPER_H_
NIM 公共数据类型定义总的包含文件
NIMNotificationId
Definition: nim_msglog_def.h:367
static const char * kNIMSuperTeamInfoKeyUpdateTime
long,群信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:162
static const char * kNIMSuperTeamInfoKeyCustom
string, 第三方扩展字段(仅负责存储和透传)
Definition: nim_super_team_def.h:174
static const char * kNIMSuperTeamUserKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:214
NIMSuperTeamMuteType
Definition: nim_super_team_def.h:193
@ kNIMSuperTeamMuteTypeNomalMute
普通成员禁言
Definition: nim_super_team_def.h:197
static const char * kNIMSuperTeamInfoKeyUpdateInfoMode
谁可以修改群资料,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateInfoModeManager(0)/kNIMTeamUpdateInfoModeEveryone(1)
Definition: nim_super_team_def.h:184
static const char * kNIMSuperTeamInfoKeyValidFlag
int,群有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:154
static const char * kNIMSuperTeamInfoKeyInviteMode
int, 谁可以邀请他人入群,属性本身只有群主管理员可以修改,默认kNIMTeamInviteModeManager(0)/kNIMTeamInviteModeEveryone(1)
Definition: nim_super_team_def.h:182
static const char * kNIMSuperTeamUserKeyMute
int,是否被禁言,0-非禁言(默认),1-禁言
Definition: nim_super_team_def.h:232
static const char * kNIMSuperTeamUserKeyCustom
string,群成员自定义扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_super_team_def.h:230
static const char * kNIMSuperTeamInfoKeyName
string,群名称
Definition: nim_super_team_def.h:142
static const char * kNIMSuperTeamUserKeyCreateTime
long,入群时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:226
static const char * kNIMSuperTeamInfoKeyMemberCount
int,群成员数量,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:156
static const char * kNIMSuperTeamInfoKeyCreator
string 群拥有者ID,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:146
static const char * kNIMSuperTeamInfoKeyJoinMode
int,入群模式(NIMSuperTeamJoinMode),默认为kNIMSuperTeamJoinModeNoAuth(0),不需要验证
Definition: nim_super_team_def.h:170
static const char * kNIMSuperTeamInfoKeyUpdateCustomMode
谁可以更新群自定义属性,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateCustomModeManager(0)/kNIMTeamUpdateCustomModeEveryone(1)
Definition: nim_super_team_def.h:186
NIMSuperTeamUpdateCustomMode
Definition: nim_super_team_def.h:276
static const char * kNIMSuperTeamUserKeyNick
string,群成员昵称
Definition: nim_super_team_def.h:220
NIMSuperTeamJoinMode
Definition: nim_super_team_def.h:284
static const char * kNIMSuperTeamInfoKeyAnnouncement
string,群公告,长度限制:5000字符
Definition: nim_super_team_def.h:168
static const char * kNIMSuperTeamInfoKeyMemberValid
int,群有效性标记位,客户端用,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:164
NIMSuperTeamInviteMode
Definition: nim_super_team_def.h:260
static const char * kNIMSuperTeamInfoKeyIntro
string,群介绍,长度限制:255字符
Definition: nim_super_team_def.h:166
static const char * kNIMSuperTeamInfoKeyMuteAll
int, 群全员禁言标记 0:未禁言,1:禁言, 开发者只读 无法设置
Definition: nim_super_team_def.h:188
static const char * kNIMSuperTeamInfoKeyListTime
long,群列表时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:158
static const char * kNIMSuperTeamUserKeyBits
long,群成员属性,位操作(NIMSuperTeamBitsConfigMask)
Definition: nim_super_team_def.h:222
static const char * kNIMSuperTeamInfoKeyServerCustom
string, 第三方服务器扩展字段(该配置项只能通过服务器接口设置,对客户端只读)
Definition: nim_super_team_def.h:176
static const char * kNIMSuperTeamInfoKeyBeInviteMode
被邀请人同意方式,属性本身只有群主管理员可以修改,默认kNIMTeamBeInviteModeNeedAgree(0)/kNIMTeamBeInviteModeNotNeedAgree(1)
Definition: nim_super_team_def.h:180
static const char * kNIMSuperTeamInfoKeyIcon
string, 群头像,长度限制:1024字符
Definition: nim_super_team_def.h:178
static const char * kNIMSuperTeamInfoKeyLevel
int,■■已废弃■■ 群等级,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:148
static const char * kNIMSuperTeamUserKeyValidFlag
int,群成员有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:224
static const char * kNIMSuperTeamInfoKeyProperty
string,群性质,长度限制:6000字符
Definition: nim_super_team_def.h:152
NIMSuperTeamUpdateInfoMode
Definition: nim_super_team_def.h:268
static const char * kNIMSuperTeamUserKeyType
int,群成员类型(NIMSuperTeamUserType),默认kNIMSuperTeamUserTypeNomal(0)
Definition: nim_super_team_def.h:218
static const char * kNIMSuperTeamInfoKeyCreateTime
long,群创建时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:160
static const char * kNIMSuperTeamUserKeyAccID
string,群成员id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:216
static const char * kNIMSuperTeamInfoKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:140
static const char * kNIMSuperTeamInfoKeyMuteType
NIMSuperTeamMuteType, 群禁言0不禁言 1普通成员禁言 3全部禁言 包括群主 开发者可以通过设置该属性调整群禁言状态
Definition: nim_super_team_def.h:190
static const char * kNIMSuperTeamUserKeyUpdateTime
long,群成员信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_super_team_def.h:228
static const char * kNIMTeamUserKeyFollowMember
string,特别关注列表
Definition: nim_team_def.h:328
NIMResCode
Definition: public_defines.h:21
加载 NIM SDK 的帮助类头文件
SDK用户信息辅助方法
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
namespace nim
void ParseSuperTeamInfoJson(const nim_cpp_wrapper_util::Json::Value &team_info_json, SuperTeamInfo &team_info)
解析群组信息
Definition: nim_super_team_helper.cpp:92
SuperTeamQueryOrder
Definition: nim_super_team_helper.h:408
@ kSuperTeamQueryOrderAsc
按时间升序排列
Definition: nim_super_team_helper.h:412
@ kSuperTeamQueryOrderDesc
按时间降序排列
Definition: nim_super_team_helper.h:410
bool ParseSuperTeamMemberPropertysJson(const std::string &team_member_props_json, std::list< SuperTeamMemberProperty > &team_member_propertys)
解析群成员信息
Definition: nim_super_team_helper.cpp:180
void ParseSuperTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value &team_member_prop_json, SuperTeamMemberProperty &team_member_property)
解析群成员信息
Definition: nim_super_team_helper.cpp:153
bool ParseSuperTeamInfosJson(const std::string &team_infos_json, std::list< SuperTeamInfo > &team_infos)
解析群组信息
Definition: nim_super_team_helper.cpp:138
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
@ arrayValue
array value (ordered list)
Definition: value.h:115
群组信息
Definition: nim_super_team_helper.h:24
NIMSuperTeamMuteType GetMuteType() const
Definition: nim_super_team_helper.h:224
int GetMemberCount() const
Definition: nim_super_team_helper.h:129
int64_t GetCreateTimetag() const
Definition: nim_super_team_helper.h:141
void SetMemberMaxCount(int count)
Definition: nim_super_team_helper.h:106
int64_t GetMemberListTimetag() const
Definition: nim_super_team_helper.h:135
void SetBeInviteMode(int be_invite_mode)
Definition: nim_super_team_helper.h:192
void SetMemberValid(bool valid)
Definition: nim_super_team_helper.h:150
void SetAnnouncement(const std::string &announcement)
Definition: nim_super_team_helper.h:162
bool ExistValue(const std::string &nim_team_info_key) const
群组信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_super_team_helper.h:236
void SetInviteMode(NIMSuperTeamInviteMode mode)
Definition: nim_super_team_helper.h:198
void operator=(const SuperTeamInfo &new_info)
Definition: nim_super_team_helper.h:34
void SetJoinMode(nim::NIMSuperTeamJoinMode mode)
Definition: nim_super_team_helper.h:168
std::string GetIcon() const
Definition: nim_super_team_helper.h:189
NIMSuperTeamUpdateInfoMode GetUpdateInfoMode() const
Definition: nim_super_team_helper.h:209
void SetUpdateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:144
void SetProperty(const std::string &prop)
Definition: nim_super_team_helper.h:114
void SetLevel(int level)
Definition: nim_super_team_helper.h:252
void SetUpdateCustomMode(NIMSuperTeamUpdateCustomMode mode)
Definition: nim_super_team_helper.h:214
void SetSuperTeamID(const std::string &id)
Definition: nim_super_team_helper.h:89
int GetMemberMaxCount() const
Definition: nim_super_team_helper.h:112
std::string GetSuperTeamID() const
Definition: nim_super_team_helper.h:92
void SetOwnerID(const std::string &id)
Definition: nim_super_team_helper.h:101
void SetUpdateInfoMode(NIMSuperTeamUpdateInfoMode mode)
Definition: nim_super_team_helper.h:206
void SetCreateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:138
bool IsValid() const
Definition: nim_super_team_helper.h:123
SuperTeamInfo(const std::string &team_id)
Definition: nim_super_team_helper.h:27
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取JsonValue格式的数据
Definition: nim_super_team_helper.h:248
std::string GetOwnerID() const
Definition: nim_super_team_helper.h:104
void SetMemberCount(int count)
Definition: nim_super_team_helper.h:126
void SetServerCustom(const std::string &custom)
Definition: nim_super_team_helper.h:180
void SetCustom(const std::string &custom)
Definition: nim_super_team_helper.h:174
int64_t GetUpdateTimetag() const
Definition: nim_super_team_helper.h:147
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_super_team_helper.h:242
std::string GetAnnouncement() const
Definition: nim_super_team_helper.h:165
int GetLevel() const
Definition: nim_super_team_helper.h:255
std::string GetIntro() const
Definition: nim_super_team_helper.h:159
nim::NIMSuperTeamJoinMode GetJoinMode() const
Definition: nim_super_team_helper.h:171
std::string GetName() const
Definition: nim_super_team_helper.h:98
void SetIntro(const std::string &intro)
Definition: nim_super_team_helper.h:156
void Update(const SuperTeamInfo &new_info)
Definition: nim_super_team_helper.h:37
std::string GetCustom() const
Definition: nim_super_team_helper.h:177
void SetMute(NIMSuperTeamMuteType mute_type)
Definition: nim_super_team_helper.h:221
std::string GetServerCustom() const
Definition: nim_super_team_helper.h:183
SuperTeamInfo()
Definition: nim_super_team_helper.h:30
nim_cpp_wrapper_util::Json::Value team_info_json_value_
Definition: nim_super_team_helper.h:258
void SetValid(bool valid)
Definition: nim_super_team_helper.h:120
bool IsMemberValid() const
Definition: nim_super_team_helper.h:153
std::string GetProperty() const
Definition: nim_super_team_helper.h:117
void SetName(const std::string &name)
Definition: nim_super_team_helper.h:95
void SetMemberListTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:132
NIMSuperTeamUpdateCustomMode GetUpdateCustomMode() const
Definition: nim_super_team_helper.h:217
void SetIcon(const std::string &icon)
Definition: nim_super_team_helper.h:186
NIMSuperTeamInviteMode GetInviteMode() const
Definition: nim_super_team_helper.h:201
int GetBeInviteMode() const
Definition: nim_super_team_helper.h:195
群组成员信息
Definition: nim_super_team_helper.h:262
void SetFollowMember(const std::string &follow_member)
Definition: nim_super_team_helper.h:334
void SetCreateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:312
void SetSuperTeamID(const std::string &id)
Definition: nim_super_team_helper.h:276
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_super_team_helper.h:360
void SetBits(int64_t bit)
Definition: nim_super_team_helper.h:300
void SetUserType(nim::NIMSuperTeamUserType type)
Definition: nim_super_team_helper.h:288
std::string GetNick() const
Definition: nim_super_team_helper.h:297
nim::NIMSuperTeamUserType GetUserType() const
Definition: nim_super_team_helper.h:291
int64_t GetUpdateTimetag() const
Definition: nim_super_team_helper.h:321
std::string GetAccountID() const
Definition: nim_super_team_helper.h:285
int64_t GetBits() const
Definition: nim_super_team_helper.h:303
void SetAccountID(const std::string &id)
Definition: nim_super_team_helper.h:282
std::string GetCustom() const
Definition: nim_super_team_helper.h:333
std::string GetSuperTeamID() const
Definition: nim_super_team_helper.h:279
std::vector< std::string > GetFollowMember() const
Definition: nim_super_team_helper.h:340
int64_t GetCreateTimetag() const
Definition: nim_super_team_helper.h:315
nim_cpp_wrapper_util::Json::Value member_info_json_value_
Definition: nim_super_team_helper.h:369
void SetValid(bool valid)
Definition: nim_super_team_helper.h:306
bool ExistValue(const std::string &nim_team_user_key) const
群成员信息信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_super_team_helper.h:354
SuperTeamMemberProperty(const std::string &team_id, const std::string &accid, const nim::NIMSuperTeamUserType type)
Definition: nim_super_team_helper.h:265
bool IsValid() const
Definition: nim_super_team_helper.h:309
void SetMute(bool mute)
Definition: nim_super_team_helper.h:324
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取member info json value
Definition: nim_super_team_helper.h:366
SuperTeamMemberProperty()
Definition: nim_super_team_helper.h:272
void SetCustom(const std::string &custom)
Definition: nim_super_team_helper.h:330
void SetUpdateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:318
void SetNick(const std::string &nick)
Definition: nim_super_team_helper.h:294
bool IsMute() const
Definition: nim_super_team_helper.h:327
群组事件通知
Definition: nim_super_team_helper.h:373
std::string attach_
扩展字段,目前仅kick和invite事件可选
Definition: nim_super_team_helper.h:393
nim_cpp_wrapper_util::Json::Value src_data_
未解析过的原信息,目前仅支持群消息未读数相关事件
Definition: nim_super_team_helper.h:395
bool opt_
操作
Definition: nim_super_team_helper.h:391
std::list< UserNameCard > namecards_
通知可能涉及到的群成员的用户名片
Definition: nim_super_team_helper.h:385
std::list< std::string > ids_
通知可能涉及到的群成员ID
Definition: nim_super_team_helper.h:381
SuperTeamInfo team_info_
通知可能涉及到的群信息
Definition: nim_super_team_helper.h:387
std::string team_id_
群组ID
Definition: nim_super_team_helper.h:379
std::list< std::string > invalid_ids_
通知可能涉及到的失效的群成员ID,比如邀请入群的成员的群数量超限导致当次邀请失败
Definition: nim_super_team_helper.h:383
SuperTeamMemberProperty member_property_
群成员属性
Definition: nim_super_team_helper.h:389
NIMResCode res_code_
错误码
Definition: nim_super_team_helper.h:375
NIMNotificationId notification_id_
通知类型ID
Definition: nim_super_team_helper.h:377
超大群群成员搜索结果
Definition: nim_super_team_helper.h:399
std::list< SuperTeamMemberProperty > team_member_propertys_
群成员信息列表
Definition: nim_super_team_helper.h:401
超大群群成员关键字搜索参数
Definition: nim_super_team_helper.h:416
std::string team_id_
超大群 ID
Definition: nim_super_team_helper.h:418
std::string keyword_
搜索关键字, 不得为空
Definition: nim_super_team_helper.h:420
超大群群成员检索参数
Definition: nim_super_team_helper.h:430
std::set< nim::NIMSuperTeamUserType > role_types_
群成员类型列表
Definition: nim_super_team_helper.h:432
Unserialize a JSON document into a Value.
Definition: reader.h:37
bool parse(const std::string &document, Value &root, bool collectComments=true)
Read a Value from a JSON document.
Definition: json_reader.cpp:97
Represents a JSON value.
Definition: value.h:196