NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_user_def.h
浏览该文件的文档.
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
27
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";
53 // 用户特殊关系(黑名单、静音名单) 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";
83static const char* kNIMNameCardKeyModelType = "model_type";
85static const char* kNIMNameCardKeyModelConfig = "model_config";
86static const char* kNIMNameCardKeyModelConfigKeyPrompt = "prompt";
87static const char* kNIMNameCardKeyModelConfigKeyMaxTokens = "max_tokens";
88static const char* kNIMNameCardKeyModelConfigKeyTopP = "top_p";
89static const char* kNIMNameCardKeyModelConfigKeyTemperature = "temperature";
90static const char* kNIMNameCardKeyModelConfigKeyName = "model";
91static const char* kNIMNameCardKeyModelConfigKeyPromptKeys = "prompt_keys";
92static const char* kNIMNameCardKeyYiDunConfig = "yidun_config";
93static const char* kNIMNameCardKeyValidFlag = "valid_flag";
94 // 用户名片 Json Keys
95
110 const char* result_json,
111 const char* json_extension,
112 const void* user_data);
113
123typedef void (*nim_user_opt_cb_func)(int res_code, const char* accid, bool opt, const char* json_extension, const void* user_data);
124
137typedef void (*nim_user_sync_muteandblacklist_cb_func)(int res_code, const char* black_list_json, const char* json_extension, const void* user_data);
138
147typedef void (*nim_user_name_card_change_cb_func)(const char* result_json, const char* json_extension, const void* user_data);
148
157typedef void (*nim_user_get_user_name_card_cb_func)(const char* result_json, const char* json_extension, const void* user_data);
158
166typedef void (*nim_user_update_my_name_card_cb_func)(int res_code, const char* json_extension, const void* user_data);
167
168#ifdef __cplusplus
169};
170#endif // __cplusplus
171#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:123
static const char * kNIMNameCardKeyModelConfigKeyTopP
Definition nim_user_def.h:88
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 * kNIMNameCardKeyYiDunConfig
Definition nim_user_def.h:92
static const char * kNIMSpecialRelationKeyCreateTime
long, 记录创建时间
Definition nim_user_def.h:50
static const char * kNIMNameCardKeyModelType
int AI 数字人模型类型
Definition nim_user_def.h:83
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:137
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:109
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 * kNIMNameCardKeyModelConfigKeyPrompt
Definition nim_user_def.h:86
static const char * kNIMNameCardKeyModelConfigKeyPromptKeys
Definition nim_user_def.h:91
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:147
static const char * kNIMNameCardKeyGender
int 性别
Definition nim_user_def.h:69
static const char * kNIMNameCardKeyValidFlag
Definition nim_user_def.h:93
static const char * kNIMSpecialRelationKeyIsBlackList
bool, 是黑名单帐号
Definition nim_user_def.h:48
static const char * kNIMNameCardKeyModelConfigKeyMaxTokens
Definition nim_user_def.h:87
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:166
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:157
static const char * kNIMNameCardKeyModelConfig
object AI 数字人模型配置
Definition nim_user_def.h:85
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 * kNIMNameCardKeyModelConfigKeyName
Definition nim_user_def.h:90
static const char * kNIMNameCardKeyEmail
string 邮箱
Definition nim_user_def.h:71
static const char * kNIMNameCardKeyModelConfigKeyTemperature
Definition nim_user_def.h:89
static const char * kNIMNameCardKeyBirth
string 生日
Definition nim_user_def.h:73
NIM SDK 及 NIM ChatRoom SDK 公用头文件