NIM PC Cross Platform SDK
nim_friend_def.h
Go to the documentation of this file.
1
7#ifndef NIM_SDK_DLL_EXPORT_HEADERS_FRIEND_DEF_H_
8#define NIM_SDK_DLL_EXPORT_HEADERS_FRIEND_DEF_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15static const char* kNIMFriendKey = "list";
16
22// 协议定义
24static const char* kNIMFriendKeyAccid = "accid";
26static const char* kNIMFriendKeyFlag = "flag";
28static const char* kNIMFriendKeyBeFlag = "beflag";
30static const char* kNIMFriendKeySource = "source";
32static const char* kNIMFriendKeyAlias = "alias";
34static const char* kNIMFriendKeyBits = "bits";
36static const char* kNIMFriendKeyEx = "ex";
38static const char* kNIMFriendKeyCreateTime = "create_timetag";
40static const char* kNIMFriendKeyUpdateTime = "update_timetag";
42static const char* kNIMFriendServerEx = "server_ex"; // 好友简况 Json Keys
44
48// 协议定义
50static const char* kNIMFriendDeleteAlias = "delete_alias"; // 删除好有拓展选项 Json Keys
52
59};
60
65};
66
77};
78
89};
90
99};
100
108typedef void (*nim_friend_opt_cb_func)(int res_code, const char* json_extension, const void* user_data);
109
118typedef void (*nim_friend_get_list_cb_func)(int res_code, const char* friend_list_json, const char* json_extension, const void* user_data);
119
129typedef void (*nim_friend_get_profile_cb_func)(const char* accid, const char* friend_profile_json, const char* json_extension, const void* user_data);
130
141typedef void (*nim_friend_change_cb_func)(enum NIMFriendChangeType type, const char* result_json, const char* json_extension, const void* user_data);
142
143#ifdef __cplusplus
144}
145#endif
146
147#endif // NIM_SDK_DLL_EXPORT_HEADERS_FRIEND_DEF_H_
static const char * kNIMFriendKey
好友简况 json array,
Definition: nim_friend_def.h:15
NIMFriendChangeType
Definition: nim_friend_def.h:80
@ kNIMFriendChangeTypeSyncList
好友列表同步与更新
Definition: nim_friend_def.h:88
@ kNIMFriendChangeTypeDel
删除好友
Definition: nim_friend_def.h:84
@ kNIMFriendChangeTypeRequest
加好友/处理好友请求
Definition: nim_friend_def.h:82
@ kNIMFriendChangeTypeUpdate
更新好友
Definition: nim_friend_def.h:86
static const char * kNIMFriendServerEx
string, 服务端扩展字段,此字段客户端sdk只读,服务端api读写
Definition: nim_friend_def.h:42
static const char * kNIMFriendKeyAccid
string, 好友帐号
Definition: nim_friend_def.h:24
void(* nim_friend_opt_cb_func)(int res_code, const char *json_extension, const void *user_data)
Definition: nim_friend_def.h:108
static const char * kNIMFriendKeySource
NIMFriendSource, 好友来源
Definition: nim_friend_def.h:30
void(* nim_friend_get_profile_cb_func)(const char *accid, const char *friend_profile_json, const char *json_extension, const void *user_data)
Definition: nim_friend_def.h:129
void(* nim_friend_get_list_cb_func)(int res_code, const char *friend_list_json, const char *json_extension, const void *user_data)
Definition: nim_friend_def.h:118
static const char * kNIMFriendKeyAlias
string, 备注名
Definition: nim_friend_def.h:32
static const char * kNIMFriendKeyBits
long, 扩展字段,位运算型
Definition: nim_friend_def.h:34
static const char * kNIMFriendKeyEx
string, 扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_friend_def.h:36
static const char * kNIMFriendDeleteAlias
bool, 删除好友时是否删除备注信息
Definition: nim_friend_def.h:50
NIMFriendFlag
Definition: nim_friend_def.h:54
@ kNIMFriendFlagNormal
普通好友
Definition: nim_friend_def.h:58
@ kNIMFriendFlagNotFriend
陌生人
Definition: nim_friend_def.h:56
static const char * kNIMFriendKeyBeFlag
NIMFriendFlag, 反向好友关系
Definition: nim_friend_def.h:28
NIMVerifyType
Definition: nim_friend_def.h:68
@ kNIMVerifyTypeAgree
同意
Definition: nim_friend_def.h:74
@ kNIMVerifyTypeAsk
请求加好友
Definition: nim_friend_def.h:72
@ kNIMVerifyTypeAdd
直接加好友
Definition: nim_friend_def.h:70
@ kNIMVerifyTypeReject
拒绝
Definition: nim_friend_def.h:76
static const char * kNIMFriendKeyUpdateTime
long, 更新时间戳(ms)
Definition: nim_friend_def.h:40
void(* nim_friend_change_cb_func)(enum NIMFriendChangeType type, const char *result_json, const char *json_extension, const void *user_data)
Definition: nim_friend_def.h:141
static const char * kNIMFriendKeyCreateTime
long, 创建时间戳(ms)
Definition: nim_friend_def.h:38
NIMFriendQueryType
Definition: nim_friend_def.h:92
@ kNIMFriendQueryDefault
同时匹配账户ID和备注名
Definition: nim_friend_def.h:94
@ kNIMFriendQueryByAlias
仅匹配备注名
Definition: nim_friend_def.h:98
@ kNIMFriendQueryByAccId
仅匹配账户ID
Definition: nim_friend_def.h:96
NIMFriendSource
Definition: nim_friend_def.h:62
@ kNIMFriendSourceDefault
默认
Definition: nim_friend_def.h:64
static const char * kNIMFriendKeyFlag
NIMFriendFlag, 好友关系,修改时需要同步更新反向好友关系beflag.
Definition: nim_friend_def.h:26