NIM PC Cross Platform SDK
nim_user_def.h
Go to the documentation of this file.
1
8#ifndef NIM_SDK_DLL_EXPORT_HEADERS_NIM_USER_DEF_H_
9#define NIM_SDK_DLL_EXPORT_HEADERS_NIM_USER_DEF_H_
10
11#include "nim_global_def.h"
12#include "public_defines.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
26};
27
36};
37
42// 协议定义
44static const char* kNIMSpecialRelationKeyAccid = "accid";
46static const char* kNIMSpecialRelationKeyIsMute = "is_mute";
48static const char* kNIMSpecialRelationKeyIsBlackList = "is_black";
50static const char* kNIMSpecialRelationKeyCreateTime = "create_timetag";
52static const char* kNIMSpecialRelationKeyUpdateTime = "update_timetag"; // 用户特殊关系(黑名单、静音名单) Json Keys
54
59// 协议定义
61static const char* kNIMNameCardKeyAccid = "accid";
63static const char* kNIMNameCardKeyName = "name";
65static const char* kNIMNameCardKeyIcon = "icon";
67static const char* kNIMNameCardKeySign = "sign";
69static const char* kNIMNameCardKeyGender = "gender";
71static const char* kNIMNameCardKeyEmail = "email";
73static const char* kNIMNameCardKeyBirth = "birth";
75static const char* kNIMNameCardKeyMobile = "mobile";
77static const char* kNIMNameCardKeyEx = "ex";
79static const char* kNIMNameCardKeyCreateTime = "create_timetag";
81static const char* kNIMNameCardKeyUpdateTime = "update_timetag"; // 用户名片 Json Keys
83
98 const char* result_json,
99 const char* json_extension,
100 const void* user_data);
101
111typedef void (*nim_user_opt_cb_func)(int res_code, const char* accid, bool opt, const char* json_extension, const void* user_data);
112
125typedef void (*nim_user_sync_muteandblacklist_cb_func)(int res_code, const char* black_list_json, const char* json_extension, const void* user_data);
126
135typedef void (*nim_user_name_card_change_cb_func)(const char* result_json, const char* json_extension, const void* user_data);
136
145typedef void (*nim_user_get_user_name_card_cb_func)(const char* result_json, const char* json_extension, const void* user_data);
146
154typedef void (*nim_user_update_my_name_card_cb_func)(int res_code, const char* json_extension, const void* user_data);
155
156#ifdef __cplusplus
157};
158#endif // __cplusplus
159#endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_USER_DEF_H_
辅助能力 接口相关的常量函数等定义头文件
static const char * kNIMNameCardKeyAccid
string 帐号
Definition: nim_user_def.h:61
void(* nim_user_opt_cb_func)(int res_code, const char *accid, bool opt, const char *json_extension, const void *user_data)
Definition: nim_user_def.h:111
static const char * kNIMNameCardKeyName
string 昵称
Definition: nim_user_def.h:63
NIMUserQueryType
Definition: nim_user_def.h:29
@ kNIMUserQueryDefault
查询默认条件,将匹配账户ID和昵称
Definition: nim_user_def.h:31
@ kNIMUserQueryByNickname
仅匹配用户昵称
Definition: nim_user_def.h:35
@ kNIMUserQueryByAccId
仅匹配账户ID
Definition: nim_user_def.h:33
static const char * kNIMSpecialRelationKeyUpdateTime
long, 记录更新时间
Definition: nim_user_def.h:52
static const char * kNIMNameCardKeyIcon
string 头像
Definition: nim_user_def.h:65
static const char * kNIMNameCardKeyCreateTime
long 创建时间戳 毫秒
Definition: nim_user_def.h:79
static const char * kNIMNameCardKeyMobile
string 电话
Definition: nim_user_def.h:75
static const char * kNIMNameCardKeyUpdateTime
long 更新时间戳 毫秒
Definition: nim_user_def.h:81
static const char * kNIMSpecialRelationKeyCreateTime
long, 记录创建时间
Definition: nim_user_def.h:50
void(* nim_user_sync_muteandblacklist_cb_func)(int res_code, const char *black_list_json, const char *json_extension, const void *user_data)
Definition: nim_user_def.h:125
void(* nim_user_special_relationship_change_cb_func)(enum NIMUserSpecialRelationshipChangeType type, const char *result_json, const char *json_extension, const void *user_data)
Definition: nim_user_def.h:97
static const char * kNIMSpecialRelationKeyIsMute
bool, 是静音帐号
Definition: nim_user_def.h:46
static const char * kNIMNameCardKeyEx
string 扩展字段, 必须为可以解析为json的非格式化的字符串
Definition: nim_user_def.h:77
static const char * kNIMSpecialRelationKeyAccid
string, 用户帐号
Definition: nim_user_def.h:44
void(* nim_user_name_card_change_cb_func)(const char *result_json, const char *json_extension, const void *user_data)
Definition: nim_user_def.h:135
static const char * kNIMNameCardKeyGender
int 性别
Definition: nim_user_def.h:69
static const char * kNIMSpecialRelationKeyIsBlackList
bool, 是黑名单帐号
Definition: nim_user_def.h:48
void(* nim_user_update_my_name_card_cb_func)(int res_code, const char *json_extension, const void *user_data)
Definition: nim_user_def.h:154
void(* nim_user_get_user_name_card_cb_func)(const char *result_json, const char *json_extension, const void *user_data)
Definition: nim_user_def.h:145
NIMUserSpecialRelationshipChangeType
Definition: nim_user_def.h:19
@ kNIMUserSpecialRelationshipChangeTypeMarkBlack
添加删除黑名单
Definition: nim_user_def.h:21
@ kNIMUserSpecialRelationshipChangeTypeMarkMute
添加删除静音名单
Definition: nim_user_def.h:23
@ kNIMUserSpecialRelationshipChangeTypeSyncMuteAndBlackList
同步黑名单和静音名单
Definition: nim_user_def.h:25
static const char * kNIMNameCardKeySign
string 签名
Definition: nim_user_def.h:67
static const char * kNIMNameCardKeyEmail
string 邮箱
Definition: nim_user_def.h:71
static const char * kNIMNameCardKeyBirth
string 生日
Definition: nim_user_def.h:73
NIM SDK 及 NIM ChatRoom SDK 公用头文件