NIM PC Cross Platform SDK
nim_team_helper.h
Go to the documentation of this file.
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 <string>
16#include "nim_define_include.h"
22namespace nim {
24struct NIM_SDK_CPPWRAPPER_DLL_API TeamInfo {
25public:
27 TeamInfo(const std::string& team_id, const nim::NIMTeamType type) {
28 team_info_json_value_[nim::kNIMTeamInfoKeyID] = team_id;
29 team_info_json_value_[nim::kNIMTeamInfoKeyType] = type;
30 }
31
34
35public:
37 void operator=(const TeamInfo& new_info) { Update(new_info); }
38
40 void Update(const TeamInfo& new_info) {
41 if (new_info.ExistValue(kNIMTeamInfoKeyName))
42 SetName(new_info.GetName());
43 if (new_info.ExistValue(kNIMTeamInfoKeyType))
44 SetType(new_info.GetType());
46 SetOwnerID(new_info.GetOwnerID());
47 if (new_info.ExistValue(kNIMTeamInfoKeyLevel))
48 SetLevel(new_info.GetLevel());
50 SetProperty(new_info.GetProperty());
51 if (new_info.ExistValue(kNIMTeamInfoKeyIntro))
52 SetIntro(new_info.GetIntro());
54 SetAnnouncement(new_info.GetAnnouncement());
56 SetJoinMode(new_info.GetJoinMode());
57 // 群属性,开发者无需关注 20161011 by Oleg
58 // if (new_info.ExistValue(kTeamInfoKeyConfigBits))
59 // SetConfigBits(new_info.GetConfigBits());
61 SetCustom(new_info.GetCustom());
62 if (new_info.ExistValue(kNIMTeamInfoKeyIcon))
63 SetIcon(new_info.GetIcon());
65 SetBeInviteMode(new_info.GetBeInviteMode());
67 SetInviteMode(new_info.GetInviteMode());
69 SetUpdateInfoMode(new_info.GetUpdateInfoMode());
71 SetUpdateCustomMode(new_info.GetUpdateCustomMode());
72 if (new_info.ExistValue(kNIMTeamInfoKeyID))
73 SetTeamID(new_info.GetTeamID());
75 SetValid(new_info.IsValid());
77 SetMemberValid(new_info.IsMemberValid());
79 SetMemberCount(new_info.GetMemberCount());
81 SetMemberListTimetag(new_info.GetMemberListTimetag());
83 SetCreateTimetag(new_info.GetCreateTimetag());
85 SetUpdateTimetag(new_info.GetUpdateTimetag());
87 SetServerCustom(new_info.GetServerCustom());
88 if (new_info.ExistValue(kNIMTeamInfoKeyMuteAll) || new_info.ExistValue(kNIMTeamInfoKeyMuteType))
89 SetMute(new_info.GetMuteType());
90 }
91
92public:
94 void SetTeamID(const std::string& id) { team_info_json_value_[nim::kNIMTeamInfoKeyID] = id; }
95
97 std::string GetTeamID() const { return team_info_json_value_[nim::kNIMTeamInfoKeyID].asString(); }
98
100 void SetName(const std::string& name) { team_info_json_value_[nim::kNIMTeamInfoKeyName] = name; }
101
103 std::string GetName() const { return team_info_json_value_[nim::kNIMTeamInfoKeyName].asString(); }
104
106 void SetType(nim::NIMTeamType type) { team_info_json_value_[nim::kNIMTeamInfoKeyType] = type; }
107
109 nim::NIMTeamType GetType() const { return (NIMTeamType)team_info_json_value_[nim::kNIMTeamInfoKeyType].asUInt(); }
110
112 void SetOwnerID(const std::string& id) { team_info_json_value_[nim::kNIMTeamInfoKeyCreator] = id; }
113
115 std::string GetOwnerID() const { return team_info_json_value_[nim::kNIMTeamInfoKeyCreator].asString(); }
117 void SetMemberMaxCount(int count) {
118 team_info_json_value_[nim::kNIMTeamInfoKeyMemberMaxCount] = count;
119 team_info_json_value_[nim::kNIMTeamInfoKeyLevel] = count;
120 }
121
123 int GetMemberMaxCount() const { return team_info_json_value_[nim::kNIMTeamInfoKeyMemberMaxCount].asUInt(); }
125 void SetProperty(const std::string& prop) { team_info_json_value_[nim::kNIMTeamInfoKeyProperty] = prop; }
126
128 std::string GetProperty() const { return team_info_json_value_[nim::kNIMTeamInfoKeyProperty].asString(); }
129
131 void SetValid(bool valid) { team_info_json_value_[nim::kNIMTeamInfoKeyValidFlag] = valid ? 1 : 0; }
132
134 bool IsValid() const { return team_info_json_value_[nim::kNIMTeamInfoKeyValidFlag].asUInt() == 1; }
135
137 void SetMemberCount(int count) { team_info_json_value_[nim::kNIMTeamInfoKeyMemberCount] = count; }
138
140 int GetMemberCount() const { return team_info_json_value_[nim::kNIMTeamInfoKeyMemberCount].asUInt(); }
141
143 void SetMemberListTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMTeamInfoKeyListTime] = timetag; }
144
146 int64_t GetMemberListTimetag() const { return team_info_json_value_[nim::kNIMTeamInfoKeyListTime].asUInt64(); }
147
149 void SetCreateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMTeamInfoKeyCreateTime] = timetag; }
150
152 int64_t GetCreateTimetag() const { return team_info_json_value_[nim::kNIMTeamInfoKeyCreateTime].asUInt64(); }
153
155 void SetUpdateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMTeamInfoKeyUpdateTime] = timetag; }
156
158 int64_t GetUpdateTimetag() const { return team_info_json_value_[nim::kNIMTeamInfoKeyUpdateTime].asUInt64(); }
159
161 void SetMemberValid(bool valid) { team_info_json_value_[nim::kNIMTeamInfoKeyMemberValid] = valid ? 1 : 0; }
162
164 bool IsMemberValid() const { return team_info_json_value_[nim::kNIMTeamInfoKeyMemberValid].asUInt() == 1; }
165
167 void SetIntro(const std::string& intro) { team_info_json_value_[nim::kNIMTeamInfoKeyIntro] = intro; }
168
170 std::string GetIntro() const { return team_info_json_value_[nim::kNIMTeamInfoKeyIntro].asString(); }
171
173 void SetAnnouncement(const std::string& announcement) { team_info_json_value_[nim::kNIMTeamInfoKeyAnnouncement] = announcement; }
174
176 std::string GetAnnouncement() const { return team_info_json_value_[nim::kNIMTeamInfoKeyAnnouncement].asString(); }
177
179 void SetJoinMode(nim::NIMTeamJoinMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyJoinMode] = mode; }
180
182 nim::NIMTeamJoinMode GetJoinMode() const { return (NIMTeamJoinMode)team_info_json_value_[nim::kNIMTeamInfoKeyJoinMode].asUInt(); }
183
185 // void SetConfigBits(int64_t bit)
186 //{
187 // team_info_json_value_[nim::kNIMTeamInfoKeyBits] = bit;
188 //}
189
191 // int64_t GetConfigBits() const
192 //{
193 // return team_info_json_value_[nim::kNIMTeamInfoKeyBits].asUInt64();
194 //}
195
197 void SetCustom(const std::string& custom) { team_info_json_value_[nim::kNIMTeamInfoKeyCustom] = custom; }
198
200 std::string GetCustom() const { return team_info_json_value_[nim::kNIMTeamInfoKeyCustom].asString(); }
201
203 void SetServerCustom(const std::string& custom) { team_info_json_value_[nim::kNIMTeamInfoKeyServerCustom] = custom; }
204
206 std::string GetServerCustom() const { return team_info_json_value_[nim::kNIMTeamInfoKeyServerCustom].asString(); }
207
209 void SetIcon(const std::string& icon) { team_info_json_value_[nim::kNIMTeamInfoKeyIcon] = icon; }
210
212 std::string GetIcon() const { return team_info_json_value_[nim::kNIMTeamInfoKeyIcon].asString(); }
213
215 void SetBeInviteMode(NIMTeamBeInviteMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyBeInviteMode] = mode; }
216
219
221 void SetInviteMode(NIMTeamInviteMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyInviteMode] = mode; }
222
224 NIMTeamInviteMode GetInviteMode() const { return (NIMTeamInviteMode)team_info_json_value_[nim::kNIMTeamInfoKeyInviteMode].asUInt(); }
225
228
231 return (NIMTeamUpdateInfoMode)team_info_json_value_[nim::kNIMTeamInfoKeyUpdateInfoMode].asUInt();
232 }
233
236
239 return (NIMTeamUpdateCustomMode)team_info_json_value_[nim::kNIMTeamInfoKeyUpdateCustomMode].asUInt();
240 }
242 void SetMute(NIMTeamMuteType mute_type) { team_info_json_value_[nim::kNIMTeamInfoKeyMuteType] = mute_type; }
243
246 if (team_info_json_value_.isMember(nim::kNIMTeamInfoKeyMuteAll) && team_info_json_value_[nim::kNIMTeamInfoKeyMuteAll].asUInt() == 1)
248 return (NIMTeamMuteType)team_info_json_value_[nim::kNIMTeamInfoKeyMuteType].asUInt();
249 }
250
256 bool ExistValue(const std::string& nim_team_info_key) const { return team_info_json_value_.isMember(nim_team_info_key); }
257
262 std::string ToJsonString() const { return GetJsonStringWithNoStyled(team_info_json_value_); }
263
268 nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return team_info_json_value_; }
269
270private:
272 void SetLevel(int level) { team_info_json_value_[nim::kNIMTeamInfoKeyLevel] = level; }
273
275 int GetLevel() const { return team_info_json_value_[nim::kNIMTeamInfoKeyLevel].asUInt(); }
276
277public:
278 nim_cpp_wrapper_util::Json::Value team_info_json_value_;
279};
280
282struct NIM_SDK_CPPWRAPPER_DLL_API TeamMemberProperty {
283public:
285 TeamMemberProperty(const std::string& team_id, const std::string& accid, const nim::NIMTeamUserType type) {
286 member_info_json_value_[kNIMTeamUserKeyID] = team_id;
287 member_info_json_value_[kNIMTeamUserKeyAccID] = accid;
288 member_info_json_value_[kNIMTeamUserKeyType] = type;
289 }
290
293
294public:
296 void SetTeamID(const std::string& id) { member_info_json_value_[kNIMTeamUserKeyID] = id; }
297
299 std::string GetTeamID() const { return member_info_json_value_[kNIMTeamUserKeyID].asString(); }
300
302 void SetAccountID(const std::string& id) { member_info_json_value_[kNIMTeamUserKeyAccID] = id; }
303
305 std::string GetAccountID() const { return member_info_json_value_[kNIMTeamUserKeyAccID].asString(); }
306
308 void SetUserType(nim::NIMTeamUserType type) { member_info_json_value_[kNIMTeamUserKeyType] = type; }
309
311 nim::NIMTeamUserType GetUserType() const { return (nim::NIMTeamUserType)member_info_json_value_[kNIMTeamUserKeyType].asUInt(); }
312
314 void SetNick(const std::string& nick) { member_info_json_value_[kNIMTeamUserKeyNick] = nick; }
315
317 std::string GetNick() const { return member_info_json_value_[kNIMTeamUserKeyNick].asString(); }
318
320 void SetBits(int64_t bit) { member_info_json_value_[kNIMTeamUserKeyBits] = bit; }
321
323 int64_t GetBits() const { return member_info_json_value_[kNIMTeamUserKeyBits].asUInt64(); }
324
326 void SetValid(bool valid) { member_info_json_value_[kNIMTeamUserKeyValidFlag] = valid ? 1 : 0; }
327
329 bool IsValid() const { return member_info_json_value_[kNIMTeamUserKeyValidFlag].asUInt() == 1; }
330
332 void SetCreateTimetag(int64_t timetag) { member_info_json_value_[kNIMTeamUserKeyCreateTime] = timetag; }
333
335 int64_t GetCreateTimetag() const { return member_info_json_value_[kNIMTeamUserKeyCreateTime].asUInt64(); }
336
338 void SetUpdateTimetag(int64_t timetag) { member_info_json_value_[kNIMTeamUserKeyUpdateTime] = timetag; }
339
341 int64_t GetUpdateTimetag() const { return member_info_json_value_[kNIMTeamUserKeyUpdateTime].asUInt64(); }
342
344 void SetMute(bool mute) { member_info_json_value_[kNIMTeamUserKeyMute] = mute ? 1 : 0; }
345
347 bool IsMute() const { return member_info_json_value_[kNIMTeamUserKeyMute].asUInt() == 1; }
348
350 void SetCustom(const std::string& custom) { member_info_json_value_[kNIMTeamUserKeyCustom] = custom; }
352 std::string GetCustom() const { return member_info_json_value_[kNIMTeamUserKeyCustom].asString(); }
353 void SetInvitorAccID(const std::string& invitor_accid) { member_info_json_value_[kNIMTeamUserKeyInvitorAccID] = invitor_accid; }
354 std::string GetInvitorAccID() const { return member_info_json_value_[kNIMTeamUserKeyInvitorAccID].asString(); }
360 bool ExistValue(const std::string& nim_team_user_key) const { return member_info_json_value_.isMember(nim_team_user_key); }
361
366 std::string ToJsonString() const { return GetJsonStringWithNoStyled(member_info_json_value_); }
367
372 nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return member_info_json_value_; }
373
374public:
375 nim_cpp_wrapper_util::Json::Value member_info_json_value_;
376};
377
379struct NIM_SDK_CPPWRAPPER_DLL_API TeamEvent {
385 std::string team_id_;
387 std::list<std::string> ids_;
389 std::list<std::string> invalid_ids_;
391 std::list<UserNameCard> namecards_;
397 bool opt_;
399 std::string attach_;
402};
403
414NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamEvent(int rescode,
415 const std::string& team_id,
416 const NIMNotificationId notification_id,
417 const std::string& team_event_json,
418 TeamEvent& team_event);
419
426NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamInfoJson(const nim_cpp_wrapper_util::Json::Value& team_info_json, TeamInfo& team_info);
427
434NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfoJson(const std::string& team_info_json, TeamInfo& team_info);
435
442NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfosJson(const std::string& team_infos_json, std::list<TeamInfo>& team_infos);
443
450NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value& team_member_prop_json,
451 TeamMemberProperty& team_member_property);
452
459NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertyJson(const std::string& team_member_prop_json, TeamMemberProperty& team_member_property);
460
467NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertysJson(const std::string& team_member_props_json,
468 std::list<TeamMemberProperty>& team_member_propertys);
469} // namespace nim
470
471#endif //_NIM_SDK_CPP_TEAM_HELPER_H_
Represents a JSON value.
Definition: value.h:196
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:158
void ParseTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value &team_member_prop_json, TeamMemberProperty &team_member_property)
解析群成员信息
Definition: nim_team_helper.cpp:173
void ParseTeamInfoJson(const nim_cpp_wrapper_util::Json::Value &team_info_json, TeamInfo &team_info)
解析群组信息
Definition: nim_team_helper.cpp:116
bool ParseTeamMemberPropertysJson(const std::string &team_member_props_json, std::list< TeamMemberProperty > &team_member_propertys)
解析群成员信息
Definition: nim_team_helper.cpp:200
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
NIM 公共数据类型定义总的包含文件
JSON辅助方法
NIMNotificationId
Definition: nim_msglog_def.h:338
定义导出宏
加载 NIM SDK 的帮助类头文件
static const char * kNIMTeamUserKeyBits
long,群成员属性,位操作(NIMTeamBitsConfigMask)
Definition: nim_team_def.h:313
static const char * kNIMTeamInfoKeyType
int,群类型(NIMTeamType)
Definition: nim_team_def.h:223
static const char * kNIMTeamInfoKeyUpdateTime
long,群信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:241
NIMTeamBeInviteMode
Definition: nim_team_def.h:174
static const char * kNIMTeamUserKeyUpdateTime
long,群成员信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:319
static const char * kNIMTeamInfoKeyProperty
string,群性质,长度限制:6000字符
Definition: nim_team_def.h:231
static const char * kNIMTeamInfoKeyListTime
long,群列表时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:237
static const char * kNIMTeamInfoKeyMemberValid
int,群有效性标记位,客户端用,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:243
static const char * kNIMTeamInfoKeyCreator
string 群拥有者ID,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:225
static const char * kNIMTeamInfoKeyUpdateInfoMode
int, 谁可以修改群资料,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateInfoModeManager(0)/kNIMTeamUpdateInfoModeEveryone(1)
Definition: nim_team_def.h:263
static const char * kNIMTeamUserKeyType
int,群成员类型(NIMTeamUserType),默认kNIMTeamUserTypeNomal(0)
Definition: nim_team_def.h:309
static const char * kNIMTeamInfoKeyLevel
int,■■已废弃■■ 群等级,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:227
NIMTeamType
Definition: nim_team_def.h:294
static const char * kNIMTeamUserKeyNick
string,群成员昵称
Definition: nim_team_def.h:311
static const char * kNIMTeamInfoKeyName
string,群名称
Definition: nim_team_def.h:221
NIMTeamMuteType
Definition: nim_team_def.h:274
@ kNIMTeamMuteTypeNomalMute
普通成员禁言
Definition: nim_team_def.h:278
static const char * kNIMTeamInfoKeyCustom
string, 第三方扩展字段(仅负责存储和透传)
Definition: nim_team_def.h:253
static const char * kNIMTeamInfoKeyBeInviteMode
int, 被邀请人同意方式,属性本身只有群主管理员可以修改,默认kNIMTeamBeInviteModeNeedAgree(0)/kNIMTeamBeInviteModeNotNeedAgree(1)
Definition: nim_team_def.h:259
static const char * kNIMTeamUserKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:305
static const char * kNIMTeamUserKeyCustom
string,群成员自定义扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_team_def.h:321
static const char * kNIMTeamInfoKeyJoinMode
int,入群模式(NIMTeamJoinMode),默认为kNIMTeamJoinModeNoAuth(0),不需要验证
Definition: nim_team_def.h:249
static const char * kNIMTeamInfoKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:219
NIMTeamJoinMode
Definition: nim_team_def.h:343
static const char * kNIMTeamInfoKeyAnnouncement
string,群公告,长度限制:5000字符
Definition: nim_team_def.h:247
static const char * kNIMTeamInfoKeyMemberMaxCount
int,在创建群时,设置群的最大成员数,不可超过应用设定的最大成员数,否则返回414
Definition: nim_team_def.h:229
static const char * kNIMTeamUserKeyCreateTime
long,入群时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:317
NIMTeamUpdateCustomMode
Definition: nim_team_def.h:198
static const char * kNIMTeamUserKeyInvitorAccID
string,邀请者的accid 主动入群的时为空,尚未进行过初始化为" "
Definition: nim_team_def.h:325
static const char * kNIMTeamInfoKeyServerCustom
string, 第三方服务器扩展字段(该配置项只能通过服务器接口设置,对客户端只读)
Definition: nim_team_def.h:255
NIMTeamInviteMode
Definition: nim_team_def.h:182
static const char * kNIMTeamInfoKeyValidFlag
int,群有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:233
static const char * kNIMTeamUserKeyValidFlag
int,群成员有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:315
static const char * kNIMTeamInfoKeyIcon
string, 群头像,长度限制:1024字符
Definition: nim_team_def.h:257
static const char * kNIMTeamInfoKeyIntro
string,群介绍,长度限制:255字符
Definition: nim_team_def.h:245
static const char * kNIMTeamInfoKeyUpdateCustomMode
int, 谁可以更新群自定义属性,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateCustomModeManager(0)/kNIMTeamUpdateCustomModeEveryon...
Definition: nim_team_def.h:265
static const char * kNIMTeamInfoKeyCreateTime
long,群创建时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:239
NIMTeamUpdateInfoMode
Definition: nim_team_def.h:190
static const char * kNIMTeamUserKeyMute
int,是否被禁言,0-非禁言(默认),1-禁言
Definition: nim_team_def.h:323
static const char * kNIMTeamInfoKeyInviteMode
int, 谁可以邀请他人入群,属性本身只有群主管理员可以修改,默认kNIMTeamInviteModeManager(0)/kNIMTeamInviteModeEveryone(1)
Definition: nim_team_def.h:261
static const char * kNIMTeamUserKeyAccID
string,群成员id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:307
static const char * kNIMTeamInfoKeyMemberCount
int,群成员数量,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:235
NIMTeamUserType
Definition: nim_team_def.h:329
static const char * kNIMTeamInfoKeyMuteAll
int, 群全员禁言标记 0:未禁言,1:禁言, 开发者只读 无法设置
Definition: nim_team_def.h:267
SDK用户信息辅助方法
群组事件通知
Definition: nim_team_helper.h:379
TeamMemberProperty member_property_
群成员属性
Definition: nim_team_helper.h:395
std::string attach_
扩展字段,目前仅kick和invite事件可选
Definition: nim_team_helper.h:399
bool opt_
操作
Definition: nim_team_helper.h:397
std::string team_id_
群组ID
Definition: nim_team_helper.h:385
nim_cpp_wrapper_util::Json::Value src_data_
未解析过的原信息,目前仅支持群消息未读数相关事件
Definition: nim_team_helper.h:401
std::list< UserNameCard > namecards_
通知可能涉及到的群成员的用户名片
Definition: nim_team_helper.h:391
TeamInfo team_info_
通知可能涉及到的群信息
Definition: nim_team_helper.h:393
std::list< std::string > ids_
通知可能涉及到的群成员ID
Definition: nim_team_helper.h:387
std::list< std::string > invalid_ids_
通知可能涉及到的失效的群成员ID,比如邀请入群的成员的群数量超限导致当次邀请失败
Definition: nim_team_helper.h:389
NIMNotificationId notification_id_
通知类型ID
Definition: nim_team_helper.h:383
NIMResCode res_code_
错误码
Definition: nim_team_helper.h:381
群组信息
Definition: nim_team_helper.h:24
nim::NIMTeamType GetType() const
Definition: nim_team_helper.h:109
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取JsonValue格式的数据
Definition: nim_team_helper.h:268
void SetServerCustom(const std::string &custom)
Definition: nim_team_helper.h:203
NIMTeamUpdateCustomMode GetUpdateCustomMode() const
Definition: nim_team_helper.h:238
void SetMute(NIMTeamMuteType mute_type)
Definition: nim_team_helper.h:242
TeamInfo(const std::string &team_id, const nim::NIMTeamType type)
Definition: nim_team_helper.h:27
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_team_helper.h:262
TeamInfo()
Definition: nim_team_helper.h:33
NIMTeamBeInviteMode GetBeInviteMode() const
Definition: nim_team_helper.h:218
void Update(const TeamInfo &new_info)
Definition: nim_team_helper.h:40
void operator=(const TeamInfo &new_info)
Definition: nim_team_helper.h:37
std::string GetTeamID() const
Definition: nim_team_helper.h:97
void SetMemberListTimetag(int64_t timetag)
Definition: nim_team_helper.h:143
void SetUpdateTimetag(int64_t timetag)
Definition: nim_team_helper.h:155
std::string GetOwnerID() const
Definition: nim_team_helper.h:115
std::string GetCustom() const
Definition: nim_team_helper.h:200
std::string GetIcon() const
Definition: nim_team_helper.h:212
void SetName(const std::string &name)
Definition: nim_team_helper.h:100
bool IsValid() const
Definition: nim_team_helper.h:134
int64_t GetUpdateTimetag() const
Definition: nim_team_helper.h:158
void SetCreateTimetag(int64_t timetag)
Definition: nim_team_helper.h:149
std::string GetServerCustom() const
Definition: nim_team_helper.h:206
void SetIntro(const std::string &intro)
Definition: nim_team_helper.h:167
void SetValid(bool valid)
Definition: nim_team_helper.h:131
int GetMemberCount() const
Definition: nim_team_helper.h:140
void SetUpdateInfoMode(NIMTeamUpdateInfoMode mode)
Definition: nim_team_helper.h:227
std::string GetAnnouncement() const
Definition: nim_team_helper.h:176
void SetMemberCount(int count)
Definition: nim_team_helper.h:137
void SetAnnouncement(const std::string &announcement)
Definition: nim_team_helper.h:173
bool IsMemberValid() const
Definition: nim_team_helper.h:164
NIMTeamUpdateInfoMode GetUpdateInfoMode() const
Definition: nim_team_helper.h:230
bool ExistValue(const std::string &nim_team_info_key) const
群组信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_team_helper.h:256
int64_t GetMemberListTimetag() const
Definition: nim_team_helper.h:146
void SetType(nim::NIMTeamType type)
Definition: nim_team_helper.h:106
void SetCustom(const std::string &custom)
Definition: nim_team_helper.h:197
void SetProperty(const std::string &prop)
Definition: nim_team_helper.h:125
void SetMemberValid(bool valid)
Definition: nim_team_helper.h:161
void SetUpdateCustomMode(NIMTeamUpdateCustomMode mode)
Definition: nim_team_helper.h:235
NIMTeamMuteType GetMuteType() const
Definition: nim_team_helper.h:245
std::string GetProperty() const
Definition: nim_team_helper.h:128
void SetBeInviteMode(NIMTeamBeInviteMode mode)
Definition: nim_team_helper.h:215
nim::NIMTeamJoinMode GetJoinMode() const
Definition: nim_team_helper.h:182
std::string GetIntro() const
Definition: nim_team_helper.h:170
NIMTeamInviteMode GetInviteMode() const
Definition: nim_team_helper.h:224
std::string GetName() const
Definition: nim_team_helper.h:103
void SetOwnerID(const std::string &id)
Definition: nim_team_helper.h:112
void SetInviteMode(NIMTeamInviteMode mode)
Definition: nim_team_helper.h:221
int64_t GetCreateTimetag() const
Definition: nim_team_helper.h:152
int GetMemberMaxCount() const
Definition: nim_team_helper.h:123
void SetTeamID(const std::string &id)
Definition: nim_team_helper.h:94
void SetIcon(const std::string &icon)
Definition: nim_team_helper.h:209
void SetJoinMode(nim::NIMTeamJoinMode mode)
Definition: nim_team_helper.h:179
void SetMemberMaxCount(int count)
Definition: nim_team_helper.h:117
群组成员信息
Definition: nim_team_helper.h:282
std::string GetCustom() const
Definition: nim_team_helper.h:352
void SetCreateTimetag(int64_t timetag)
Definition: nim_team_helper.h:332
std::string GetAccountID() const
Definition: nim_team_helper.h:305
void SetUpdateTimetag(int64_t timetag)
Definition: nim_team_helper.h:338
nim::NIMTeamUserType GetUserType() const
Definition: nim_team_helper.h:311
void SetUserType(nim::NIMTeamUserType type)
Definition: nim_team_helper.h:308
void SetAccountID(const std::string &id)
Definition: nim_team_helper.h:302
int64_t GetCreateTimetag() const
Definition: nim_team_helper.h:335
void SetCustom(const std::string &custom)
Definition: nim_team_helper.h:350
void SetNick(const std::string &nick)
Definition: nim_team_helper.h:314
std::string GetNick() const
Definition: nim_team_helper.h:317
TeamMemberProperty(const std::string &team_id, const std::string &accid, const nim::NIMTeamUserType type)
Definition: nim_team_helper.h:285
std::string GetTeamID() const
Definition: nim_team_helper.h:299
TeamMemberProperty()
Definition: nim_team_helper.h:292
bool IsValid() const
Definition: nim_team_helper.h:329
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_team_helper.h:366
void SetBits(int64_t bit)
Definition: nim_team_helper.h:320
int64_t GetUpdateTimetag() const
Definition: nim_team_helper.h:341
int64_t GetBits() const
Definition: nim_team_helper.h:323
bool ExistValue(const std::string &nim_team_user_key) const
群成员信息信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_team_helper.h:360
void SetTeamID(const std::string &id)
Definition: nim_team_helper.h:296
bool IsMute() const
Definition: nim_team_helper.h:347
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取member info json value
Definition: nim_team_helper.h:372
void SetMute(bool mute)
Definition: nim_team_helper.h:344
void SetValid(bool valid)
Definition: nim_team_helper.h:326