NIM SDK API  8.5.1
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>
13 #include "nim_define_include.h"
17 #include "nim_wrapper_util/nim_json_util.h"
22 namespace nim {
24 struct NIM_SDK_CPPWRAPPER_DLL_API TeamInfo {
25 public:
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 
33  TeamInfo() {}
34 
35 public:
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());
45  if (new_info.ExistValue(kNIMTeamInfoKeyCreator))
46  SetOwnerID(new_info.GetOwnerID());
47  if (new_info.ExistValue(kNIMTeamInfoKeyLevel))
48  SetLevel(new_info.GetLevel());
49  if (new_info.ExistValue(kNIMTeamInfoKeyProperty))
50  SetProperty(new_info.GetProperty());
51  if (new_info.ExistValue(kNIMTeamInfoKeyIntro))
52  SetIntro(new_info.GetIntro());
53  if (new_info.ExistValue(kNIMTeamInfoKeyAnnouncement))
54  SetAnnouncement(new_info.GetAnnouncement());
55  if (new_info.ExistValue(kNIMTeamInfoKeyJoinMode))
56  SetJoinMode(new_info.GetJoinMode());
57  //群属性,开发者无需关注 20161011 by Oleg
58  // if (new_info.ExistValue(kTeamInfoKeyConfigBits))
59  // SetConfigBits(new_info.GetConfigBits());
60  if (new_info.ExistValue(kNIMTeamInfoKeyCustom))
61  SetCustom(new_info.GetCustom());
62  if (new_info.ExistValue(kNIMTeamInfoKeyIcon))
63  SetIcon(new_info.GetIcon());
64  if (new_info.ExistValue(kNIMTeamInfoKeyBeInviteMode))
65  SetBeInviteMode(new_info.GetBeInviteMode());
66  if (new_info.ExistValue(kNIMTeamInfoKeyInviteMode))
67  SetInviteMode(new_info.GetInviteMode());
68  if (new_info.ExistValue(kNIMTeamInfoKeyUpdateInfoMode))
69  SetUpdateInfoMode(new_info.GetUpdateInfoMode());
70  if (new_info.ExistValue(kNIMTeamInfoKeyUpdateCustomMode))
71  SetUpdateCustomMode(new_info.GetUpdateCustomMode());
72  if (new_info.ExistValue(kNIMTeamInfoKeyID))
73  SetTeamID(new_info.GetTeamID());
74  if (new_info.ExistValue(kNIMTeamInfoKeyValidFlag))
75  SetValid(new_info.IsValid());
76  if (new_info.ExistValue(kNIMTeamInfoKeyMemberValid))
77  SetMemberValid(new_info.IsMemberValid());
78  if (new_info.ExistValue(kNIMTeamInfoKeyMemberCount))
79  SetMemberCount(new_info.GetMemberCount());
80  if (new_info.ExistValue(kNIMTeamInfoKeyListTime))
81  SetMemberListTimetag(new_info.GetMemberListTimetag());
82  if (new_info.ExistValue(kNIMTeamInfoKeyCreateTime))
83  SetCreateTimetag(new_info.GetCreateTimetag());
84  if (new_info.ExistValue(kNIMTeamInfoKeyUpdateTime))
85  SetUpdateTimetag(new_info.GetUpdateTimetag());
86  if (new_info.ExistValue(kNIMTeamInfoKeyServerCustom))
87  SetServerCustom(new_info.GetServerCustom());
88  if (new_info.ExistValue(kNIMTeamInfoKeyMuteAll) || new_info.ExistValue(kNIMTeamInfoKeyMuteType))
89  SetMute(new_info.GetMuteType());
90  }
91 
92 public:
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 
218  NIMTeamBeInviteMode GetBeInviteMode() const { return (NIMTeamBeInviteMode)team_info_json_value_[nim::kNIMTeamInfoKeyBeInviteMode].asUInt(); }
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 
227  void SetUpdateInfoMode(NIMTeamUpdateInfoMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyUpdateInfoMode] = mode; }
228 
230  NIMTeamUpdateInfoMode GetUpdateInfoMode() const {
231  return (NIMTeamUpdateInfoMode)team_info_json_value_[nim::kNIMTeamInfoKeyUpdateInfoMode].asUInt();
232  }
233 
235  void SetUpdateCustomMode(NIMTeamUpdateCustomMode mode) { team_info_json_value_[nim::kNIMTeamInfoKeyUpdateCustomMode] = mode; }
236 
238  NIMTeamUpdateCustomMode GetUpdateCustomMode() const {
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 
245  NIMTeamMuteType GetMuteType() const {
246  if (team_info_json_value_.isMember(nim::kNIMTeamInfoKeyMuteAll) && team_info_json_value_[nim::kNIMTeamInfoKeyMuteAll].asUInt() == 1)
247  return kNIMTeamMuteTypeNomalMute;
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 
270 private:
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 
277 private:
278  nim_cpp_wrapper_util::Json::Value team_info_json_value_;
279 };
280 
282 struct NIM_SDK_CPPWRAPPER_DLL_API TeamMemberProperty {
283 public:
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 
294 public:
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 
374 private:
375  nim_cpp_wrapper_util::Json::Value member_info_json_value_;
376 };
377 
379 struct NIM_SDK_CPPWRAPPER_DLL_API TeamEvent {
380  NIMResCode res_code_;
381  NIMNotificationId notification_id_;
382  std::string team_id_;
383  std::list<std::string> ids_;
384  std::list<std::string> invalid_ids_;
385  std::list<UserNameCard> namecards_;
388  bool opt_;
389  std::string attach_;
390  nim_cpp_wrapper_util::Json::Value src_data_;
391 };
392 
403 NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamEvent(int rescode,
404  const std::string& team_id,
405  const NIMNotificationId notification_id,
406  const std::string& team_event_json,
407  TeamEvent& team_event);
408 
415 NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamInfoJson(const nim_cpp_wrapper_util::Json::Value& team_info_json, TeamInfo& team_info);
416 
423 NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfoJson(const std::string& team_info_json, TeamInfo& team_info);
424 
431 NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfosJson(const std::string& team_infos_json, std::list<TeamInfo>& team_infos);
432 
439 NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value& team_member_prop_json,
440  TeamMemberProperty& team_member_property);
441 
448 NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertyJson(const std::string& team_member_prop_json, TeamMemberProperty& team_member_property);
449 
456 NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertysJson(const std::string& team_member_props_json,
457  std::list<TeamMemberProperty>& team_member_propertys);
458 } // namespace nim
459 
460 #endif //_NIM_SDK_CPP_TEAM_HELPER_H_
nim::TeamMemberProperty::SetUpdateTimetag
void SetUpdateTimetag(int64_t timetag)
Definition: nim_team_helper.h:338
nim::TeamMemberProperty::IsMute
bool IsMute() const
Definition: nim_team_helper.h:347
nim::TeamInfo::SetUpdateTimetag
void SetUpdateTimetag(int64_t timetag)
Definition: nim_team_helper.h:155
nim::TeamInfo
群组信息
Definition: nim_team_helper.h:24
nim::TeamEvent::notification_id_
NIMNotificationId notification_id_
Definition: nim_team_helper.h:381
nim::TeamInfo::IsMemberValid
bool IsMemberValid() const
Definition: nim_team_helper.h:164
nim::ParseTeamMemberPropertysJson
NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamMemberPropertysJson(const std::string &team_member_props_json, std::list< TeamMemberProperty > &team_member_propertys)
解析群成员信息
nim::TeamInfo::SetMute
void SetMute(NIMTeamMuteType mute_type)
Definition: nim_team_helper.h:242
nim::TeamMemberProperty::GetUserType
nim::NIMTeamUserType GetUserType() const
Definition: nim_team_helper.h:311
nim::TeamEvent::team_id_
std::string team_id_
Definition: nim_team_helper.h:382
nim::TeamInfo::GetMemberListTimetag
int64_t GetMemberListTimetag() const
Definition: nim_team_helper.h:146
nim::TeamMemberProperty
群组成员信息
Definition: nim_team_helper.h:282
nim::TeamMemberProperty::GetUpdateTimetag
int64_t GetUpdateTimetag() const
Definition: nim_team_helper.h:341
nim::TeamMemberProperty::SetBits
void SetBits(int64_t bit)
Definition: nim_team_helper.h:320
nim::TeamInfo::operator=
void operator=(const TeamInfo &new_info)
Definition: nim_team_helper.h:37
nim::TeamEvent::src_data_
nim_cpp_wrapper_util::Json::Value src_data_
Definition: nim_team_helper.h:390
nim::TeamInfo::SetType
void SetType(nim::NIMTeamType type)
Definition: nim_team_helper.h:106
nim::TeamMemberProperty::SetCreateTimetag
void SetCreateTimetag(int64_t timetag)
Definition: nim_team_helper.h:332
nim::TeamInfo::GetUpdateTimetag
int64_t GetUpdateTimetag() const
Definition: nim_team_helper.h:158
nim::TeamMemberProperty::SetNick
void SetNick(const std::string &nick)
Definition: nim_team_helper.h:314
nim::TeamInfo::SetCreateTimetag
void SetCreateTimetag(int64_t timetag)
Definition: nim_team_helper.h:149
nim::TeamMemberProperty::GetNick
std::string GetNick() const
Definition: nim_team_helper.h:317
nim::TeamMemberProperty::GetBits
int64_t GetBits() const
Definition: nim_team_helper.h:323
nim::TeamInfo::SetJoinMode
void SetJoinMode(nim::NIMTeamJoinMode mode)
Definition: nim_team_helper.h:179
nim::TeamInfo::GetMemberCount
int GetMemberCount() const
Definition: nim_team_helper.h:140
nim::TeamInfo::SetServerCustom
void SetServerCustom(const std::string &custom)
Definition: nim_team_helper.h:203
nim::TeamInfo::SetMemberListTimetag
void SetMemberListTimetag(int64_t timetag)
Definition: nim_team_helper.h:143
nim::TeamInfo::SetIcon
void SetIcon(const std::string &icon)
Definition: nim_team_helper.h:209
nim::TeamInfo::SetOwnerID
void SetOwnerID(const std::string &id)
Definition: nim_team_helper.h:112
nim::TeamMemberProperty::SetMute
void SetMute(bool mute)
Definition: nim_team_helper.h:344
nim::TeamInfo::SetProperty
void SetProperty(const std::string &prop)
Definition: nim_team_helper.h:125
nim::TeamInfo::GetAnnouncement
std::string GetAnnouncement() const
Definition: nim_team_helper.h:176
nim::TeamEvent
群组事件通知
Definition: nim_team_helper.h:379
nim::TeamInfo::SetValid
void SetValid(bool valid)
Definition: nim_team_helper.h:131
nim::TeamInfo::SetAnnouncement
void SetAnnouncement(const std::string &announcement)
Definition: nim_team_helper.h:173
nim::TeamInfo::SetMemberMaxCount
void SetMemberMaxCount(int count)
Definition: nim_team_helper.h:117
nim::TeamMemberProperty::TeamMemberProperty
TeamMemberProperty()
Definition: nim_team_helper.h:292
nim::TeamEvent::namecards_
std::list< UserNameCard > namecards_
Definition: nim_team_helper.h:385
nim::TeamMemberProperty::SetUserType
void SetUserType(nim::NIMTeamUserType type)
Definition: nim_team_helper.h:308
nim::TeamMemberProperty::GetAccountID
std::string GetAccountID() const
Definition: nim_team_helper.h:305
nim::TeamInfo::TeamInfo
TeamInfo()
Definition: nim_team_helper.h:33
nim::TeamInfo::ExistValue
bool ExistValue(const std::string &nim_team_info_key) const
群组信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_team_helper.h:256
nim::TeamInfo::GetUpdateInfoMode
NIMTeamUpdateInfoMode GetUpdateInfoMode() const
Definition: nim_team_helper.h:230
nim::TeamInfo::GetMuteType
NIMTeamMuteType GetMuteType() const
Definition: nim_team_helper.h:245
nim::TeamInfo::GetInviteMode
NIMTeamInviteMode GetInviteMode() const
Definition: nim_team_helper.h:224
nim::TeamInfo::GetType
nim::NIMTeamType GetType() const
Definition: nim_team_helper.h:109
nim::TeamInfo::GetMemberMaxCount
int GetMemberMaxCount() const
Definition: nim_team_helper.h:123
nim::ParseTeamEvent
NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamEvent(int rescode, const std::string &team_id, const NIMNotificationId notification_id, const std::string &team_event_json, TeamEvent &team_event)
解析群组事件通知
nim::TeamInfo::Update
void Update(const TeamInfo &new_info)
Definition: nim_team_helper.h:40
nim::TeamInfo::SetUpdateInfoMode
void SetUpdateInfoMode(NIMTeamUpdateInfoMode mode)
Definition: nim_team_helper.h:227
nim::TeamInfo::SetTeamID
void SetTeamID(const std::string &id)
Definition: nim_team_helper.h:94
nim
namespace nim
nim::TeamInfo::SetUpdateCustomMode
void SetUpdateCustomMode(NIMTeamUpdateCustomMode mode)
Definition: nim_team_helper.h:235
nim::TeamMemberProperty::SetTeamID
void SetTeamID(const std::string &id)
Definition: nim_team_helper.h:296
nim::TeamEvent::member_property_
TeamMemberProperty member_property_
Definition: nim_team_helper.h:387
nim_user_helper.h
SDK用户信息辅助方法
nim::TeamInfo::GetJoinMode
nim::NIMTeamJoinMode GetJoinMode() const
Definition: nim_team_helper.h:182
nim::TeamInfo::GetServerCustom
std::string GetServerCustom() const
Definition: nim_team_helper.h:206
nim::TeamInfo::GetIcon
std::string GetIcon() const
Definition: nim_team_helper.h:212
nim::TeamEvent::res_code_
NIMResCode res_code_
Definition: nim_team_helper.h:380
nim::TeamInfo::ToJsonValue
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取JsonValue格式的数据
Definition: nim_team_helper.h:268
nim::TeamInfo::GetCustom
std::string GetCustom() const
Definition: nim_team_helper.h:200
nim::TeamMemberProperty::GetCreateTimetag
int64_t GetCreateTimetag() const
Definition: nim_team_helper.h:335
nim::TeamMemberProperty::SetCustom
void SetCustom(const std::string &custom)
Definition: nim_team_helper.h:350
nim::TeamInfo::GetIntro
std::string GetIntro() const
Definition: nim_team_helper.h:170
nim::TeamInfo::SetMemberValid
void SetMemberValid(bool valid)
Definition: nim_team_helper.h:161
nim::TeamMemberProperty::ToJsonString
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_team_helper.h:366
nim::TeamInfo::GetBeInviteMode
NIMTeamBeInviteMode GetBeInviteMode() const
Definition: nim_team_helper.h:218
nim::TeamInfo::GetProperty
std::string GetProperty() const
Definition: nim_team_helper.h:128
nim::TeamInfo::GetUpdateCustomMode
NIMTeamUpdateCustomMode GetUpdateCustomMode() const
Definition: nim_team_helper.h:238
nim::TeamMemberProperty::IsValid
bool IsValid() const
Definition: nim_team_helper.h:329
nim::TeamMemberProperty::SetAccountID
void SetAccountID(const std::string &id)
Definition: nim_team_helper.h:302
nim::TeamEvent::ids_
std::list< std::string > ids_
Definition: nim_team_helper.h:383
nim::TeamMemberProperty::ExistValue
bool ExistValue(const std::string &nim_team_user_key) const
群成员信息信息数据标记Key对应的数据是否有效(存在,非初始值状态)
Definition: nim_team_helper.h:360
nim::TeamInfo::SetCustom
void SetCustom(const std::string &custom)
Definition: nim_team_helper.h:197
nim::TeamInfo::SetBeInviteMode
void SetBeInviteMode(NIMTeamBeInviteMode mode)
Definition: nim_team_helper.h:215
nim::TeamEvent::team_info_
TeamInfo team_info_
Definition: nim_team_helper.h:386
nim::TeamInfo::GetName
std::string GetName() const
Definition: nim_team_helper.h:103
nim::TeamInfo::SetInviteMode
void SetInviteMode(NIMTeamInviteMode mode)
Definition: nim_team_helper.h:221
nim::TeamInfo::SetIntro
void SetIntro(const std::string &intro)
Definition: nim_team_helper.h:167
nim::TeamMemberProperty::GetTeamID
std::string GetTeamID() const
Definition: nim_team_helper.h:299
nim::TeamInfo::GetOwnerID
std::string GetOwnerID() const
Definition: nim_team_helper.h:115
nim::ParseTeamMemberPropertyJson
NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamMemberPropertyJson(const nim_cpp_wrapper_util::Json::Value &team_member_prop_json, TeamMemberProperty &team_member_property)
解析群成员信息
nim::TeamInfo::GetCreateTimetag
int64_t GetCreateTimetag() const
Definition: nim_team_helper.h:152
nim::TeamMemberProperty::SetValid
void SetValid(bool valid)
Definition: nim_team_helper.h:326
nim::TeamMemberProperty::TeamMemberProperty
TeamMemberProperty(const std::string &team_id, const std::string &accid, const nim::NIMTeamUserType type)
Definition: nim_team_helper.h:285
nim_sdk_loader_helper.h
加载 NIM SDK 的帮助类头文件
nim::TeamEvent::invalid_ids_
std::list< std::string > invalid_ids_
Definition: nim_team_helper.h:384
nim::TeamMemberProperty::GetCustom
std::string GetCustom() const
Definition: nim_team_helper.h:352
nim::ParseTeamInfoJson
NIM_SDK_CPPWRAPPER_DLL_API void ParseTeamInfoJson(const nim_cpp_wrapper_util::Json::Value &team_info_json, TeamInfo &team_info)
解析群组信息
nim::TeamInfo::SetName
void SetName(const std::string &name)
Definition: nim_team_helper.h:100
nim::TeamMemberProperty::ToJsonValue
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
获取member info json value
Definition: nim_team_helper.h:372
nim::TeamInfo::SetMemberCount
void SetMemberCount(int count)
Definition: nim_team_helper.h:137
nim_sdk_cpp_wrapper.h
定义导出宏
nim::TeamInfo::GetTeamID
std::string GetTeamID() const
Definition: nim_team_helper.h:97
nim::ParseTeamInfosJson
NIM_SDK_CPPWRAPPER_DLL_API bool ParseTeamInfosJson(const std::string &team_infos_json, std::list< TeamInfo > &team_infos)
解析群组信息
nim::TeamInfo::TeamInfo
TeamInfo(const std::string &team_id, const nim::NIMTeamType type)
Definition: nim_team_helper.h:27
nim::TeamEvent::opt_
bool opt_
Definition: nim_team_helper.h:388
nim::TeamInfo::IsValid
bool IsValid() const
Definition: nim_team_helper.h:134
nim::TeamEvent::attach_
std::string attach_
Definition: nim_team_helper.h:389
nim::TeamInfo::ToJsonString
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_team_helper.h:262