NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_cpp_team.h
浏览该文件的文档.
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>
21namespace nim {
22
27public:
29 typedef std::function<void(const TeamEvent& team_event)> TeamEventCallback;
31 typedef std::function<void(int team_count, const std::list<std::string>& team_id_list)> QueryAllMyTeamsCallback;
32 typedef std::function<void(int team_count, const std::list<nim::TeamInfo>& team_info_list)>
35 typedef std::function<void(int count, const std::list<nim::TeamMemberProperty>& all_my_member_info_list)>
38 typedef std::function<void(const std::string& tid, int member_count, const std::list<TeamMemberProperty>& props)>
42 typedef std::function<void(const TeamMemberProperty& team_member_property)> QueryTeamMemberCallback;
44 typedef std::function<void(const std::string& tid, const TeamInfo& result)> QueryTeamInfoCallback;
45 typedef std::function<void(NIMResCode error_code, const std::string& tid, const std::list<TeamMemberProperty>& team_member_propertys)>
48 typedef std::function<void(NIMResCode, const std::string&, const std::map<std::string, std::string>&)>
51 typedef QueryAllMyTeamsInfoCallback QueryTeamsInfoCallback;
53 typedef QueryAllMyTeamsInfoCallback GetTeamInfoBatchSFTransCallback;
54 typedef std::function<void(const std::list<std::string>& success_ids, const std::list<std::string>& failure_ids)>
57 typedef std::function<void(const std::string& tid,
58 const std::list<std::string>& success_ids,
59 const std::list<std::string>& failure_ids,
60 const std::list<std::string>& ignored_ids)>
62 typedef std::function<void(NIMResCode error_code, const std::list<nim::TeamInfo>& team_info_list, const std::list<std::string>& fail_list)>
66 typedef std::function<void(const TeamMemberSerachResult& result)> TeamMemberSearchCallback;
73 static void RegTeamEventCb(const TeamEventCallback& cb, const std::string& json_extension = "");
74
94 NIMCPP_DEPRECATED("Use CreateTeamAsyncEx")
95 static bool CreateTeamAsync(const TeamInfo& team_info,
96 const std::list<std::string>& ids,
97 const std::string& invitation_postscript,
98 const TeamEventCallback& cb,
99 const std::string& json_extension = "");
100
119 static bool CreateTeamAsyncEx(const TeamInfo& team_info,
120 const std::list<std::string>& ids,
121 const std::string& invitation_postscript,
122 const TeamEventCallback& callback,
123 const std::string& json_extension = "");
124
144 static bool InviteAsync(const std::string& tid,
145 const std::list<std::string>& ids,
146 const std::string& invitation_postscript,
147 const TeamEventCallback& cb,
148 const std::string& json_extension = "");
149
171 static bool InviteAsync2(const std::string& tid,
172 const std::list<std::string>& ids,
173 const std::string& invitation_postscript,
174 const std::string& invitation_attachment,
175 const TeamEventCallback& cb,
176 const std::string& json_extension = "");
177
195 static bool KickAsync(const std::string& tid,
196 const std::list<std::string>& ids,
197 const TeamEventCallback& cb,
198 const std::string& json_extension = "");
199
210 static bool LeaveAsync(const std::string& tid, const TeamEventCallback& cb, const std::string& json_extension = "");
211
222 static bool DismissAsync(const std::string& tid, const TeamEventCallback& cb, const std::string& json_extension = "");
223
238 static bool UpdateTeamInfoAsync(const std::string& tid,
239 const TeamInfo& team_info,
240 const TeamEventCallback& cb,
241 const std::string& json_extension = "");
242
261 static bool ApplyJoinAsync(const std::string& tid,
262 const std::string& reason,
263 const TeamEventCallback& cb,
264 const std::string& json_extension = "");
265
284 static bool PassJoinApplyAsync(const std::string& tid,
285 const std::string& applicant_id,
286 const TeamEventCallback& cb,
287 const std::string& json_extension = "");
288
307 static bool RejectJoinApplyAsync(const std::string& tid,
308 const std::string& applicant_id,
309 const std::string& reason,
310 const TeamEventCallback& cb,
311 const std::string& json_extension = "");
312
328 static bool AddManagersAsync(const std::string& tid,
329 const std::list<std::string>& ids,
330 const TeamEventCallback& cb,
331 const std::string& json_extension = "");
332
348 static bool RemoveManagersAsync(const std::string& tid,
349 const std::list<std::string>& ids,
350 const TeamEventCallback& cb,
351 const std::string& json_extension = "");
352
371 static bool TransferTeamAsync(const std::string& tid,
372 const std::string& new_owner_id,
373 bool is_leave,
374 const TeamEventCallback& cb,
375 const std::string& json_extension = "");
376
388 static bool UpdateMyPropertyAsync(const TeamMemberProperty& prop, const TeamEventCallback& cb, const std::string& json_extension = "");
389
397 static bool AddTeamMembersFollow(const std::string& tid, const std::vector<std::string>& account_ids, const TeamEventCallback& cb);
398
406 static bool RemoveTeamMembersFollow(const std::string& tid, const std::vector<std::string>& account_ids, const TeamEventCallback& cb);
407
420 static bool UpdateOtherNickAsync(const TeamMemberProperty& prop, const TeamEventCallback& cb, const std::string& json_extension = "");
421
437 static bool AcceptInvitationAsync(const std::string& tid,
438 const std::string& invitor_id,
439 const TeamEventCallback& cb,
440 const std::string& json_extension = "");
441
459 static bool RejectInvitationAsync(const std::string& tid,
460 const std::string& invitor_id,
461 const std::string& reason,
462 const TeamEventCallback& cb,
463 const std::string& json_extension = "");
464
471 static void QueryAllMyTeamsAsync(const QueryAllMyTeamsCallback& cb, const std::string& json_extension = "");
472
479 static void QueryAllMyTeamsInfoAsync(const QueryAllMyTeamsInfoCallback& cb, const std::string& json_extension = "");
480
487 static void QueryMyAllMemberInfosAsync(const QueryMyAllMemberInfosCallback& cb, const std::string& json_extension = "");
488
499 static bool QueryTeamMembersAsync(const std::string& tid, const QueryTeamMembersCallback& cb, const std::string& json_extension = "");
500
512 static bool QueryTeamMemberAsync(const std::string& tid,
513 const std::string& id,
514 const QueryTeamMemberCallback& cb,
515 const std::string& json_extension = "");
516
524 static bool GetTeamMemberList(const std::string& tid, const TeamMemberRoleTypeSearchOption& option, const TeamMemberSearchCallback& cb);
525
532 static TeamMemberProperty QueryTeamMemberBlock(const std::string& tid, const std::string& id);
533
541 static bool QueryTeamInfoAsync(const std::string& tid, const QueryTeamInfoCallback& cb, const std::string& json_extension = "");
542
548 static TeamInfo QueryTeamInfoBlock(const std::string& tid);
549
559 static bool QueryTeamInfoOnlineAsync(const std::string& tid, const TeamEventCallback& cb, const std::string& json_extension = "");
560
567 static bool ParseTeamInfo(const std::string& json_team_info, TeamInfo& team_info);
568
573 static void UnregTeamCb();
574
593 static bool MuteMemberAsync(const std::string& tid,
594 const std::string& member_id,
595 bool set_mute,
596 const TeamEventCallback& cb,
597 const std::string& json_extension = "");
598
609 static bool QueryMuteListOnlineAsync(const std::string& tid, const QueryTeamMembersOnlineCallback& cb, const std::string& json_extension = "");
610
621 static bool MuteAsync(const std::string& tid, bool set_mute, const TeamEventCallback& cb, const std::string& json_extension = "");
622
636 static void TeamMsgAckRead(const std::string& tid,
637 const std::list<IMMessage>& msgs,
638 const TeamEventCallback& cb,
639 const std::string& json_extension = "");
640
654 static void TeamMsgAckReadEx(const std::string& tid,
655 const std::list<IMMessage>& msgs,
656 const TeamMsgAckReadCallback& cb,
657 const std::string& json_extension = "");
658
672 static void TeamMsgQueryUnreadList(const std::string& tid,
673 const IMMessage& msg,
674 const TeamEventCallback& cb,
675 const std::string& json_extension = "");
676
692 static void TeamMsgQueryUnreadList(const std::string& tid,
693 const IMMessage& msg,
694 const std::list<std::string>& accids,
695 const TeamEventCallback& cb,
696 const std::string& json_extension = "");
697
706 static void QueryTeamMembersInvitor(const std::string& tid, const std::list<std::string>& members, const QueryTeamMembersInvitorCallback& cb);
707
717 static bool QueryTeamInfoByKeywordAsync(const std::string& keyword, const QueryTeamsInfoCallback& cb, const std::string& json_extension = "");
718
731 static void UpdateTInfoLocal(const std::list<TeamInfo>& team_infos, const UpdateTInfoLocalCallback& cb, const std::string& json_extension = "");
732
742 static void GetTeamInfoBatchSFTrans(const GetTeamInfoBatchSFTransCallback& cb, uint64_t time_tag = 0, const std::string& json_extension = "");
743
753 static void GetTeaminfoList(const std::list<std::string>& tid_list, const GetTeamInfoListCallback& cb);
754};
755
756} // namespace nim
757
758#endif //_NIM_SDK_CPP_TEAM_H_
群组功能;主要包括查询群信息、查询群成员信息、加人、踢人等功能
Definition nim_cpp_team.h:26
std::function< void(int count, const std::list< nim::TeamMemberProperty > &all_my_member_info_list) QueryMyAllMemberInfosCallback)
查询本人所有群里我的成员信息回调模板
Definition nim_cpp_team.h:37
QueryAllMyTeamsInfoCallback GetTeamInfoBatchSFTransCallback
查询所有群信息回调模板 顺丰专用
Definition nim_cpp_team.h:53
std::function< void(const TeamMemberProperty &team_member_property) QueryTeamMemberCallback)
查询指定群成员信息回调模板
Definition nim_cpp_team.h:42
std::function< void(int team_count, const std::list< std::string > &team_id_list) QueryAllMyTeamsCallback)
查询本人所有群ID回调模板
Definition nim_cpp_team.h:31
std::function< void(NIMResCode error_code, const std::string &tid, const std::list< TeamMemberProperty > &team_member_propertys) QueryTeamMembersOnlineCallback)
查询群成员信息回调模板
Definition nim_cpp_team.h:47
QueryAllMyTeamsInfoCallback QueryTeamsInfoCallback
Definition nim_cpp_team.h:51
std::function< void(const std::list< std::string > &success_ids, const std::list< std::string > &failure_ids) UpdateTInfoLocalCallback)
更新本地缓存回调模板顺丰专用
Definition nim_cpp_team.h:56
std::function< void(int team_count, const std::list< nim::TeamInfo > &team_info_list) QueryAllMyTeamsInfoCallback)
查询本人所有群信息回调模板
Definition nim_cpp_team.h:34
std::function< void(const TeamMemberSerachResult &result) TeamMemberSearchCallback)
搜索群成员回调模板
Definition nim_cpp_team.h:66
std::function< void(NIMResCode, const std::string &, const std::map< std::string, std::string > &) QueryTeamMembersInvitorCallback)
查询群成员邀请人accid 列表回调模板
Definition nim_cpp_team.h:50
std::function< void(const std::string &tid, int member_count, const std::list< TeamMemberProperty > &props) QueryTeamMembersCallback)
查询指定群组全部成员信息回调模板
Definition nim_cpp_team.h:40
std::function< void(const std::string &tid, const std::list< std::string > &success_ids, const std::list< std::string > &failure_ids, const std::list< std::string > &ignored_ids) TeamMsgAckReadCallback)
Definition nim_cpp_team.h:61
std::function< void(const std::string &tid, const TeamInfo &result) QueryTeamInfoCallback)
查询指定群信息回调模板
Definition nim_cpp_team.h:44
std::function< void(NIMResCode error_code, const std::list< nim::TeamInfo > &team_info_list, const std::list< std::string > &fail_list) GetTeamInfoListCallback)
查询给定的一组群ID详细信息的回调模板
Definition nim_cpp_team.h:64
std::function< void(const TeamEvent &team_event) TeamEventCallback)
群组事件通知回调模板
Definition nim_cpp_team.h:29
namespace nim
STL namespace
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition nim_sdk_cpp_wrapper.h:38
#define NIMCPP_DEPRECATED(message)
Definition nim_sdk_cpp_wrapper.h:58
Talk 辅助方法和数据结构定义
Team 辅助方法和数据结构定义
NIMResCode
Definition public_defines.h:21
Definition nim_talk_helper.h:339
群组事件通知
Definition nim_team_helper.h:397
群组信息
Definition nim_team_helper.h:25
群组成员信息
Definition nim_team_helper.h:286
群成员检索参数
Definition nim_team_helper.h:430
群成员搜索结果
Definition nim_team_helper.h:442