NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_team_helper.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_TEAM_HELPER_H_
8#define _NIM_SDK_CPP_TEAM_HELPER_H_
9
10#include <functional>
11#include <list>
12#include <set>
13#include <string>
17#include "nim_define_include.h"
23namespace nim {
26public:
28 TeamInfo(const std::string& team_id, const nim::NIMTeamType type) {
29 team_info_json_value_[nim::kNIMTeamInfoKeyID] = team_id;
30 team_info_json_value_[nim::kNIMTeamInfoKeyType] = type;
31 }
32
35
36public:
38 void operator=(const TeamInfo& new_info) { Update(new_info); }
39
41 void Update(const TeamInfo& new_info) {
42 if (new_info.ExistValue(kNIMTeamInfoKeyName))
43 SetName(new_info.GetName());
44 if (new_info.ExistValue(kNIMTeamInfoKeyType))
45 SetType(new_info.GetType());
47 SetOwnerID(new_info.GetOwnerID());
48 if (new_info.ExistValue(kNIMTeamInfoKeyLevel))
49 SetLevel(new_info.GetLevel());
51 SetProperty(new_info.GetProperty());
52 if (new_info.ExistValue(kNIMTeamInfoKeyIntro))
53 SetIntro(new_info.GetIntro());
55 SetAnnouncement(new_info.GetAnnouncement());
57 SetJoinMode(new_info.GetJoinMode());
58 // 群属性,开发者无需关注 20161011 by Oleg
59 // if (new_info.ExistValue(kTeamInfoKeyConfigBits))
60 // SetConfigBits(new_info.GetConfigBits());
62 SetCustom(new_info.GetCustom());
63 if (new_info.ExistValue(kNIMTeamInfoKeyIcon))
64 SetIcon(new_info.GetIcon());
66 SetBeInviteMode(new_info.GetBeInviteMode());
68 SetInviteMode(new_info.GetInviteMode());
70 SetUpdateInfoMode(new_info.GetUpdateInfoMode());
72 SetUpdateCustomMode(new_info.GetUpdateCustomMode());
73 if (new_info.ExistValue(kNIMTeamInfoKeyID))
74 SetTeamID(new_info.GetTeamID());
76 SetValid(new_info.IsValid());
78 SetMemberValid(new_info.IsMemberValid());
80 SetMemberCount(new_info.GetMemberCount());
82 SetMemberListTimetag(new_info.GetMemberListTimetag());
84 SetCreateTimetag(new_info.GetCreateTimetag());
86 SetUpdateTimetag(new_info.GetUpdateTimetag());
88 SetServerCustom(new_info.GetServerCustom());
90 SetMute(new_info.GetMuteType());
91 }
92
93public:
95 void SetTeamID(const std::string& id) { team_info_json_value_[nim::kNIMTeamInfoKeyID] = id; }
96
98 std::string GetTeamID() const { return team_info_json_value_[nim::kNIMTeamInfoKeyID].asString(); }
99
101 void SetName(const std::string& name) { team_info_json_value_[nim::kNIMTeamInfoKeyName] = name; }
102
104 std::string GetName() const { return team_info_json_value_[nim::kNIMTeamInfoKeyName].asString(); }
105
107 void SetType(nim::NIMTeamType type) { team_info_json_value_[nim::kNIMTeamInfoKeyType] = type; }
108
110 nim::NIMTeamType GetType() const { return (NIMTeamType)team_info_json_value_[nim::kNIMTeamInfoKeyType].asUInt(); }
111
113 bool TypeIsValid() const { return team_info_json_value_.isMember(nim::kNIMTeamInfoKeyType); }
114
116 void SetOwnerID(const std::string& id) { team_info_json_value_[nim::kNIMTeamInfoKeyCreator] = id; }
117
119 std::string GetOwnerID() const { return team_info_json_value_[nim::kNIMTeamInfoKeyCreator].asString(); }
121 void SetMemberMaxCount(int count) {
122 team_info_json_value_[nim::kNIMTeamInfoKeyMemberMaxCount] = count;
123 team_info_json_value_[nim::kNIMTeamInfoKeyLevel] = count;
124 }
125
127 int GetMemberMaxCount() const { return team_info_json_value_[nim::kNIMTeamInfoKeyMemberMaxCount].asUInt(); }
129 void SetProperty(const std::string& prop) { team_info_json_value_[nim::kNIMTeamInfoKeyProperty] = prop; }
130
132 std::string GetProperty() const { return team_info_json_value_[nim::kNIMTeamInfoKeyProperty].asString(); }
133
135 void SetValid(bool valid) { team_info_json_value_[nim::kNIMTeamInfoKeyValidFlag] = valid ? 1 : 0; }
136
138 bool IsValid() const { return team_info_json_value_[nim::kNIMTeamInfoKeyValidFlag].asUInt() == 1; }
139
141 void SetMemberCount(int count) { team_info_json_value_[nim::kNIMTeamInfoKeyMemberCount] = count; }
142
144 int GetMemberCount() const { return team_info_json_value_[nim::kNIMTeamInfoKeyMemberCount].asUInt(); }
145
147 void SetMemberListTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMTeamInfoKeyListTime] = timetag; }
148
150 int64_t GetMemberListTimetag() const { return team_info_json_value_[nim::kNIMTeamInfoKeyListTime].asUInt64(); }
151
153 void SetCreateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMTeamInfoKeyCreateTime] = timetag; }
154
156 int64_t GetCreateTimetag() const { return team_info_json_value_[nim::kNIMTeamInfoKeyCreateTime].asUInt64(); }
157
159 void SetUpdateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMTeamInfoKeyUpdateTime] = timetag; }
160
162 int64_t GetUpdateTimetag() const { return team_info_json_value_[nim::kNIMTeamInfoKeyUpdateTime].asUInt64(); }
163
165 void SetMemberValid(bool valid) { team_info_json_value_[nim::kNIMTeamInfoKeyMemberValid] = valid ? 1 : 0; }
166
168 bool IsMemberValid() const { return team_info_json_value_[nim::kNIMTeamInfoKeyMemberValid].asUInt() == 1; }
169
171 void SetIntro(const std::string& intro) { team_info_json_value_[nim::kNIMTeamInfoKeyIntro] = intro; }
172
174 std::string GetIntro() const { return team_info_json_value_[nim::kNIMTeamInfoKeyIntro].asString(); }
175
177 void SetAnnouncement(const std::string& announcement) { team_info_json_value_[nim::kNIMTeamInfoKeyAnnouncement] = announcement; }
178
180 std::string GetAnnouncement() const { return team_info_json_value_[nim::kNIMTeamInfoKeyAnnouncement].asString(); }
181
183 void SetJoinMode(nim::NIMTeamJoinMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyJoinMode] = mode; }
184
186 nim::NIMTeamJoinMode GetJoinMode() const { return (NIMTeamJoinMode)team_info_json_value_[nim::kNIMTeamInfoKeyJoinMode].asUInt(); }
187
189 // void SetConfigBits(int64_t bit)
190 //{
191 // team_info_json_value_[nim::kNIMTeamInfoKeyBits] = bit;
192 //}
193
195 // int64_t GetConfigBits() const
196 //{
197 // return team_info_json_value_[nim::kNIMTeamInfoKeyBits].asUInt64();
198 //}
199
201 void SetCustom(const std::string& custom) { team_info_json_value_[nim::kNIMTeamInfoKeyCustom] = custom; }
202
204 std::string GetCustom() const { return team_info_json_value_[nim::kNIMTeamInfoKeyCustom].asString(); }
205
207 void SetServerCustom(const std::string& custom) { team_info_json_value_[nim::kNIMTeamInfoKeyServerCustom] = custom; }
208
210 std::string GetServerCustom() const { return team_info_json_value_[nim::kNIMTeamInfoKeyServerCustom].asString(); }
211
213 void SetIcon(const std::string& icon) { team_info_json_value_[nim::kNIMTeamInfoKeyIcon] = icon; }
214
216 std::string GetIcon() const { return team_info_json_value_[nim::kNIMTeamInfoKeyIcon].asString(); }
217
219 void SetBeInviteMode(NIMTeamBeInviteMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyBeInviteMode] = mode; }
220
222 NIMTeamBeInviteMode GetBeInviteMode() const { return (NIMTeamBeInviteMode)team_info_json_value_[nim::kNIMTeamInfoKeyBeInviteMode].asUInt(); }
223
225 void SetInviteMode(NIMTeamInviteMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyInviteMode] = mode; }
226
228 NIMTeamInviteMode GetInviteMode() const { return (NIMTeamInviteMode)team_info_json_value_[nim::kNIMTeamInfoKeyInviteMode].asUInt(); }
229
231 void SetUpdateInfoMode(NIMTeamUpdateInfoMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyUpdateInfoMode] = mode; }
232
235 return (NIMTeamUpdateInfoMode)team_info_json_value_[nim::kNIMTeamInfoKeyUpdateInfoMode].asUInt();
236 }
237
239 void SetUpdateCustomMode(NIMTeamUpdateCustomMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyUpdateCustomMode] = mode; }
240
243 return (NIMTeamUpdateCustomMode)team_info_json_value_[nim::kNIMTeamInfoKeyUpdateCustomMode].asUInt();
244 }
246 void SetMute(NIMTeamMuteType mute_type) { team_info_json_value_[nim::kNIMTeamInfoKeyMuteType] = mute_type; }
247
250 if (team_info_json_value_.isMember(nim::kNIMTeamInfoKeyMuteAll) && team_info_json_value_[nim::kNIMTeamInfoKeyMuteAll].asUInt() == 1)
252 return (NIMTeamMuteType)team_info_json_value_[nim::kNIMTeamInfoKeyMuteType].asUInt();
253 }
254
260 bool ExistValue(const std::string& nim_team_info_key) const { return team_info_json_value_.isMember(nim_team_info_key); }
261
266 std::string ToJsonString() const { return GetJsonStringWithNoStyled(team_info_json_value_); }
267
272 nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return team_info_json_value_; }
273
274private:
276 void SetLevel(int level) { team_info_json_value_[nim::kNIMTeamInfoKeyLevel] = level; }
277
279 int GetLevel() const { return team_info_json_value_[nim::kNIMTeamInfoKeyLevel].asUInt(); }
280
281public:
283};
284
287public:
289 TeamMemberProperty(const std::string& team_id, const std::string& accid, const nim::NIMTeamUserType type) {
290 member_info_json_value_[kNIMTeamUserKeyID] = team_id;
291 member_info_json_value_[kNIMTeamUserKeyAccID] = accid;
292 member_info_json_value_[kNIMTeamUserKeyType] = type;
293 }
294
297
298public:
300 void SetTeamID(const std::string& id) { member_info_json_value_[kNIMTeamUserKeyID] = id; }
301
303 std::string GetTeamID() const { return member_info_json_value_[kNIMTeamUserKeyID].asString(); }
304
306 void SetAccountID(const std::string& id) { member_info_json_value_[kNIMTeamUserKeyAccID] = id; }
307
309 std::string GetAccountID() const { return member_info_json_value_[kNIMTeamUserKeyAccID].asString(); }
310
312 void SetUserType(nim::NIMTeamUserType type) { member_info_json_value_[kNIMTeamUserKeyType] = type; }
313
315 nim::NIMTeamUserType GetUserType() const { return (nim::NIMTeamUserType)member_info_json_value_[kNIMTeamUserKeyType].asUInt(); }
316
318 void SetNick(const std::string& nick) { member_info_json_value_[kNIMTeamUserKeyNick] = nick; }
319
321 std::string GetNick() const { return member_info_json_value_[kNIMTeamUserKeyNick].asString(); }
322
324 void SetBits(int64_t bit) { member_info_json_value_[kNIMTeamUserKeyBits] = bit; }
325
327 int64_t GetBits() const { return member_info_json_value_[kNIMTeamUserKeyBits].asUInt64(); }
328
330 void SetValid(bool valid) { member_info_json_value_[kNIMTeamUserKeyValidFlag] = valid ? 1 : 0; }
331
333 bool IsValid() const { return member_info_json_value_[kNIMTeamUserKeyValidFlag].asUInt() == 1; }
334
336 void SetCreateTimetag(int64_t timetag) { member_info_json_value_[kNIMTeamUserKeyCreateTime] = timetag; }
337
339 int64_t GetCreateTimetag() const { return member_info_json_value_[kNIMTeamUserKeyCreateTime].asUInt64(); }
340
342 void SetUpdateTimetag(int64_t timetag) { member_info_json_value_[kNIMTeamUserKeyUpdateTime] = timetag; }
343
345 int64_t GetUpdateTimetag() const { return member_info_json_value_[kNIMTeamUserKeyUpdateTime].asUInt64(); }
346
348 void SetMute(bool mute) { member_info_json_value_[kNIMTeamUserKeyMute] = mute ? 1 : 0; }
349
351 bool IsMute() const { return member_info_json_value_[kNIMTeamUserKeyMute].asUInt() == 1; }
352
354 void SetCustom(const std::string& custom) { member_info_json_value_[kNIMTeamUserKeyCustom] = custom; }
356 std::string GetCustom() const { return member_info_json_value_[kNIMTeamUserKeyCustom].asString(); }
357 void SetInvitorAccID(const std::string& invitor_accid) { member_info_json_value_[kNIMTeamUserKeyInvitorAccID] = invitor_accid; }
358 std::string GetInvitorAccID() const { return member_info_json_value_[kNIMTeamUserKeyInvitorAccID].asString(); }
359 void SetFollowMember(const std::string& follow_member) {
362 reader.parse(follow_member, follow_member_array);
363 member_info_json_value_[kNIMTeamUserKeyFollowMember] = follow_member_array;
364 }
365 std::vector<std::string> GetFollowMember() const {
366 nim_cpp_wrapper_util::Json::Value follow_member_array = member_info_json_value_[kNIMTeamUserKeyFollowMember];
367 std::vector<std::string> follow_member;
368 for (auto& it : follow_member_array) {
369 follow_member.push_back(it.asString());
370 }
371 return follow_member;
372 }
378 bool ExistValue(const std::string& nim_team_user_key) const { return member_info_json_value_.isMember(nim_team_user_key); }
379
384 std::string ToJsonString() const { return GetJsonStringWithNoStyled(member_info_json_value_); }
385
390 nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return member_info_json_value_; }
391
392public:
394};
395
403 std::string team_id_;
405 std::list<std::string> ids_;
407 std::list<std::string> invalid_ids_;
409 std::list<UserNameCard> namecards_;
415 bool opt_;
417 std::string attach_;
420};
421
427};
428
432 std::set<nim::NIMTeamUserType> role_types_;
434 uint32_t offset_{0};
438 uint32_t limit_{10};
439};
440
444 std::list<TeamMemberProperty> team_member_propertys_;
446 uint32_t offset_{0};
448 bool finished_{false};
449};
450
462 const std::string& team_id,
463 const NIMNotificationId notification_id,
464 const std::string& team_event_json,
465 TeamEvent& team_event);
466
473NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamInfoJson(const nim_cpp_wrapper_util::Json::Value& team_info_json, TeamInfo& team_info);
474
481NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfoJson(const std::string& team_info_json, TeamInfo& team_info);
482
489NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfosJson(const std::string& team_infos_json, std::list<TeamInfo>& team_infos);
490
498 TeamMemberProperty& team_member_property);
499
506NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertyJson(const std::string& team_member_prop_json, TeamMemberProperty& team_member_property);
507
514NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertysJson(const std::string& team_member_props_json,
515 std::list<TeamMemberProperty>& team_member_propertys);
516} // namespace nim
517
518#endif //_NIM_SDK_CPP_TEAM_HELPER_H_
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
@ arrayValue
array value (ordered list)
Definition: value.h:115
namespace nim
void ParseTeamEvent(int rescode, const std::string &team_id, const NIMNotificationId notification_id, const std::string &team_event_json, TeamEvent &team_event)
解析群组事件通知
Definition: nim_team_helper.cpp:11
bool ParseTeamInfosJson(const std::string &team_infos_json, std::list< TeamInfo > &team_infos)
解析群组信息
Definition: nim_team_helper.cpp:159
void ParseTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value &team_member_prop_json, TeamMemberProperty &team_member_property)
解析群成员信息
Definition: nim_team_helper.cpp:174
void ParseTeamInfoJson(const nim_cpp_wrapper_util::Json::Value &team_info_json, TeamInfo &team_info)
解析群组信息
Definition: nim_team_helper.cpp:116
TeamQueryOrder
Definition: nim_team_helper.h:422
@ kTeamQueryOrderDesc
按时间降序排列
Definition: nim_team_helper.h:424
@ kTeamQueryOrderAsc
按时间升序排列
Definition: nim_team_helper.h:426
bool ParseTeamMemberPropertysJson(const std::string &team_member_props_json, std::list< TeamMemberProperty > &team_member_propertys)
解析群成员信息
Definition: nim_team_helper.cpp:202
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
NIM 公共数据类型定义总的包含文件
JSON辅助方法
NIMNotificationId
Definition: nim_msglog_def.h:338
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
加载 NIM SDK 的帮助类头文件
static const char * kNIMTeamUserKeyBits
long,群成员属性,位操作(NIMTeamBitsConfigMask)
Definition: nim_team_def.h:315
static const char * kNIMTeamInfoKeyType
int,群类型(NIMTeamType)
Definition: nim_team_def.h:225
static const char * kNIMTeamInfoKeyUpdateTime
long,群信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:243
NIMTeamBeInviteMode
Definition: nim_team_def.h:176
static const char * kNIMTeamUserKeyUpdateTime
long,群成员信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:321
static const char * kNIMTeamInfoKeyProperty
string,群性质,长度限制:6000字符
Definition: nim_team_def.h:233
static const char * kNIMTeamInfoKeyListTime
long,群列表时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:239
static const char * kNIMTeamInfoKeyMemberValid
int,群有效性标记位,客户端用,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:245
static const char * kNIMTeamInfoKeyCreator
string 群拥有者ID,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:227
static const char * kNIMTeamInfoKeyUpdateInfoMode
int, 谁可以修改群资料,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateInfoModeManager(0)/kNIMTeamUpdateInfoModeEveryone(1)
Definition: nim_team_def.h:265
static const char * kNIMTeamUserKeyType
int,群成员类型(NIMTeamUserType),默认kNIMTeamUserTypeNomal(0)
Definition: nim_team_def.h:311
static const char * kNIMTeamInfoKeyLevel
int,■■已废弃■■ 群等级,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:229
NIMTeamType
Definition: nim_team_def.h:296
static const char * kNIMTeamUserKeyNick
string,群成员昵称
Definition: nim_team_def.h:313
static const char * kNIMTeamInfoKeyName
string,群名称
Definition: nim_team_def.h:223
NIMTeamMuteType
Definition: nim_team_def.h:276
@ kNIMTeamMuteTypeNomalMute
普通成员禁言
Definition: nim_team_def.h:280
static const char * kNIMTeamInfoKeyCustom
string, 第三方扩展字段(仅负责存储和透传)
Definition: nim_team_def.h:255
static const char * kNIMTeamInfoKeyBeInviteMode
int, 被邀请人同意方式,属性本身只有群主管理员可以修改,默认kNIMTeamBeInviteModeNeedAgree(0)/kNIMTeamBeInviteModeNotNeedAgree(1)
Definition: nim_team_def.h:261
static const char * kNIMTeamUserKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:307
static const char * kNIMTeamUserKeyCustom
string,群成员自定义扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_team_def.h:323
static const char * kNIMTeamInfoKeyJoinMode
int,入群模式(NIMTeamJoinMode),默认为kNIMTeamJoinModeNoAuth(0),不需要验证
Definition: nim_team_def.h:251
static const char * kNIMTeamInfoKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:221
NIMTeamJoinMode
Definition: nim_team_def.h:347
static const char * kNIMTeamInfoKeyAnnouncement
string,群公告,长度限制:5000字符
Definition: nim_team_def.h:249
static const char * kNIMTeamUserKeyCreateTime
long,入群时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:319
NIMTeamUpdateCustomMode
Definition: nim_team_def.h:200
static const char * kNIMTeamUserKeyInvitorAccID
string,邀请者的accid 主动入群的时为空,尚未进行过初始化为" "
Definition: nim_team_def.h:327
static const char * kNIMTeamInfoKeyServerCustom
string, 第三方服务器扩展字段(该配置项只能通过服务器接口设置,对客户端只读)
Definition: nim_team_def.h:257
NIMTeamInviteMode
Definition: nim_team_def.h:184
static const char * kNIMTeamInfoKeyValidFlag
int,群有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:235
static const char * kNIMTeamUserKeyValidFlag
int,群成员有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:317
static const char * kNIMTeamInfoKeyIcon
string, 群头像,长度限制:1024字符
Definition: nim_team_def.h:259
static const char * kNIMTeamInfoKeyIntro
string,群介绍,长度限制:255字符
Definition: nim_team_def.h:247
static const char * kNIMTeamInfoKeyUpdateCustomMode
int, 谁可以更新群自定义属性,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateCustomModeManager(0)/kNIMTeamUpdateCustomModeEveryon...
Definition: nim_team_def.h:267
static const char * kNIMTeamInfoKeyMuteType
Definition: nim_team_def.h:270
static const char * kNIMTeamInfoKeyCreateTime
long,群创建时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:241
NIMTeamUpdateInfoMode
Definition: nim_team_def.h:192
static const char * kNIMTeamUserKeyMute
int,是否被禁言,0-非禁言(默认),1-禁言
Definition: nim_team_def.h:325
static const char * kNIMTeamInfoKeyInviteMode
int, 谁可以邀请他人入群,属性本身只有群主管理员可以修改,默认kNIMTeamInviteModeManager(0)/kNIMTeamInviteModeEveryone(1)
Definition: nim_team_def.h:263
static const char * kNIMTeamUserKeyAccID
string,群成员id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:309
static const char * kNIMTeamUserKeyFollowMember
string,特别关注列表
Definition: nim_team_def.h:329
static const char * kNIMTeamInfoKeyMemberCount
int,群成员数量,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:237
static const char * kNIMTeamInfoKeyMuteAll
int, 群全员禁言标记 0:未禁言,1:禁言, 开发者只读 无法设置
Definition: nim_team_def.h:269
SDK用户信息辅助方法
NIMResCode
Definition: public_defines.h:21
群组事件通知
Definition: nim_team_helper.h:397
TeamMemberProperty member_property_
群成员属性
Definition: nim_team_helper.h:413
std::string attach_
扩展字段,目前仅kick和invite事件可选
Definition: nim_team_helper.h:417
bool opt_
操作
Definition: nim_team_helper.h:415
std::string team_id_
群组ID
Definition: nim_team_helper.h:403
nim_cpp_wrapper_util::Json::Value src_data_
未解析过的原信息,目前仅支持群消息未读数相关事件
Definition: nim_team_helper.h:419
std::list< UserNameCard > namecards_
通知可能涉及到的群成员的用户名片
Definition: nim_team_helper.h:409
TeamInfo team_info_
通知可能涉及到的群信息
Definition: nim_team_helper.h:411
std::list< std::string > ids_
通知可能涉及到的群成员ID
Definition: nim_team_helper.h:405
std::list< std::string > invalid_ids_
通知可能涉及到的失效的群成员ID,比如邀请入群的成员的群数量超限导致当次邀请失败
Definition: nim_team_helper.h:407
NIMNotificationId notification_id_
通知类型ID
Definition: nim_team_helper.h:401
NIMResCode res_code_
错误码
Definition: nim_team_helper.h:399
群组信息
Definition: nim_team_helper.h:25
nim::NIMTeamType GetType() const
Definition: nim_team_helper.h:110
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取JsonValue格式的数据
Definition: nim_team_helper.h:272
nim_cpp_wrapper_util::Json::Value team_info_json_value_
Definition: nim_team_helper.h:282
void SetServerCustom(const std::string &custom)
Definition: nim_team_helper.h:207
NIMTeamUpdateCustomMode GetUpdateCustomMode() const
Definition: nim_team_helper.h:242
void SetMute(NIMTeamMuteType mute_type)
Definition: nim_team_helper.h:246
TeamInfo(const std::string &team_id, const nim::NIMTeamType type)
Definition: nim_team_helper.h:28
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_team_helper.h:266
TeamInfo()
Definition: nim_team_helper.h:34
NIMTeamBeInviteMode GetBeInviteMode() const
Definition: nim_team_helper.h:222
void Update(const TeamInfo &new_info)
Definition: nim_team_helper.h:41
void operator=(const TeamInfo &new_info)
Definition: nim_team_helper.h:38
std::string GetTeamID() const
Definition: nim_team_helper.h:98
void SetMemberListTimetag(int64_t timetag)
Definition: nim_team_helper.h:147
void SetUpdateTimetag(int64_t timetag)
Definition: nim_team_helper.h:159
std::string GetOwnerID() const
Definition: nim_team_helper.h:119
std::string GetCustom() const
Definition: nim_team_helper.h:204
std::string GetIcon() const
Definition: nim_team_helper.h:216
void SetName(const std::string &name)
Definition: nim_team_helper.h:101
bool IsValid() const
Definition: nim_team_helper.h:138
int64_t GetUpdateTimetag() const
Definition: nim_team_helper.h:162
void SetCreateTimetag(int64_t timetag)
Definition: nim_team_helper.h:153
std::string GetServerCustom() const
Definition: nim_team_helper.h:210
void SetIntro(const std::string &intro)
Definition: nim_team_helper.h:171
void SetValid(bool valid)
Definition: nim_team_helper.h:135
int GetMemberCount() const
Definition: nim_team_helper.h:144
void SetUpdateInfoMode(NIMTeamUpdateInfoMode mode)
Definition: nim_team_helper.h:231
std::string GetAnnouncement() const
Definition: nim_team_helper.h:180
void SetMemberCount(int count)
Definition: nim_team_helper.h:141
void SetAnnouncement(const std::string &announcement)
Definition: nim_team_helper.h:177
int GetLevel() const
Definition: nim_team_helper.h:279
bool IsMemberValid() const
Definition: nim_team_helper.h:168
NIMTeamUpdateInfoMode GetUpdateInfoMode() const
Definition: nim_team_helper.h:234
bool ExistValue(const std::string &nim_team_info_key) const
群组信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_team_helper.h:260
int64_t GetMemberListTimetag() const
Definition: nim_team_helper.h:150
void SetType(nim::NIMTeamType type)
Definition: nim_team_helper.h:107
void SetCustom(const std::string &custom)
Definition: nim_team_helper.h:201
void SetProperty(const std::string &prop)
Definition: nim_team_helper.h:129
void SetMemberValid(bool valid)
Definition: nim_team_helper.h:165
void SetUpdateCustomMode(NIMTeamUpdateCustomMode mode)
Definition: nim_team_helper.h:239
NIMTeamMuteType GetMuteType() const
Definition: nim_team_helper.h:249
std::string GetProperty() const
Definition: nim_team_helper.h:132
bool TypeIsValid() const
Definition: nim_team_helper.h:113
void SetBeInviteMode(NIMTeamBeInviteMode mode)
Definition: nim_team_helper.h:219
nim::NIMTeamJoinMode GetJoinMode() const
Definition: nim_team_helper.h:186
std::string GetIntro() const
Definition: nim_team_helper.h:174
NIMTeamInviteMode GetInviteMode() const
Definition: nim_team_helper.h:228
std::string GetName() const
Definition: nim_team_helper.h:104
void SetLevel(int level)
Definition: nim_team_helper.h:276
void SetOwnerID(const std::string &id)
Definition: nim_team_helper.h:116
void SetInviteMode(NIMTeamInviteMode mode)
Definition: nim_team_helper.h:225
int64_t GetCreateTimetag() const
Definition: nim_team_helper.h:156
int GetMemberMaxCount() const
Definition: nim_team_helper.h:127
void SetTeamID(const std::string &id)
Definition: nim_team_helper.h:95
void SetIcon(const std::string &icon)
Definition: nim_team_helper.h:213
void SetJoinMode(nim::NIMTeamJoinMode mode)
Definition: nim_team_helper.h:183
void SetMemberMaxCount(int count)
Definition: nim_team_helper.h:121
群组成员信息
Definition: nim_team_helper.h:286
std::string GetCustom() const
Definition: nim_team_helper.h:356
std::string GetInvitorAccID() const
Definition: nim_team_helper.h:358
void SetCreateTimetag(int64_t timetag)
Definition: nim_team_helper.h:336
std::string GetAccountID() const
Definition: nim_team_helper.h:309
void SetUpdateTimetag(int64_t timetag)
Definition: nim_team_helper.h:342
nim::NIMTeamUserType GetUserType() const
Definition: nim_team_helper.h:315
void SetUserType(nim::NIMTeamUserType type)
Definition: nim_team_helper.h:312
void SetAccountID(const std::string &id)
Definition: nim_team_helper.h:306
nim_cpp_wrapper_util::Json::Value member_info_json_value_
Definition: nim_team_helper.h:393
int64_t GetCreateTimetag() const
Definition: nim_team_helper.h:339
void SetFollowMember(const std::string &follow_member)
Definition: nim_team_helper.h:359
void SetCustom(const std::string &custom)
Definition: nim_team_helper.h:354
void SetNick(const std::string &nick)
Definition: nim_team_helper.h:318
std::string GetNick() const
Definition: nim_team_helper.h:321
TeamMemberProperty(const std::string &team_id, const std::string &accid, const nim::NIMTeamUserType type)
Definition: nim_team_helper.h:289
std::vector< std::string > GetFollowMember() const
Definition: nim_team_helper.h:365
std::string GetTeamID() const
Definition: nim_team_helper.h:303
TeamMemberProperty()
Definition: nim_team_helper.h:296
bool IsValid() const
Definition: nim_team_helper.h:333
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_team_helper.h:384
void SetBits(int64_t bit)
Definition: nim_team_helper.h:324
int64_t GetUpdateTimetag() const
Definition: nim_team_helper.h:345
int64_t GetBits() const
Definition: nim_team_helper.h:327
bool ExistValue(const std::string &nim_team_user_key) const
群成员信息信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_team_helper.h:378
void SetInvitorAccID(const std::string &invitor_accid)
Definition: nim_team_helper.h:357
void SetTeamID(const std::string &id)
Definition: nim_team_helper.h:300
bool IsMute() const
Definition: nim_team_helper.h:351
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取member info json value
Definition: nim_team_helper.h:390
void SetMute(bool mute)
Definition: nim_team_helper.h:348
void SetValid(bool valid)
Definition: nim_team_helper.h:330
群成员检索参数
Definition: nim_team_helper.h:430
std::set< nim::NIMTeamUserType > role_types_
群成员类型列表
Definition: nim_team_helper.h:432
群成员搜索结果
Definition: nim_team_helper.h:442
std::list< TeamMemberProperty > team_member_propertys_
群成员信息列表
Definition: nim_team_helper.h:444