NIM PC Cross Platform SDK
nim_team_def.h
Go to the documentation of this file.
1
8#ifndef NIM_SDK_DLL_EXPORT_HEADERS_TEAM_DEF_H_
9#define NIM_SDK_DLL_EXPORT_HEADERS_TEAM_DEF_H_
10
11#include "public_defines.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
27typedef void (*nim_team_event_cb_func)(int res_code,
28 int notification_id,
29 const char* tid,
30 const char* result,
31 const char* json_extension,
32 const void* user_data);
33
44typedef void (*nim_team_msg_ack_read_ex_cb_func)(const char* tid,
45 const char* success_ids,
46 const char* failure_ids,
47 const char* ignored_ids,
48 const void* user_data);
49
54
63typedef void (*nim_team_query_all_my_teams_cb_func)(int team_count, const char* result, const char* json_extension, const void* user_data);
64
73typedef void (*nim_team_query_all_my_teams_info_cb_func)(int team_count, const char* result, const char* json_extension, const void* user_data);
74
83typedef void (*nim_team_get_team_info_list_cb_func)(int code, const char* tinfo_list, const char* fail_tid_list, const void* user_data);
84
93typedef void (*nim_team_query_my_all_member_infos_cb_func)(int team_count, const char* result, const char* json_extension, const void* user_data);
94
106typedef void (*nim_team_query_team_members_cb_func)(const char* tid,
107 int member_count,
108 bool include_user_info,
109 const char* result,
110 const char* json_extension,
111 const void* user_data);
112
123typedef void (
124 *nim_team_query_team_member_cb_func)(const char* tid, const char* user_id, const char* result, const char* json_extension, const void* user_data);
125
134typedef void (*nim_team_query_team_info_cb_func)(const char* tid, const char* result, const char* json_extension, const void* user_data);
135
147typedef void (*nim_team_query_mute_list_cb_func)(int res_code,
148 int member_count,
149 const char* tid,
150 const char* result,
151 const char* json_extension,
152 const void* user_data);
153
162typedef void (*nim_team_query_members_invitor_cb_func)(int res_code, const char* tid, const char* result, const void* user_data);
163
171typedef void (*nim_team_update_tinfo_local_cb_func)(const char* success_ids, const char* failure_ids, const void* user_data);
172
179};
180
187};
188
195};
196
203};
204
214
219static const char* kNIMTeamInfoKeyID = "tid";
221static const char* kNIMTeamInfoKeyName = "name";
223static const char* kNIMTeamInfoKeyType = "type";
225static const char* kNIMTeamInfoKeyCreator = "creator";
227static const char* kNIMTeamInfoKeyLevel = "level";
229static const char* kNIMTeamInfoKeyMemberMaxCount = "member_max_count";
231static const char* kNIMTeamInfoKeyProperty = "prop";
233static const char* kNIMTeamInfoKeyValidFlag = "valid";
235static const char* kNIMTeamInfoKeyMemberCount = "member_count";
237static const char* kNIMTeamInfoKeyListTime = "list_timetag";
239static const char* kNIMTeamInfoKeyCreateTime = "create_timetag";
241static const char* kNIMTeamInfoKeyUpdateTime = "update_timetag";
243static const char* kNIMTeamInfoKeyMemberValid = "member_valid";
245static const char* kNIMTeamInfoKeyIntro = "intro";
247static const char* kNIMTeamInfoKeyAnnouncement = "announcement";
249static const char* kNIMTeamInfoKeyJoinMode = "join_mode";
251static const char* kNIMTeamInfoKeyBits = "bits";
253static const char* kNIMTeamInfoKeyCustom = "custom";
255static const char* kNIMTeamInfoKeyServerCustom = "server_custom";
257static const char* kNIMTeamInfoKeyIcon = "icon";
259static const char* kNIMTeamInfoKeyBeInviteMode = "be_invite_mode";
261static const char* kNIMTeamInfoKeyInviteMode = "invite_mode";
263static const char* kNIMTeamInfoKeyUpdateInfoMode = "update_info_mode";
265static const char* kNIMTeamInfoKeyUpdateCustomMode = "update_custom_mode";
267static const char* kNIMTeamInfoKeyMuteAll = "mute_all";
268static const char* kNIMTeamInfoKeyMuteType =
270 "mute_type"; // 群组信息Json Keys
272
281};
282
291};
292
299};
300
305static const char* kNIMTeamUserKeyID = "tid";
307static const char* kNIMTeamUserKeyAccID = "accid";
309static const char* kNIMTeamUserKeyType = "type";
311static const char* kNIMTeamUserKeyNick = "nick";
313static const char* kNIMTeamUserKeyBits = "bits";
315static const char* kNIMTeamUserKeyValidFlag = "valid";
317static const char* kNIMTeamUserKeyCreateTime = "create_timetag";
319static const char* kNIMTeamUserKeyUpdateTime = "update_timetag";
321static const char* kNIMTeamUserKeyCustom = "custom";
323static const char* kNIMTeamUserKeyMute = "mute";
325static const char* kNIMTeamUserKeyInvitorAccID = "invitor_accid"; // 群组成员信息Json Keys
327
340};
341
350};
351
356static const char* kNIMTeamSearchKeyIncludeInvalid = "include_invalid"; // 搜索本地群组相关信息扩展参数
358
359#ifdef __cplusplus
360};
361#endif // __cplusplus
362#endif // NIM_SDK_DLL_EXPORT_HEADERS_TEAM_DEF_H_
static const char * kNIMTeamUserKeyBits
long,群成员属性,位操作(NIMTeamBitsConfigMask)
Definition: nim_team_def.h:313
static const char * kNIMTeamInfoKeyType
int,群类型(NIMTeamType)
Definition: nim_team_def.h:223
void(* nim_team_query_team_member_cb_func)(const char *tid, const char *user_id, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:124
static const char * kNIMTeamSearchKeyIncludeInvalid
bool,是否包括无效群(成员),不在群里(离开或被踢)或者群已经解散
Definition: nim_team_def.h:356
static const char * kNIMTeamInfoKeyUpdateTime
long,群信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:241
void(* nim_team_query_team_info_cb_func)(const char *tid, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:134
NIMTeamBeInviteMode
Definition: nim_team_def.h:174
@ kNIMTeamBeInviteModeNotNeedAgree
不需要同意
Definition: nim_team_def.h:178
@ kNIMTeamBeInviteModeNeedAgree
需要同意
Definition: nim_team_def.h:176
static const char * kNIMTeamUserKeyUpdateTime
long,群成员信息上次更新时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:319
static const char * kNIMTeamInfoKeyProperty
string,群性质,长度限制:6000字符
Definition: nim_team_def.h:231
static const char * kNIMTeamInfoKeyListTime
long,群列表时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:237
void(* nim_team_query_all_my_teams_cb_func)(int team_count, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:63
static const char * kNIMTeamInfoKeyMemberValid
int,群有效性标记位,客户端用,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:243
NIMTeamQueryType
Definition: nim_team_def.h:206
@ kNIMTeamQueryByTeamId
仅匹配群组 ID,传字符串,SDK 会自动转为 long 类型数据与群组 ID 严格匹配
Definition: nim_team_def.h:210
@ kNIMTeamQueryByTeamName
仅匹配群组名称
Definition: nim_team_def.h:212
@ kNIMTeamQueryDefault
默认,匹配群组 ID 和群名称
Definition: nim_team_def.h:208
static const char * kNIMTeamInfoKeyCreator
string 群拥有者ID,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:225
static const char * kNIMTeamInfoKeyUpdateInfoMode
int, 谁可以修改群资料,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateInfoModeManager(0)/kNIMTeamUpdateInfoModeEveryone(1)
Definition: nim_team_def.h:263
void(* nim_team_get_team_info_list_cb_func)(int code, const char *tinfo_list, const char *fail_tid_list, const void *user_data)
Definition: nim_team_def.h:83
static const char * kNIMTeamUserKeyType
int,群成员类型(NIMTeamUserType),默认kNIMTeamUserTypeNomal(0)
Definition: nim_team_def.h:309
static const char * kNIMTeamInfoKeyLevel
int,■■已废弃■■ 群等级,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:227
void(* nim_team_query_mute_list_cb_func)(int res_code, int member_count, const char *tid, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:147
void(* nim_team_query_team_members_cb_func)(const char *tid, int member_count, bool include_user_info, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:106
NIMTeamType
Definition: nim_team_def.h:294
@ kNIMTeamTypeNormal
普通群
Definition: nim_team_def.h:296
@ kNIMTeamTypeAdvanced
高级群
Definition: nim_team_def.h:298
static const char * kNIMTeamUserKeyNick
string,群成员昵称
Definition: nim_team_def.h:311
static const char * kNIMTeamInfoKeyName
string,群名称
Definition: nim_team_def.h:221
NIMTeamMuteType
Definition: nim_team_def.h:274
@ kNIMTeamMuteTypeNomalMute
普通成员禁言
Definition: nim_team_def.h:278
@ kNIMTeamMuteTypeAllMute
全部禁言
Definition: nim_team_def.h:280
@ kNIMTeamMuteTypeNone
不禁言
Definition: nim_team_def.h:276
void(* nim_team_query_members_invitor_cb_func)(int res_code, const char *tid, const char *result, const void *user_data)
Definition: nim_team_def.h:162
static const char * kNIMTeamInfoKeyCustom
string, 第三方扩展字段(仅负责存储和透传)
Definition: nim_team_def.h:253
static const char * kNIMTeamInfoKeyBeInviteMode
int, 被邀请人同意方式,属性本身只有群主管理员可以修改,默认kNIMTeamBeInviteModeNeedAgree(0)/kNIMTeamBeInviteModeNotNeedAgree(1)
Definition: nim_team_def.h:259
static const char * kNIMTeamUserKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:305
static const char * kNIMTeamUserKeyCustom
string,群成员自定义扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_team_def.h:321
static const char * kNIMTeamInfoKeyJoinMode
int,入群模式(NIMTeamJoinMode),默认为kNIMTeamJoinModeNoAuth(0),不需要验证
Definition: nim_team_def.h:249
static const char * kNIMTeamInfoKeyID
string,群id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:219
void(* nim_team_query_all_my_teams_info_cb_func)(int team_count, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:73
void(* nim_team_update_tinfo_local_cb_func)(const char *success_ids, const char *failure_ids, const void *user_data)
Definition: nim_team_def.h:171
NIMTeamJoinMode
Definition: nim_team_def.h:343
@ kNIMTeamJoinModeNoAuth
不用验证
Definition: nim_team_def.h:345
@ kNIMTeamJoinModeNeedAuth
需要验证
Definition: nim_team_def.h:347
@ kNIMTeamJoinModeRejectAll
拒绝所有人入群
Definition: nim_team_def.h:349
static const char * kNIMTeamInfoKeyAnnouncement
string,群公告,长度限制:5000字符
Definition: nim_team_def.h:247
static const char * kNIMTeamInfoKeyMemberMaxCount
int,在创建群时,设置群的最大成员数,不可超过应用设定的最大成员数,否则返回414
Definition: nim_team_def.h:229
void(* nim_team_msg_ack_read_ex_cb_func)(const char *tid, const char *success_ids, const char *failure_ids, const char *ignored_ids, const void *user_data)
Definition: nim_team_def.h:44
static const char * kNIMTeamUserKeyCreateTime
long,入群时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:317
NIMTeamUpdateCustomMode
Definition: nim_team_def.h:198
@ kNIMTeamUpdateCustomModeManager
管理员
Definition: nim_team_def.h:200
@ kNIMTeamUpdateCustomModeEveryone
所有人
Definition: nim_team_def.h:202
static const char * kNIMTeamUserKeyInvitorAccID
string,邀请者的accid 主动入群的时为空,尚未进行过初始化为" "
Definition: nim_team_def.h:325
static const char * kNIMTeamInfoKeyServerCustom
string, 第三方服务器扩展字段(该配置项只能通过服务器接口设置,对客户端只读)
Definition: nim_team_def.h:255
nim_team_event_cb_func nim_team_opt_cb_func
Definition: nim_team_def.h:53
NIMTeamInviteMode
Definition: nim_team_def.h:182
@ kNIMTeamInviteModeManager
管理员
Definition: nim_team_def.h:184
@ kNIMTeamInviteModeEveryone
所有人
Definition: nim_team_def.h:186
static const char * kNIMTeamInfoKeyValidFlag
int,群有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:233
static const char * kNIMTeamUserKeyValidFlag
int,群成员有效性标记位,有效1,无效0,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:315
void(* nim_team_query_my_all_member_infos_cb_func)(int team_count, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:93
static const char * kNIMTeamInfoKeyIcon
string, 群头像,长度限制:1024字符
Definition: nim_team_def.h:257
void(* nim_team_event_cb_func)(int res_code, int notification_id, const char *tid, const char *result, const char *json_extension, const void *user_data)
Definition: nim_team_def.h:27
static const char * kNIMTeamInfoKeyIntro
string,群介绍,长度限制:255字符
Definition: nim_team_def.h:245
static const char * kNIMTeamInfoKeyUpdateCustomMode
int, 谁可以更新群自定义属性,属性本身只有群主管理员可以修改,默认kNIMTeamUpdateCustomModeManager(0)/kNIMTeamUpdateCustomModeEveryon...
Definition: nim_team_def.h:265
static const char * kNIMTeamInfoKeyCreateTime
long,群创建时间戳(毫秒),通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:239
NIMTeamUpdateInfoMode
Definition: nim_team_def.h:190
@ kNIMTeamUpdateInfoModeEveryone
所有人
Definition: nim_team_def.h:194
@ kNIMTeamUpdateInfoModeManager
管理员
Definition: nim_team_def.h:192
static const char * kNIMTeamUserKeyMute
int,是否被禁言,0-非禁言(默认),1-禁言
Definition: nim_team_def.h:323
static const char * kNIMTeamInfoKeyInviteMode
int, 谁可以邀请他人入群,属性本身只有群主管理员可以修改,默认kNIMTeamInviteModeManager(0)/kNIMTeamInviteModeEveryone(1)
Definition: nim_team_def.h:261
static const char * kNIMTeamInfoKeyBits
long, 群属性,开发者无需关注 20161011 by Oleg
Definition: nim_team_def.h:251
static const char * kNIMTeamUserKeyAccID
string,群成员id,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:307
NIMTeamBitsConfigMask
Definition: nim_team_def.h:284
@ kNIMTeamBitsConfigMaskMuteNotify
关闭提醒 bits 0001b
Definition: nim_team_def.h:288
@ kNIMTeamBitsConfigMaskMuteNone
开启提醒 bits 0000b
Definition: nim_team_def.h:286
@ kNIMTeamBitsConfigMaskOnlyAdmin
只接收管理员消息 bits 0010b 超大群当前不支持该选项
Definition: nim_team_def.h:290
static const char * kNIMTeamInfoKeyMemberCount
int,群成员数量,通常情况下由SDK维护,开发者作为只读无需设置
Definition: nim_team_def.h:235
NIMTeamUserType
Definition: nim_team_def.h:329
@ kNIMTeamUserTypeCreator
创建者
Definition: nim_team_def.h:333
@ kNIMTeamUserTypeLocalWaitAccept
本地记录等待正在入群的用户
Definition: nim_team_def.h:339
@ kNIMTeamUserTypeApply
申请加入用户
Definition: nim_team_def.h:337
@ kNIMTeamUserTypeManager
管理员
Definition: nim_team_def.h:335
@ kNIMTeamUserTypeNomal
普通成员
Definition: nim_team_def.h:331
static const char * kNIMTeamInfoKeyMuteAll
int, 群全员禁言标记 0:未禁言,1:禁言, 开发者只读 无法设置
Definition: nim_team_def.h:267
NIM SDK 及 NIM ChatRoom SDK 公用头文件