![]() |
NIM 跨平台 C++ SDK
|
群组功能;主要包括查询群信息、查询群成员信息、加人、踢人等功能 更多...
#include <nim_cpp_team.h>
Public 类型 | |
typedef std::function< void(const TeamEvent &team_event)> | TeamEventCallback |
群组事件通知回调模板 | |
typedef std::function< void(int team_count, const std::list< std::string > &team_id_list)> | QueryAllMyTeamsCallback |
查询本人所有群ID回调模板 | |
typedef std::function< void(int team_count, const std::list< nim::TeamInfo > &team_info_list)> | QueryAllMyTeamsInfoCallback |
查询本人所有群信息回调模板 | |
typedef std::function< void(int count, const std::list< nim::TeamMemberProperty > &all_my_member_info_list)> | QueryMyAllMemberInfosCallback |
查询本人所有群里我的成员信息回调模板 | |
typedef std::function< void(const std::string &tid, int member_count, const std::list< TeamMemberProperty > &props)> | QueryTeamMembersCallback |
查询指定群组全部成员信息回调模板 | |
typedef std::function< void(const TeamMemberProperty &team_member_property)> | QueryTeamMemberCallback |
查询指定群成员信息回调模板 | |
typedef std::function< void(const std::string &tid, const TeamInfo &result)> | QueryTeamInfoCallback |
查询指定群信息回调模板 | |
typedef std::function< void(NIMResCode error_code, const std::string &tid, const std::list< TeamMemberProperty > &team_member_propertys)> | QueryTeamMembersOnlineCallback |
查询群成员信息回调模板 | |
typedef std::function< void(NIMResCode, const std::string &, const std::map< std::string, std::string > &)> | QueryTeamMembersInvitorCallback |
查询群成员邀请人accid 列表回调模板 | |
typedef QueryAllMyTeamsInfoCallback | QueryTeamsInfoCallback |
typedef QueryAllMyTeamsInfoCallback | GetTeamInfoBatchSFTransCallback |
查询所有群信息回调模板 顺丰专用 | |
typedef std::function< void(const std::list< std::string > &success_ids, const std::list< std::string > &failure_ids)> | UpdateTInfoLocalCallback |
更新本地缓存回调模板顺丰专用 | |
typedef 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 |
typedef std::function< void(NIMResCode error_code, const std::list< nim::TeamInfo > &team_info_list, const std::list< std::string > &fail_list)> | GetTeamInfoListCallback |
查询给定的一组群ID详细信息的回调模板 | |
typedef std::function< void(const TeamMemberSerachResult &result)> | TeamMemberSearchCallback |
搜索群成员回调模板 | |
静态 Public 成员函数 | |
static void | RegTeamEventCb (const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | CreateTeamAsync (const TeamInfo &team_info, const std::list< std::string > &ids, const std::string &invitation_postscript, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | CreateTeamAsyncEx (const TeamInfo &team_info, const std::list< std::string > &ids, const std::string &invitation_postscript, const TeamEventCallback &callback, const std::string &json_extension="") |
static bool | InviteAsync (const std::string &tid, const std::list< std::string > &ids, const std::string &invitation_postscript, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | InviteAsync2 (const std::string &tid, const std::list< std::string > &ids, const std::string &invitation_postscript, const std::string &invitation_attachment, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | KickAsync (const std::string &tid, const std::list< std::string > &ids, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | LeaveAsync (const std::string &tid, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | DismissAsync (const std::string &tid, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | UpdateTeamInfoAsync (const std::string &tid, const TeamInfo &team_info, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | ApplyJoinAsync (const std::string &tid, const std::string &reason, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | PassJoinApplyAsync (const std::string &tid, const std::string &applicant_id, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | RejectJoinApplyAsync (const std::string &tid, const std::string &applicant_id, const std::string &reason, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | AddManagersAsync (const std::string &tid, const std::list< std::string > &ids, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | RemoveManagersAsync (const std::string &tid, const std::list< std::string > &ids, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | TransferTeamAsync (const std::string &tid, const std::string &new_owner_id, bool is_leave, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | UpdateMyPropertyAsync (const TeamMemberProperty &prop, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | AddTeamMembersFollow (const std::string &tid, const std::vector< std::string > &account_ids, const TeamEventCallback &cb) |
static bool | RemoveTeamMembersFollow (const std::string &tid, const std::vector< std::string > &account_ids, const TeamEventCallback &cb) |
static bool | UpdateOtherNickAsync (const TeamMemberProperty &prop, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | AcceptInvitationAsync (const std::string &tid, const std::string &invitor_id, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | RejectInvitationAsync (const std::string &tid, const std::string &invitor_id, const std::string &reason, const TeamEventCallback &cb, const std::string &json_extension="") |
static void | QueryAllMyTeamsAsync (const QueryAllMyTeamsCallback &cb, const std::string &json_extension="") |
static void | QueryAllMyTeamsInfoAsync (const QueryAllMyTeamsInfoCallback &cb, const std::string &json_extension="") |
static void | QueryMyAllMemberInfosAsync (const QueryMyAllMemberInfosCallback &cb, const std::string &json_extension="") |
static bool | QueryTeamMembersAsync (const std::string &tid, const QueryTeamMembersCallback &cb, const std::string &json_extension="") |
static bool | QueryTeamMemberAsync (const std::string &tid, const std::string &id, const QueryTeamMemberCallback &cb, const std::string &json_extension="") |
static bool | GetTeamMemberList (const std::string &tid, const TeamMemberRoleTypeSearchOption &option, const TeamMemberSearchCallback &cb) |
static TeamMemberProperty | QueryTeamMemberBlock (const std::string &tid, const std::string &id) |
static bool | QueryTeamInfoAsync (const std::string &tid, const QueryTeamInfoCallback &cb, const std::string &json_extension="") |
static TeamInfo | QueryTeamInfoBlock (const std::string &tid) |
static bool | QueryTeamInfoOnlineAsync (const std::string &tid, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | ParseTeamInfo (const std::string &json_team_info, TeamInfo &team_info) |
static void | UnregTeamCb () |
static bool | MuteMemberAsync (const std::string &tid, const std::string &member_id, bool set_mute, const TeamEventCallback &cb, const std::string &json_extension="") |
static bool | QueryMuteListOnlineAsync (const std::string &tid, const QueryTeamMembersOnlineCallback &cb, const std::string &json_extension="") |
static bool | MuteAsync (const std::string &tid, bool set_mute, const TeamEventCallback &cb, const std::string &json_extension="") |
static void | TeamMsgAckRead (const std::string &tid, const std::list< IMMessage > &msgs, const TeamEventCallback &cb, const std::string &json_extension="") |
static void | TeamMsgAckReadEx (const std::string &tid, const std::list< IMMessage > &msgs, const TeamMsgAckReadCallback &cb, const std::string &json_extension="") |
static void | TeamMsgQueryUnreadList (const std::string &tid, const IMMessage &msg, const TeamEventCallback &cb, const std::string &json_extension="") |
static void | TeamMsgQueryUnreadList (const std::string &tid, const IMMessage &msg, const std::list< std::string > &accids, const TeamEventCallback &cb, const std::string &json_extension="") |
static void | QueryTeamMembersInvitor (const std::string &tid, const std::list< std::string > &members, const QueryTeamMembersInvitorCallback &cb) |
static bool | QueryTeamInfoByKeywordAsync (const std::string &keyword, const QueryTeamsInfoCallback &cb, const std::string &json_extension="") |
static void | UpdateTInfoLocal (const std::list< TeamInfo > &team_infos, const UpdateTInfoLocalCallback &cb, const std::string &json_extension="") |
static void | GetTeamInfoBatchSFTrans (const GetTeamInfoBatchSFTransCallback &cb, uint64_t time_tag=0, const std::string &json_extension="") |
static void | GetTeaminfoList (const std::list< std::string > &tid_list, const GetTeamInfoListCallback &cb) |
群组功能;主要包括查询群信息、查询群成员信息、加人、踢人等功能
查询所有群信息回调模板 顺丰专用
typedef std::function<void(NIMResCode error_code, const std::list<nim::TeamInfo>& team_info_list, const std::list<std::string>& fail_list)> nim::Team::GetTeamInfoListCallback |
查询给定的一组群ID详细信息的回调模板
typedef std::function<void(int team_count, const std::list<std::string>& team_id_list)> nim::Team::QueryAllMyTeamsCallback |
查询本人所有群ID回调模板
typedef std::function<void(int team_count, const std::list<nim::TeamInfo>& team_info_list)> nim::Team::QueryAllMyTeamsInfoCallback |
查询本人所有群信息回调模板
typedef std::function<void(int count, const std::list<nim::TeamMemberProperty>& all_my_member_info_list)> nim::Team::QueryMyAllMemberInfosCallback |
查询本人所有群里我的成员信息回调模板
typedef std::function<void(const std::string& tid, const TeamInfo& result)> nim::Team::QueryTeamInfoCallback |
查询指定群信息回调模板
typedef std::function<void(const TeamMemberProperty& team_member_property)> nim::Team::QueryTeamMemberCallback |
查询指定群成员信息回调模板
typedef std::function<void(const std::string& tid, int member_count, const std::list<TeamMemberProperty>& props)> nim::Team::QueryTeamMembersCallback |
查询指定群组全部成员信息回调模板
typedef std::function<void(NIMResCode, const std::string&, const std::map<std::string, std::string>&)> nim::Team::QueryTeamMembersInvitorCallback |
查询群成员邀请人accid 列表回调模板
typedef std::function<void(NIMResCode error_code, const std::string& tid, const std::list<TeamMemberProperty>& team_member_propertys)> nim::Team::QueryTeamMembersOnlineCallback |
查询群成员信息回调模板
typedef std::function<void(const TeamEvent& team_event)> nim::Team::TeamEventCallback |
群组事件通知回调模板
typedef std::function<void(const TeamMemberSerachResult& result)> nim::Team::TeamMemberSearchCallback |
搜索群成员回调模板
typedef 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)> nim::Team::TeamMsgAckReadCallback |
typedef std::function<void(const std::list<std::string>& success_ids, const std::list<std::string>& failure_ids)> nim::Team::UpdateTInfoLocalCallback |
更新本地缓存回调模板顺丰专用
|
static |
接受邀请
[in] | tid | 群组id |
[in] | invitor_id | 邀请者id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 接受邀请的回调函数 |
|
static |
添加管理员
[in] | tid | 群组id |
[in] | ids | 管理员id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 添加管理员的回调函数 |
|
static |
添加群成员特别通知
[in] | tid | 群组id |
[in] | account_ids | 群成员id |
[in] | cb | 添加群成员特别通知的回调函数 |
|
static |
申请入群
[in] | tid | 群组id |
[in] | reason | 附言 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 申请入群的回调函数 |
|
static |
创建群组
[in] | team_info | 群组信息 |
[in] | ids | 邀请对象id |
[in] | invitation_postscript | 邀请附言 |
[in] | json_extension | json扩展参数 目前可用于配置反垃圾相关参数,格式{"anti_spam_business_id":"{\"textbid\":\"xxxx\",\"picbid\":\"xxxx\"}"} |
[in] | cb | 群通知的回调函数 |
|
static |
创建群组
[in] | team_info | 群组信息 |
[in] | ids | 邀请对象id |
[in] | invitation_postscript | 邀请附言 |
[in] | json_extension | json扩展参数 目前可用于配置反垃圾相关参数,格式{"anti_spam_business_id":"{\"textbid\":\"xxxx\",\"picbid\":\"xxxx\"}"} |
[in] | cb | 群通知的回调函数 |
|
static |
解散群
[in] | tid | 群组id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 解散群的回调函数 |
|
static |
查询所有群顺丰专用
[in] | cb | 查询所有群的回调函数 |
[in] | time_tag | 时间戳,没有特殊需求此参数赋0 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
|
static |
查询给定的一组群ID详细信息
[in] | tid_list | 群组id列表,最多10个 |
[in] | cb | 查询给定的一组群ID详细信息的回调模板 |
|
static |
[in] | tid | 群组id |
[in] | option | 搜索群成员选项 |
[in] | cb | 获取群成员列表的回调函数 |
|
static |
邀请
[in] | tid | 群组id |
[in] | ids | 邀请对象id |
[in] | invitation_postscript | 邀请附言 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 邀请的回调函数 |
|
static |
邀请
[in] | tid | 群组id |
[in] | ids | 邀请对象id |
[in] | invitation_postscript | 邀请附言 |
[in] | invitation_attachment | 用户可自定义的补充邀请信息 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 邀请的回调函数 |
|
static |
踢人
[in] | tid | 群组id |
[in] | ids | 被踢对象id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 踢人的回调函数 |
|
static |
离开群
[in] | tid | 群组id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 离开群的回调函数 |
|
static |
群禁言/解除群禁言
[in] | tid | 群组id |
[in] | set_mute | 禁言/解除禁言 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 踢人的回调函数 |
|
static |
禁言/解除禁言
[in] | tid | 群组id |
[in] | member_id | 操作对象id |
[in] | set_mute | 禁言/解除禁言 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 踢人的回调函数 |
|
static |
解析群组信息
[in] | json_team_info | json格式的群组信息 |
[out] | team_info | 群组信息 |
|
static |
同意入群申请
[in] | tid | 群组id |
[in] | applicant_id | 申请者id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 同意入群申请的回调函数 |
|
static |
查询所有群
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 查询所有群的回调函数 |
|
static |
查询所有群信息
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 查询所有群信息的回调函数 |
|
static |
获取群禁言成员列表
[in] | tid | 群组id |
[in] | cb | 回调函数 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
|
static |
查询所有群里我的成员信息(使用场景:获取了所有群列表后,需要查询自己在每个群里自己的成员信息,使用成员信息里的bits字段,可以判断当某个群发来消息后,是否做消息通知)
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 查询所有群里我的成员信息的回调函数 |
|
static |
查询群信息
[in] | tid | 群组id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 查询群信息的回调函数 |
|
static |
查询群信息(同步接口,堵塞NIM内部线程,谨慎使用)
[in] | tid | 群组id |
|
static |
查询群信息
[in] | keyword | 要查询的关键字 |
[in] | cb | 查询群信息的回调函数 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
|
static |
获取群信息(从服务器获取)
[in] | tid | 群组id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 获取群信息的回调函数 |
|
static |
查询(单个)群成员信息
[in] | tid | 群组id |
[in] | id | 群成员id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 查询群成员的回调函数 |
|
static |
查询(单个)群成员信息(同步接口,堵塞NIM内部线程,谨慎使用)
[in] | tid | 群组id |
[in] | id | 群成员id |
|
static |
查询群成员
[in] | tid | 群组id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 查询群成员的回调函数 |
|
static |
查询群成员的邀请人 accid 由接口 原 TeamQueryTeamMembersInvitor方法
[in] | tid | 群组id |
[in] | members | 要查询 的群成员accid列表 |
[in] | cb | 回调函数 |
|
static |
(全局回调)统一注册接收群通知回调函数(创建群,收到邀请等群通知通过此接口广播,注意:服务器推送过来的群通知和APP发起请求的回调统一处理!)
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 群通知的回调函数 |
|
static |
拒绝邀请
[in] | tid | 群组id |
[in] | invitor_id | 邀请者id |
[in] | reason | 附言 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 拒绝邀请的回调函数 |
|
static |
拒绝入群申请
[in] | tid | 群组id |
[in] | applicant_id | 申请者id |
[in] | reason | 附言 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 拒绝入群申请的回调函数 |
|
static |
删除管理员
[in] | tid | 群组id |
[in] | ids | 管理员id |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 删除管理员的回调函数 |
|
static |
[in] | tid | 群组id |
[in] | account_ids | 群成员id |
[in] | cb | 移除群成员特别通知的回调函数 |
|
static |
群消息回执
[in] | tid | 群组id |
[in] | msgs | 需要发送消息回执的群消息 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 回调函数 |
|
static |
群消息回执
[in] | tid | 群组id |
[in] | msgs | 需要发送消息回执的群消息 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 回调函数 |
|
static |
根据指定 ID 获取群租消息已读未读情况
[in] | tid | 群组id |
[in] | msg | 群消息 |
[in] | accids | 要查询的 ID 列表 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 回调函数 |
|
static |
获取群消息未读成员列表
[in] | tid | 群组id |
[in] | msg | 群消息 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 回调函数 |
|
static |
移交群主
[in] | tid | 群组id |
[in] | new_owner_id | 移交对象id |
[in] | is_leave | 是否同时退出群 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 移交群主的回调函数 |
|
static |
反注册Team提供的所有回调
|
static |
更新自己的群属性
[in] | prop | 群成员属性 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 更新自己的群属性的回调函数 |
|
static |
修改别人的群昵称
[in] | prop | 群成员属性 |
[in] | json_extension | json扩展参数(备用,目前不需要) |
[in] | cb | 修改别人的群昵称的回调函数 |
|
static |
更新群信息
[in] | tid | 群组id |
[in] | team_info | 群组信息 |
[in] | json_extension | json扩展参数 目前可用于配置反垃圾相关参数,格式{"anti_spam_business_id":"{\"textbid\":\"xxxx\",\"picbid\":\"xxxx\"}"} |
[in] | cb | 更新群信息的回调函数 |
|
static |
更新群信息顺丰专用
[in] | tid | 群组id |
[in] | team_infos | 群组信息 |
[in] | notify_event | 更新后是否触发事件以通知应用层 |
[in] | cb | 更新群信息的回调函数,回调中会指明更新成功与失败的群ID |
[in] | json_extension | json扩展参数(备用,目前不需要) |