NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_global_def.h
浏览该文件的文档.
1
8#ifndef NIM_SDK_DLL_EXPORT_HEADERS_NIM_GLOBAL_DEF_H_
9#define NIM_SDK_DLL_EXPORT_HEADERS_NIM_GLOBAL_DEF_H_
10
11#include "public_defines.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
20static const char* kNIMResCode = "err_code"; // json params for NIMResCode, see nim_res_code_def.h
22
29typedef void (*nim_json_transport_cb_func)(const char* json_params, const void* user_data);
30
39typedef void (*nim_relogin_request_token_cb_func)(char** auth_token, uint32_t* length, const char* json_params, const void* user_data);
40
49typedef void (*nim_request_login_extension_cb_func)(char** auth_token, uint32_t* length, const char* json_params, const void* user_data);
50
63};
64
72typedef void (*nim_sdk_log_cb_func)(int log_level, const char* log, const void* user_data);
73
78};
86typedef void (*nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char* log, const void* user_data);
87
92static const char* kNIMCacheFileType = "file_type";
94static const char* kNIMCacheFileCount = "file_count";
96static const char* kNIMCacheFilePath = "file_path";
98static const char* kNIMCacheFileTotalSize = "total_size"; // 查询SDK文件缓存信息回调info结构定义
100
105static const char* kNIMCacheFileOther = "res";
107static const char* kNIMCacheFileImage = "image";
109static const char* kNIMCacheFileAudio = "audio";
111static const char* kNIMCacheFileVideo = "video"; // 查询SDK文件缓存信息文件类型file_type
113
118static const char* kNIMGrayMixStoreEnable = "mixStoreEnable";
120static const char* kNIMGrayTestEnable = "testEnbale";
129typedef void (*nim_sdk_get_cache_file_info_cb_func)(const char* info, const void* user_data);
130
137typedef void (*nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void* user_data);
138
145typedef void (*nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void* user_data);
146
157};
162static const char* kNIMDBErrDBName = "db_name";
164static const char* kNIMDBERROperation = "operation";
166static const char* kNIMDBErrCode = "error_code";
168static const char* kNIMDBErrDescription_ = "error_description";
170static const char* kNIMDBErrAttach = "error_attach"; // SDK DB操作出错时的反馈回调数据 error_info
172
179typedef void (*nim_global_sdk_db_error_cb_func)(const char* error_info, const void* user_data);
180
187typedef void (*nim_global_upload_sdk_log_cb_func)(int rescode, const void* user_data);
188
196typedef void (*nim_global_upload_sdk_log_async_cb_func)(int rescode, const char* download_url, const void* user_data);
197
202};
217};
226typedef void (*nim_global_detect_proxy_cb_func)(bool network_connect, enum NIMProxyDetectStep step, const char* json_params, const void* user_data);
227
228#ifdef __cplusplus
229};
230#endif //__cplusplus
231#endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_GLOBAL_DEF_H_
NIMSDKLogLevel
Definition: nim_chatroom_def.h:542
static const char * kNIMCacheFileVideo
视频消息缓存
Definition: nim_global_def.h:111
static const char * kNIMCacheFileImage
图片消息缓存
Definition: nim_global_def.h:107
static const char * kNIMCacheFileOther
杂项文件缓存
Definition: nim_global_def.h:105
NIMProxyType
Definition: nim_global_def.h:204
@ kNIMProxySocks5
Socks5 Proxy
Definition: nim_global_def.h:214
@ kNIMProxySocks4
Socks4 Proxy
Definition: nim_global_def.h:210
@ kNIMProxyNone
不使用代理
Definition: nim_global_def.h:206
@ kNIMProxyNrtc
云信音视频私有代理,只在nim_vchat_set_proxy中有效
Definition: nim_global_def.h:216
@ kNIMProxySocks4a
Socks4a Proxy
Definition: nim_global_def.h:212
@ kNIMProxyHttp11
HTTP 1.1 Proxy(暂不支持)
Definition: nim_global_def.h:208
static const char * kNIMGrayTestEnable
bool, 是否开启测试
Definition: nim_global_def.h:120
static const char * kNIMDBErrDescription_
相应的错误描述
Definition: nim_global_def.h:168
static const char * kNIMCacheFileTotalSize
int64,文件总大小KB
Definition: nim_global_def.h:98
NIMSDKException
Definition: nim_global_def.h:75
@ kNIMSDKExceptionSpaceEmpty
当前数据目录所在盘符空间紧张或用完, log: {"free_space" : lf, "message":""}, free_space单位M
Definition: nim_global_def.h:77
void(* nim_global_upload_sdk_log_cb_func)(int rescode, const void *user_data)
上传SDK日志回调
Definition: nim_global_def.h:187
NIMProxyDetectStep
Definition: nim_global_def.h:199
@ kNIMProxyDetectStepAllComplete
探测代理有效性结束
Definition: nim_global_def.h:201
static const char * kNIMCacheFileType
string,文件类型
Definition: nim_global_def.h:92
static const char * kNIMGrayMixStoreEnable
bool, 是否开启融合存储
Definition: nim_global_def.h:118
void(* nim_request_login_extension_cb_func)(char **auth_token, uint32_t *length, const char *json_params, const void *user_data)
Definition: nim_global_def.h:49
void(* nim_sdk_log_cb_func)(int log_level, const char *log, const void *user_data)
Definition: nim_global_def.h:72
void(* nim_global_upload_sdk_log_async_cb_func)(int rescode, const char *download_url, const void *user_data)
Definition: nim_global_def.h:196
static const char * kNIMDBERROperation
出错DB的操作(读、写、更新、删除)
Definition: nim_global_def.h:164
static const char * kNIMDBErrAttach
具体的出错信息
Definition: nim_global_def.h:170
static const char * kNIMCacheFileAudio
语音消息缓存
Definition: nim_global_def.h:109
static const char * kNIMResCode
int, NIMResCode
Definition: nim_global_def.h:20
void(* nim_sdk_get_cache_file_info_cb_func)(const char *info, const void *user_data)
Definition: nim_global_def.h:129
void(* nim_global_detect_proxy_cb_func)(bool network_connect, enum NIMProxyDetectStep step, const char *json_params, const void *user_data)
Definition: nim_global_def.h:226
@ kNIMSDKLogLevelFatal
SDK Fatal级别Log
Definition: nim_global_def.h:54
@ kNIMSDKLogLevelWarn
SDK Warn级别Log
Definition: nim_global_def.h:58
@ kNIMSDKLogLevelPro
SDK调试过程级别Log,更加详细,更有利于开发调试
Definition: nim_global_def.h:62
@ kNIMSDKLogLevelApp
SDK应用级别Log,正式发布时为了精简sdk log,可采用此级别
Definition: nim_global_def.h:60
@ kNIMSDKLogLevelError
SDK Error级别Log
Definition: nim_global_def.h:56
void(* nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:145
void(* nim_json_transport_cb_func)(const char *json_params, const void *user_data)
Definition: nim_global_def.h:29
void(* nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char *log, const void *user_data)
Definition: nim_global_def.h:86
NIMDBOperation
Definition: nim_global_def.h:148
@ kNIMDBOperationInsert
写操作
Definition: nim_global_def.h:150
@ kNIMDBOperationDelete
删除操作
Definition: nim_global_def.h:156
@ kNIMDBOperationUpdate
更新操作
Definition: nim_global_def.h:154
@ kNIMDBOperationRead
读操作
Definition: nim_global_def.h:152
static const char * kNIMCacheFileCount
int,文件数量
Definition: nim_global_def.h:94
void(* nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:137
static const char * kNIMDBErrCode
错误码
Definition: nim_global_def.h:166
static const char * kNIMDBErrDBName
出错DB的名称
Definition: nim_global_def.h:162
static const char * kNIMCacheFilePath
string,文件所在文件夹路径
Definition: nim_global_def.h:96
void(* nim_relogin_request_token_cb_func)(char **auth_token, uint32_t *length, const char *json_params, const void *user_data)
Definition: nim_global_def.h:39
void(* nim_global_sdk_db_error_cb_func)(const char *error_info, const void *user_data)
Definition: nim_global_def.h:179
NIM SDK 及 NIM ChatRoom SDK 公用头文件
NIMResCode
Definition: public_defines.h:21