NIM SDK API  8.5.1
nim_super_team_helper.h
Go to the documentation of this file.
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 <string>
13 #include "nim_define_include.h"
21 namespace nim {
23 struct NIM_SDK_CPPWRAPPER_DLL_API SuperTeamInfo {
24 public:
26  SuperTeamInfo(const std::string& team_id) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyID] = team_id; }
27 
30 
31 public:
33  void operator=(const SuperTeamInfo& new_info) { Update(new_info); }
34 
36  void Update(const SuperTeamInfo& new_info) {
37  if (new_info.ExistValue(kNIMSuperTeamInfoKeyName))
38  SetName(new_info.GetName());
39  if (new_info.ExistValue(kNIMSuperTeamInfoKeyCreator))
40  SetOwnerID(new_info.GetOwnerID());
41  if (new_info.ExistValue(kNIMSuperTeamInfoKeyLevel))
42  SetLevel(new_info.GetLevel());
43  if (new_info.ExistValue(kNIMSuperTeamInfoKeyProperty))
44  SetProperty(new_info.GetProperty());
45  if (new_info.ExistValue(kNIMSuperTeamInfoKeyIntro))
46  SetIntro(new_info.GetIntro());
47  if (new_info.ExistValue(kNIMSuperTeamInfoKeyAnnouncement))
48  SetAnnouncement(new_info.GetAnnouncement());
49  if (new_info.ExistValue(kNIMSuperTeamInfoKeyJoinMode))
50  SetJoinMode(new_info.GetJoinMode());
51  //群属性,开发者无需关注 20161011 by Oleg
52  // if (new_info.ExistValue(kSuperTeamInfoKeyConfigBits))
53  // SetConfigBits(new_info.GetConfigBits());
54  if (new_info.ExistValue(kNIMSuperTeamInfoKeyCustom))
55  SetCustom(new_info.GetCustom());
56  if (new_info.ExistValue(kNIMSuperTeamInfoKeyIcon))
57  SetIcon(new_info.GetIcon());
58  if (new_info.ExistValue(kNIMSuperTeamInfoKeyBeInviteMode))
59  SetBeInviteMode(new_info.GetBeInviteMode());
60  if (new_info.ExistValue(kNIMSuperTeamInfoKeyInviteMode))
61  SetInviteMode(new_info.GetInviteMode());
62  if (new_info.ExistValue(kNIMSuperTeamInfoKeyUpdateInfoMode))
63  SetUpdateInfoMode(new_info.GetUpdateInfoMode());
64  if (new_info.ExistValue(kNIMSuperTeamInfoKeyUpdateCustomMode))
65  SetUpdateCustomMode(new_info.GetUpdateCustomMode());
66  if (new_info.ExistValue(kNIMSuperTeamInfoKeyID))
67  SetSuperTeamID(new_info.GetSuperTeamID());
68  if (new_info.ExistValue(kNIMSuperTeamInfoKeyValidFlag))
69  SetValid(new_info.IsValid());
70  if (new_info.ExistValue(kNIMSuperTeamInfoKeyMemberValid))
71  SetMemberValid(new_info.IsMemberValid());
72  if (new_info.ExistValue(kNIMSuperTeamInfoKeyMemberCount))
73  SetMemberCount(new_info.GetMemberCount());
74  if (new_info.ExistValue(kNIMSuperTeamInfoKeyListTime))
75  SetMemberListTimetag(new_info.GetMemberListTimetag());
76  if (new_info.ExistValue(kNIMSuperTeamInfoKeyCreateTime))
77  SetCreateTimetag(new_info.GetCreateTimetag());
78  if (new_info.ExistValue(kNIMSuperTeamInfoKeyUpdateTime))
79  SetUpdateTimetag(new_info.GetUpdateTimetag());
80  if (new_info.ExistValue(kNIMSuperTeamInfoKeyServerCustom))
81  SetServerCustom(new_info.GetServerCustom());
82  if (new_info.ExistValue(kNIMSuperTeamInfoKeyMuteAll) || new_info.ExistValue(kNIMSuperTeamInfoKeyMuteType))
83  SetMute(new_info.GetMuteType());
84  }
85 
86 public:
88  void SetSuperTeamID(const std::string& id) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyID] = id; }
89 
91  std::string GetSuperTeamID() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyID].asString(); }
92 
94  void SetName(const std::string& name) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyName] = name; }
95 
97  std::string GetName() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyName].asString(); }
98 
100  void SetOwnerID(const std::string& id) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreator] = id; }
101 
103  std::string GetOwnerID() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreator].asString(); }
105  void SetMemberMaxCount(int count) {
106  team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberMaxCount] = count;
107  team_info_json_value_[nim::kNIMSuperTeamInfoKeyLevel] = count;
108  }
109 
111  int GetMemberMaxCount() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberMaxCount].asUInt(); }
113  void SetProperty(const std::string& prop) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyProperty] = prop; }
114 
116  std::string GetProperty() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyProperty].asString(); }
117 
119  void SetValid(bool valid) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyValidFlag] = valid ? 1 : 0; }
120 
122  bool IsValid() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyValidFlag].asUInt() == 1; }
123 
125  void SetMemberCount(int count) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberCount] = count; }
126 
128  int GetMemberCount() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberCount].asUInt(); }
129 
131  void SetMemberListTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyListTime] = timetag; }
132 
134  int64_t GetMemberListTimetag() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyListTime].asUInt64(); }
135 
137  void SetCreateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreateTime] = timetag; }
138 
140  int64_t GetCreateTimetag() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyCreateTime].asUInt64(); }
141 
143  void SetUpdateTimetag(int64_t timetag) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateTime] = timetag; }
144 
146  int64_t GetUpdateTimetag() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateTime].asUInt64(); }
147 
149  void SetMemberValid(bool valid) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberValid] = valid ? 1 : 0; }
150 
152  bool IsMemberValid() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyMemberValid].asUInt() == 1; }
153 
155  void SetIntro(const std::string& intro) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyIntro] = intro; }
156 
158  std::string GetIntro() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyIntro].asString(); }
159 
161  void SetAnnouncement(const std::string& announcement) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyAnnouncement] = announcement; }
162 
164  std::string GetAnnouncement() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyAnnouncement].asString(); }
165 
167  void SetJoinMode(nim::NIMSuperTeamJoinMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyJoinMode] = mode; }
168 
170  nim::NIMSuperTeamJoinMode GetJoinMode() const { return (NIMSuperTeamJoinMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyJoinMode].asUInt(); }
171 
173  void SetCustom(const std::string& custom) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyCustom] = custom; }
174 
176  std::string GetCustom() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyCustom].asString(); }
177 
179  void SetServerCustom(const std::string& custom) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyServerCustom] = custom; }
180 
182  std::string GetServerCustom() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyServerCustom].asString(); }
183 
185  void SetIcon(const std::string& icon) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyIcon] = icon; }
186 
188  std::string GetIcon() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyIcon].asString(); }
189 
191  void SetBeInviteMode(int be_invite_mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyBeInviteMode] = be_invite_mode; }
192 
194  int GetBeInviteMode() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyBeInviteMode].asUInt(); }
195 
197  void SetInviteMode(NIMSuperTeamInviteMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyInviteMode] = mode; }
198 
200  NIMSuperTeamInviteMode GetInviteMode() const {
201  return (NIMSuperTeamInviteMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyInviteMode].asUInt();
202  }
203 
205  void SetUpdateInfoMode(NIMSuperTeamUpdateInfoMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateInfoMode] = mode; }
206 
208  NIMSuperTeamUpdateInfoMode GetUpdateInfoMode() const {
209  return (NIMSuperTeamUpdateInfoMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateInfoMode].asUInt();
210  }
211 
213  void SetUpdateCustomMode(NIMSuperTeamUpdateCustomMode mode) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateCustomMode] = mode; }
214 
216  NIMSuperTeamUpdateCustomMode GetUpdateCustomMode() const {
217  return (NIMSuperTeamUpdateCustomMode)team_info_json_value_[nim::kNIMSuperTeamInfoKeyUpdateCustomMode].asUInt();
218  }
220  void SetMute(NIMSuperTeamMuteType mute_type) { team_info_json_value_[nim::kNIMTeamInfoKeyMuteType] = mute_type; }
221 
223  NIMSuperTeamMuteType GetMuteType() const {
224  if (team_info_json_value_.isMember(nim::kNIMSuperTeamInfoKeyMuteAll) &&
225  team_info_json_value_[nim::kNIMSuperTeamInfoKeyMuteType].asUInt() == 1)
226  return kNIMSuperTeamMuteTypeNomalMute;
227  return (NIMSuperTeamMuteType)team_info_json_value_[nim::kNIMSuperTeamInfoKeyMuteType].asUInt();
228  }
229 
235  bool ExistValue(const std::string& nim_team_info_key) const { return team_info_json_value_.isMember(nim_team_info_key); }
236 
241  std::string ToJsonString() const { return GetJsonStringWithNoStyled(team_info_json_value_); }
242 
247  nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return team_info_json_value_; }
248 
249 private:
251  void SetLevel(int level) { team_info_json_value_[nim::kNIMSuperTeamInfoKeyLevel] = level; }
252 
254  int GetLevel() const { return team_info_json_value_[nim::kNIMSuperTeamInfoKeyLevel].asUInt(); }
255 
256 private:
257  nim_cpp_wrapper_util::Json::Value team_info_json_value_;
258 };
259 
261 struct NIM_SDK_CPPWRAPPER_DLL_API SuperTeamMemberProperty {
262 public:
264  SuperTeamMemberProperty(const std::string& team_id, const std::string& accid, const nim::NIMSuperTeamUserType type) {
265  member_info_json_value_[kNIMSuperTeamUserKeyID] = team_id;
266  member_info_json_value_[kNIMSuperTeamUserKeyAccID] = accid;
267  member_info_json_value_[kNIMSuperTeamUserKeyType] = type;
268  }
269 
272 
273 public:
275  void SetSuperTeamID(const std::string& id) { member_info_json_value_[kNIMSuperTeamUserKeyID] = id; }
276 
278  std::string GetSuperTeamID() const { return member_info_json_value_[kNIMSuperTeamUserKeyID].asString(); }
279 
281  void SetAccountID(const std::string& id) { member_info_json_value_[kNIMSuperTeamUserKeyAccID] = id; }
282 
284  std::string GetAccountID() const { return member_info_json_value_[kNIMSuperTeamUserKeyAccID].asString(); }
285 
287  void SetUserType(nim::NIMSuperTeamUserType type) { member_info_json_value_[kNIMSuperTeamUserKeyType] = type; }
288 
290  nim::NIMSuperTeamUserType GetUserType() const { return (nim::NIMSuperTeamUserType)member_info_json_value_[kNIMSuperTeamUserKeyType].asUInt(); }
291 
293  void SetNick(const std::string& nick) { member_info_json_value_[kNIMSuperTeamUserKeyNick] = nick; }
294 
296  std::string GetNick() const { return member_info_json_value_[kNIMSuperTeamUserKeyNick].asString(); }
297 
299  void SetBits(int64_t bit) { member_info_json_value_[kNIMSuperTeamUserKeyBits] = bit; }
300 
302  int64_t GetBits() const { return member_info_json_value_[kNIMSuperTeamUserKeyBits].asUInt64(); }
303 
305  void SetValid(bool valid) { member_info_json_value_[kNIMSuperTeamUserKeyValidFlag] = valid ? 1 : 0; }
306 
308  bool IsValid() const { return member_info_json_value_[kNIMSuperTeamUserKeyValidFlag].asUInt() == 1; }
309 
311  void SetCreateTimetag(int64_t timetag) { member_info_json_value_[kNIMSuperTeamUserKeyCreateTime] = timetag; }
312 
314  int64_t GetCreateTimetag() const { return member_info_json_value_[kNIMSuperTeamUserKeyCreateTime].asUInt64(); }
315 
317  void SetUpdateTimetag(int64_t timetag) { member_info_json_value_[kNIMSuperTeamUserKeyUpdateTime] = timetag; }
318 
320  int64_t GetUpdateTimetag() const { return member_info_json_value_[kNIMSuperTeamUserKeyUpdateTime].asUInt64(); }
321 
323  void SetMute(bool mute) { member_info_json_value_[kNIMSuperTeamUserKeyMute] = mute ? 1 : 0; }
324 
326  bool IsMute() const { return member_info_json_value_[kNIMSuperTeamUserKeyMute].asUInt() == 1; }
327 
329  void SetCustom(const std::string& custom) { member_info_json_value_[kNIMSuperTeamUserKeyCustom] = custom; }
330 
332  std::string GetCustom() const { return member_info_json_value_[kNIMSuperTeamUserKeyCustom].asString(); }
333 
339  bool ExistValue(const std::string& nim_team_user_key) const { return member_info_json_value_.isMember(nim_team_user_key); }
340 
345  std::string ToJsonString() const { return GetJsonStringWithNoStyled(member_info_json_value_); }
346 
351  nim_cpp_wrapper_util::Json::Value ToJsonValue() const { return member_info_json_value_; }
352 
353 private:
354  nim_cpp_wrapper_util::Json::Value member_info_json_value_;
355 };
356 
358 struct NIM_SDK_CPPWRAPPER_DLL_API SuperTeamEvent {
359  NIMResCode res_code_;
360  NIMNotificationId notification_id_;
361  std::string team_id_;
362  std::list<std::string> ids_;
363  std::list<std::string> invalid_ids_;
364  std::list<UserNameCard> namecards_;
367  bool opt_;
368  std::string attach_;
369  nim_cpp_wrapper_util::Json::Value src_data_;
370 };
371 
382 NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamEvent(int rescode,
383  const std::string& team_id,
384  const NIMNotificationId notification_id,
385  const std::string& team_event_json,
386  SuperTeamEvent& team_event);
387 
394 NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamInfoJson(const nim_cpp_wrapper_util::Json::Value& team_info_json, SuperTeamInfo& team_info);
395 
402 NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamInfoJson(const std::string& team_info_json, SuperTeamInfo& team_info);
403 
410 NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamInfosJson(const std::string& team_infos_json, std::list<SuperTeamInfo>& team_infos);
411 
419 NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value& team_member_prop_json,
420  SuperTeamMemberProperty& team_member_property);
421 
428 NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamMemberPropertyJson(const std::string& team_member_prop_json,
429  SuperTeamMemberProperty& team_member_property);
430 
437 NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamMemberPropertysJson(const std::string& team_member_props_json,
438  std::list<SuperTeamMemberProperty>& team_member_propertys);
439 } // namespace nim
440 
441 #endif //_NIM_SDK_CPP_SUPERTEAM_HELPER_H_
nim::SuperTeamInfo::SetName
void SetName(const std::string &name)
Definition: nim_super_team_helper.h:94
nim::SuperTeamInfo::SetCreateTimetag
void SetCreateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:137
nim::SuperTeamInfo::GetUpdateTimetag
int64_t GetUpdateTimetag() const
Definition: nim_super_team_helper.h:146
nim::SuperTeamInfo::GetSuperTeamID
std::string GetSuperTeamID() const
Definition: nim_super_team_helper.h:91
nim::SuperTeamMemberProperty::SuperTeamMemberProperty
SuperTeamMemberProperty()
Definition: nim_super_team_helper.h:271
nim::SuperTeamInfo::SetJoinMode
void SetJoinMode(nim::NIMSuperTeamJoinMode mode)
Definition: nim_super_team_helper.h:167
nim::ParseSuperTeamInfoJson
NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamInfoJson(const nim_cpp_wrapper_util::Json::Value &team_info_json, SuperTeamInfo &team_info)
解析群组信息
nim::SuperTeamEvent::namecards_
std::list< UserNameCard > namecards_
Definition: nim_super_team_helper.h:364
nim::SuperTeamMemberProperty::ExistValue
bool ExistValue(const std::string &nim_team_user_key) const
群成员信息信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_super_team_helper.h:339
nim::SuperTeamInfo::GetBeInviteMode
int GetBeInviteMode() const
Definition: nim_super_team_helper.h:194
nim::SuperTeamInfo::SetUpdateTimetag
void SetUpdateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:143
nim::SuperTeamInfo::ToJsonValue
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取JsonValue格式的数据
Definition: nim_super_team_helper.h:247
nim::SuperTeamInfo::SetMute
void SetMute(NIMSuperTeamMuteType mute_type)
Definition: nim_super_team_helper.h:220
nim::SuperTeamMemberProperty::SetUpdateTimetag
void SetUpdateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:317
nim::SuperTeamMemberProperty::SetAccountID
void SetAccountID(const std::string &id)
Definition: nim_super_team_helper.h:281
nim::SuperTeamMemberProperty::GetBits
int64_t GetBits() const
Definition: nim_super_team_helper.h:302
nim::SuperTeamInfo::SetMemberValid
void SetMemberValid(bool valid)
Definition: nim_super_team_helper.h:149
nim::SuperTeamMemberProperty::SetUserType
void SetUserType(nim::NIMSuperTeamUserType type)
Definition: nim_super_team_helper.h:287
nim::SuperTeamMemberProperty::GetCustom
std::string GetCustom() const
Definition: nim_super_team_helper.h:332
nim::SuperTeamInfo::ExistValue
bool ExistValue(const std::string &nim_team_info_key) const
群组信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_super_team_helper.h:235
nim::SuperTeamMemberProperty::SetCustom
void SetCustom(const std::string &custom)
Definition: nim_super_team_helper.h:329
nim::SuperTeamEvent::src_data_
nim_cpp_wrapper_util::Json::Value src_data_
Definition: nim_super_team_helper.h:369
nim::SuperTeamInfo::GetServerCustom
std::string GetServerCustom() const
Definition: nim_super_team_helper.h:182
nim::SuperTeamInfo::SetIntro
void SetIntro(const std::string &intro)
Definition: nim_super_team_helper.h:155
nim::SuperTeamInfo::GetInviteMode
NIMSuperTeamInviteMode GetInviteMode() const
Definition: nim_super_team_helper.h:200
nim::SuperTeamInfo::SetValid
void SetValid(bool valid)
Definition: nim_super_team_helper.h:119
nim::SuperTeamInfo::SetServerCustom
void SetServerCustom(const std::string &custom)
Definition: nim_super_team_helper.h:179
nim::SuperTeamInfo::operator=
void operator=(const SuperTeamInfo &new_info)
Definition: nim_super_team_helper.h:33
nim::SuperTeamMemberProperty::SetSuperTeamID
void SetSuperTeamID(const std::string &id)
Definition: nim_super_team_helper.h:275
nim::SuperTeamInfo::GetJoinMode
nim::NIMSuperTeamJoinMode GetJoinMode() const
Definition: nim_super_team_helper.h:170
nim::SuperTeamInfo::GetName
std::string GetName() const
Definition: nim_super_team_helper.h:97
nim::SuperTeamInfo::SetIcon
void SetIcon(const std::string &icon)
Definition: nim_super_team_helper.h:185
nim::SuperTeamInfo::IsMemberValid
bool IsMemberValid() const
Definition: nim_super_team_helper.h:152
nim::SuperTeamMemberProperty::ToJsonString
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_super_team_helper.h:345
nim::SuperTeamEvent::team_info_
SuperTeamInfo team_info_
Definition: nim_super_team_helper.h:365
nim::SuperTeamMemberProperty::GetSuperTeamID
std::string GetSuperTeamID() const
Definition: nim_super_team_helper.h:278
nim::SuperTeamEvent::attach_
std::string attach_
Definition: nim_super_team_helper.h:368
nim::SuperTeamMemberProperty::SetNick
void SetNick(const std::string &nick)
Definition: nim_super_team_helper.h:293
nim::SuperTeamInfo::ToJsonString
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_super_team_helper.h:241
nim::SuperTeamInfo::GetMuteType
NIMSuperTeamMuteType GetMuteType() const
Definition: nim_super_team_helper.h:223
nim::SuperTeamInfo::SetAnnouncement
void SetAnnouncement(const std::string &announcement)
Definition: nim_super_team_helper.h:161
nim::SuperTeamMemberProperty
群组成员信息
Definition: nim_super_team_helper.h:261
nim::SuperTeamMemberProperty::SetCreateTimetag
void SetCreateTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:311
nim::SuperTeamMemberProperty::IsMute
bool IsMute() const
Definition: nim_super_team_helper.h:326
nim::SuperTeamInfo::Update
void Update(const SuperTeamInfo &new_info)
Definition: nim_super_team_helper.h:36
nim::SuperTeamInfo::GetOwnerID
std::string GetOwnerID() const
Definition: nim_super_team_helper.h:103
nim::SuperTeamInfo::SetInviteMode
void SetInviteMode(NIMSuperTeamInviteMode mode)
Definition: nim_super_team_helper.h:197
nim::SuperTeamMemberProperty::GetCreateTimetag
int64_t GetCreateTimetag() const
Definition: nim_super_team_helper.h:314
nim::SuperTeamInfo::SetMemberCount
void SetMemberCount(int count)
Definition: nim_super_team_helper.h:125
nim
namespace nim
nim::SuperTeamInfo::SetBeInviteMode
void SetBeInviteMode(int be_invite_mode)
Definition: nim_super_team_helper.h:191
nim::SuperTeamEvent::opt_
bool opt_
Definition: nim_super_team_helper.h:367
nim::SuperTeamEvent::ids_
std::list< std::string > ids_
Definition: nim_super_team_helper.h:362
nim::SuperTeamInfo::IsValid
bool IsValid() const
Definition: nim_super_team_helper.h:122
nim::SuperTeamInfo
群组信息
Definition: nim_super_team_helper.h:23
nim::SuperTeamInfo::SetUpdateInfoMode
void SetUpdateInfoMode(NIMSuperTeamUpdateInfoMode mode)
Definition: nim_super_team_helper.h:205
nim::SuperTeamInfo::GetUpdateInfoMode
NIMSuperTeamUpdateInfoMode GetUpdateInfoMode() const
Definition: nim_super_team_helper.h:208
nim::SuperTeamInfo::GetMemberListTimetag
int64_t GetMemberListTimetag() const
Definition: nim_super_team_helper.h:134
nim::SuperTeamMemberProperty::SuperTeamMemberProperty
SuperTeamMemberProperty(const std::string &team_id, const std::string &accid, const nim::NIMSuperTeamUserType type)
Definition: nim_super_team_helper.h:264
nim::ParseSuperTeamMemberPropertysJson
NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamMemberPropertysJson(const std::string &team_member_props_json, std::list< SuperTeamMemberProperty > &team_member_propertys)
解析群成员信息
nim_user_helper.h
SDK用户信息辅助方法
nim::SuperTeamMemberProperty::SetMute
void SetMute(bool mute)
Definition: nim_super_team_helper.h:323
nim::SuperTeamInfo::SetOwnerID
void SetOwnerID(const std::string &id)
Definition: nim_super_team_helper.h:100
nim::SuperTeamInfo::GetProperty
std::string GetProperty() const
Definition: nim_super_team_helper.h:116
nim::SuperTeamInfo::GetIntro
std::string GetIntro() const
Definition: nim_super_team_helper.h:158
nim::SuperTeamInfo::SetProperty
void SetProperty(const std::string &prop)
Definition: nim_super_team_helper.h:113
nim::SuperTeamInfo::SuperTeamInfo
SuperTeamInfo()
Definition: nim_super_team_helper.h:29
nim::SuperTeamInfo::SetUpdateCustomMode
void SetUpdateCustomMode(NIMSuperTeamUpdateCustomMode mode)
Definition: nim_super_team_helper.h:213
nim::SuperTeamInfo::GetCustom
std::string GetCustom() const
Definition: nim_super_team_helper.h:176
nim::SuperTeamInfo::SetMemberListTimetag
void SetMemberListTimetag(int64_t timetag)
Definition: nim_super_team_helper.h:131
nim::SuperTeamEvent::invalid_ids_
std::list< std::string > invalid_ids_
Definition: nim_super_team_helper.h:363
nim::SuperTeamInfo::GetMemberMaxCount
int GetMemberMaxCount() const
Definition: nim_super_team_helper.h:111
nim::SuperTeamInfo::SetSuperTeamID
void SetSuperTeamID(const std::string &id)
Definition: nim_super_team_helper.h:88
nim::SuperTeamMemberProperty::GetAccountID
std::string GetAccountID() const
Definition: nim_super_team_helper.h:284
nim::SuperTeamEvent
群组事件通知
Definition: nim_super_team_helper.h:358
nim::SuperTeamMemberProperty::GetUpdateTimetag
int64_t GetUpdateTimetag() const
Definition: nim_super_team_helper.h:320
nim::SuperTeamInfo::GetMemberCount
int GetMemberCount() const
Definition: nim_super_team_helper.h:128
nim::SuperTeamMemberProperty::GetUserType
nim::NIMSuperTeamUserType GetUserType() const
Definition: nim_super_team_helper.h:290
nim::SuperTeamEvent::notification_id_
NIMNotificationId notification_id_
Definition: nim_super_team_helper.h:360
nim::SuperTeamMemberProperty::SetValid
void SetValid(bool valid)
Definition: nim_super_team_helper.h:305
nim::SuperTeamMemberProperty::IsValid
bool IsValid() const
Definition: nim_super_team_helper.h:308
nim::SuperTeamEvent::res_code_
NIMResCode res_code_
Definition: nim_super_team_helper.h:359
nim::SuperTeamMemberProperty::ToJsonValue
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取member info json value
Definition: nim_super_team_helper.h:351
nim::SuperTeamInfo::GetIcon
std::string GetIcon() const
Definition: nim_super_team_helper.h:188
nim::SuperTeamInfo::GetCreateTimetag
int64_t GetCreateTimetag() const
Definition: nim_super_team_helper.h:140
nim::SuperTeamInfo::SetMemberMaxCount
void SetMemberMaxCount(int count)
Definition: nim_super_team_helper.h:105
nim::SuperTeamEvent::member_property_
SuperTeamMemberProperty member_property_
Definition: nim_super_team_helper.h:366
nim::ParseSuperTeamEvent
NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamEvent(int rescode, const std::string &team_id, const NIMNotificationId notification_id, const std::string &team_event_json, SuperTeamEvent &team_event)
解析群组事件通知
nim::SuperTeamMemberProperty::SetBits
void SetBits(int64_t bit)
Definition: nim_super_team_helper.h:299
nim::SuperTeamInfo::GetAnnouncement
std::string GetAnnouncement() const
Definition: nim_super_team_helper.h:164
nim_sdk_loader_helper.h
加载 NIM SDK 的帮助类头文件
nim::SuperTeamEvent::team_id_
std::string team_id_
Definition: nim_super_team_helper.h:361
nim::SuperTeamInfo::GetUpdateCustomMode
NIMSuperTeamUpdateCustomMode GetUpdateCustomMode() const
Definition: nim_super_team_helper.h:216
nim::ParseSuperTeamMemberPropertyJson
NIM_SDK_CPPWRAPPER_DLL_API void ParseSuperTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value &team_member_prop_json, SuperTeamMemberProperty &team_member_property)
解析群成员信息
nim_sdk_cpp_wrapper.h
定义导出宏
nim::SuperTeamMemberProperty::GetNick
std::string GetNick() const
Definition: nim_super_team_helper.h:296
nim::ParseSuperTeamInfosJson
NIM_SDK_CPPWRAPPER_DLL_API bool ParseSuperTeamInfosJson(const std::string &team_infos_json, std::list< SuperTeamInfo > &team_infos)
解析群组信息
nim::SuperTeamInfo::SetCustom
void SetCustom(const std::string &custom)
Definition: nim_super_team_helper.h:173
nim::SuperTeamInfo::SuperTeamInfo
SuperTeamInfo(const std::string &team_id)
Definition: nim_super_team_helper.h:26