NIM SDK API  8.5.0
nim_cpp_team.h
Go to the documentation of this file.
1 
7 #ifndef _NIM_SDK_CPP_TEAM_H_
8 #define _NIM_SDK_CPP_TEAM_H_
9 
10 #include <functional>
11 #include <list>
12 #include <map>
13 #include <string>
16 #include "nim_cpp_wrapper/nim_sdk_cpp_wrapper.h"
21 namespace nim {
22 
26 class NIM_SDK_CPPWRAPPER_DLL_API Team {
27 public:
28  typedef std::function<void(const TeamEvent& team_event)> TeamEventCallback;
29  typedef std::function<void(int team_count, const std::list<std::string>& team_id_list)> QueryAllMyTeamsCallback;
30  typedef std::function<void(int team_count, const std::list<nim::TeamInfo>& team_info_list)>
32  typedef std::function<void(int count, const std::list<nim::TeamMemberProperty>& all_my_member_info_list)>
34  typedef std::function<void(const std::string& tid, int member_count, const std::list<TeamMemberProperty>& props)>
36  typedef std::function<void(const TeamMemberProperty& team_member_property)> QueryTeamMemberCallback;
37  typedef std::function<void(const std::string& tid, const TeamInfo& result)> QueryTeamInfoCallback;
38  typedef std::function<void(NIMResCode error_code, const std::string& tid, const std::list<TeamMemberProperty>& team_member_propertys)>
40  typedef std::function<void(NIMResCode, const std::string&, const std::map<std::string, std::string>&)>
42  typedef QueryAllMyTeamsInfoCallback QueryTeamsInfoCallback;
44  typedef std::function<void(const std::list<std::string>& success_ids, const std::list<std::string>& failure_ids)>
46  typedef std::function<void(const std::string& tid,
47  const std::list<std::string>& success_ids,
48  const std::list<std::string>& failure_ids,
49  const std::list<std::string>& ignored_ids)>
50  TeamMsgAckReadCallback;
51  typedef std::function<void(NIMResCode error_code, const std::list<nim::TeamInfo>& team_info_list, const std::list<std::string>& fail_list)>
59  static void RegTeamEventCb(const TeamEventCallback& cb, const std::string& json_extension = "");
60 
79  static bool CreateTeamAsync(const TeamInfo& team_info,
80  const std::list<std::string>& ids,
81  const std::string& invitation_postscript,
82  const TeamEventCallback& cb,
83  const std::string& json_extension = "");
84 
104  static bool InviteAsync(const std::string& tid,
105  const std::list<std::string>& ids,
106  const std::string& invitation_postscript,
107  const TeamEventCallback& cb,
108  const std::string& json_extension = "");
109 
131  static bool InviteAsync2(const std::string& tid,
132  const std::list<std::string>& ids,
133  const std::string& invitation_postscript,
134  const std::string& invitation_attachment,
135  const TeamEventCallback& cb,
136  const std::string& json_extension = "");
137 
155  static bool KickAsync(const std::string& tid,
156  const std::list<std::string>& ids,
157  const TeamEventCallback& cb,
158  const std::string& json_extension = "");
159 
170  static bool LeaveAsync(const std::string& tid, const TeamEventCallback& cb, const std::string& json_extension = "");
171 
182  static bool DismissAsync(const std::string& tid, const TeamEventCallback& cb, const std::string& json_extension = "");
183 
198  static bool UpdateTeamInfoAsync(const std::string& tid,
199  const TeamInfo& team_info,
200  const TeamEventCallback& cb,
201  const std::string& json_extension = "");
202 
221  static bool ApplyJoinAsync(const std::string& tid,
222  const std::string& reason,
223  const TeamEventCallback& cb,
224  const std::string& json_extension = "");
225 
244  static bool PassJoinApplyAsync(const std::string& tid,
245  const std::string& applicant_id,
246  const TeamEventCallback& cb,
247  const std::string& json_extension = "");
248 
267  static bool RejectJoinApplyAsync(const std::string& tid,
268  const std::string& applicant_id,
269  const std::string& reason,
270  const TeamEventCallback& cb,
271  const std::string& json_extension = "");
272 
288  static bool AddManagersAsync(const std::string& tid,
289  const std::list<std::string>& ids,
290  const TeamEventCallback& cb,
291  const std::string& json_extension = "");
292 
308  static bool RemoveManagersAsync(const std::string& tid,
309  const std::list<std::string>& ids,
310  const TeamEventCallback& cb,
311  const std::string& json_extension = "");
312 
331  static bool TransferTeamAsync(const std::string& tid,
332  const std::string& new_owner_id,
333  bool is_leave,
334  const TeamEventCallback& cb,
335  const std::string& json_extension = "");
336 
348  static bool UpdateMyPropertyAsync(const TeamMemberProperty& prop, const TeamEventCallback& cb, const std::string& json_extension = "");
349 
362  static bool UpdateOtherNickAsync(const TeamMemberProperty& prop, const TeamEventCallback& cb, const std::string& json_extension = "");
363 
379  static bool AcceptInvitationAsync(const std::string& tid,
380  const std::string& invitor_id,
381  const TeamEventCallback& cb,
382  const std::string& json_extension = "");
383 
401  static bool RejectInvitationAsync(const std::string& tid,
402  const std::string& invitor_id,
403  const std::string& reason,
404  const TeamEventCallback& cb,
405  const std::string& json_extension = "");
406 
413  static void QueryAllMyTeamsAsync(const QueryAllMyTeamsCallback& cb, const std::string& json_extension = "");
414 
421  static void QueryAllMyTeamsInfoAsync(const QueryAllMyTeamsInfoCallback& cb, const std::string& json_extension = "");
422 
429  static void QueryMyAllMemberInfosAsync(const QueryMyAllMemberInfosCallback& cb, const std::string& json_extension = "");
430 
441  static bool QueryTeamMembersAsync(const std::string& tid, const QueryTeamMembersCallback& cb, const std::string& json_extension = "");
442 
454  static bool QueryTeamMemberAsync(const std::string& tid,
455  const std::string& id,
456  const QueryTeamMemberCallback& cb,
457  const std::string& json_extension = "");
458 
465  static TeamMemberProperty QueryTeamMemberBlock(const std::string& tid, const std::string& id);
466 
474  static bool QueryTeamInfoAsync(const std::string& tid, const QueryTeamInfoCallback& cb, const std::string& json_extension = "");
475 
481  static TeamInfo QueryTeamInfoBlock(const std::string& tid);
482 
492  static bool QueryTeamInfoOnlineAsync(const std::string& tid, const TeamEventCallback& cb, const std::string& json_extension = "");
493 
500  static bool ParseTeamInfo(const std::string& json_team_info, TeamInfo& team_info);
501 
506  static void UnregTeamCb();
507 
526  static bool MuteMemberAsync(const std::string& tid,
527  const std::string& member_id,
528  bool set_mute,
529  const TeamEventCallback& cb,
530  const std::string& json_extension = "");
531 
542  static bool QueryMuteListOnlineAsync(const std::string& tid, const QueryTeamMembersOnlineCallback& cb, const std::string& json_extension = "");
543 
554  static bool MuteAsync(const std::string& tid, bool set_mute, const TeamEventCallback& cb, const std::string& json_extension = "");
555 
569  static void TeamMsgAckRead(const std::string& tid,
570  const std::list<IMMessage>& msgs,
571  const TeamEventCallback& cb,
572  const std::string& json_extension = "");
573 
587  static void TeamMsgAckReadEx(const std::string& tid,
588  const std::list<IMMessage>& msgs,
589  const TeamMsgAckReadCallback& cb,
590  const std::string& json_extension = "");
591 
605  static void TeamMsgQueryUnreadList(const std::string& tid,
606  const IMMessage& msg,
607  const TeamEventCallback& cb,
608  const std::string& json_extension = "");
609 
625  static void TeamMsgQueryUnreadList(const std::string& tid,
626  const IMMessage& msg,
627  const std::list<std::string>& accids,
628  const TeamEventCallback& cb,
629  const std::string& json_extension = "");
630 
639  static void QueryTeamMembersInvitor(const std::string& tid, const std::list<std::string>& members, const QueryTeamMembersInvitorCallback& cb);
640 
650  static bool QueryTeamInfoByKeywordAsync(const std::string& keyword, const QueryTeamsInfoCallback& cb, const std::string& json_extension = "");
651 
664  static void UpdateTInfoLocal(const std::list<TeamInfo>& team_infos, const UpdateTInfoLocalCallback& cb, const std::string& json_extension = "");
665 
675  static void GetTeamInfoBatchSFTrans(const GetTeamInfoBatchSFTransCallback& cb, uint64_t time_tag = 0, const std::string& json_extension = "");
676 
686  static void GetTeaminfoList(const std::list<std::string>& tid_list, const GetTeamInfoListCallback& cb);
687 };
688 
689 } // namespace nim
690 
691 #endif //_NIM_SDK_CPP_TEAM_H_
nim::TeamInfo
群组信息
Definition: nim_team_helper.h:24
nim::Team::QueryTeamMemberCallback
std::function< void(const TeamMemberProperty &team_member_property)> QueryTeamMemberCallback
Definition: nim_cpp_team.h:36
nim::TeamMemberProperty
群组成员信息
Definition: nim_team_helper.h:282
nim::Team
群组功能;主要包括查询群信息、查询群成员信息、加人、踢人等功能
Definition: nim_cpp_team.h:26
nim_team_helper.h
Team 辅助方法和数据结构定义
nim::Team::GetTeamInfoListCallback
std::function< void(NIMResCode error_code, const std::list< nim::TeamInfo > &team_info_list, const std::list< std::string > &fail_list)> GetTeamInfoListCallback
Definition: nim_cpp_team.h:52
nim::Team::QueryMyAllMemberInfosCallback
std::function< void(int count, const std::list< nim::TeamMemberProperty > &all_my_member_info_list)> QueryMyAllMemberInfosCallback
Definition: nim_cpp_team.h:33
nim::Team::UpdateTInfoLocalCallback
std::function< void(const std::list< std::string > &success_ids, const std::list< std::string > &failure_ids)> UpdateTInfoLocalCallback
Definition: nim_cpp_team.h:45
nim::Team::QueryTeamInfoCallback
std::function< void(const std::string &tid, const TeamInfo &result)> QueryTeamInfoCallback
Definition: nim_cpp_team.h:37
nim::Team::QueryTeamMembersInvitorCallback
std::function< void(NIMResCode, const std::string &, const std::map< std::string, std::string > &)> QueryTeamMembersInvitorCallback
Definition: nim_cpp_team.h:41
nim_talk_helper.h
Talk 辅助方法和数据结构定义
nim::TeamEvent
群组事件通知
Definition: nim_team_helper.h:379
nim::Team::TeamEventCallback
std::function< void(const TeamEvent &team_event)> TeamEventCallback
Definition: nim_cpp_team.h:28
nim::Team::QueryTeamMembersOnlineCallback
std::function< void(NIMResCode error_code, const std::string &tid, const std::list< TeamMemberProperty > &team_member_propertys)> QueryTeamMembersOnlineCallback
Definition: nim_cpp_team.h:39
nim
namespace nim
nim::Team::QueryTeamMembersCallback
std::function< void(const std::string &tid, int member_count, const std::list< TeamMemberProperty > &props)> QueryTeamMembersCallback
Definition: nim_cpp_team.h:35
nim::Team::QueryAllMyTeamsCallback
std::function< void(int team_count, const std::list< std::string > &team_id_list)> QueryAllMyTeamsCallback
Definition: nim_cpp_team.h:29
nim::Team::GetTeamInfoBatchSFTransCallback
QueryAllMyTeamsInfoCallback GetTeamInfoBatchSFTransCallback
Definition: nim_cpp_team.h:43
nim::Team::QueryAllMyTeamsInfoCallback
std::function< void(int team_count, const std::list< nim::TeamInfo > &team_info_list)> QueryAllMyTeamsInfoCallback
Definition: nim_cpp_team.h:31
nim::IMMessage
Definition: nim_talk_helper.h:232