NIM PC Cross Platform SDK
nim_global_def.h
Go to the documentation of this file.
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 "nim_res_code_def.h"
12#include "public_defines.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
21static const char* kNIMResCode = "err_code"; // json params for NIMResCode, see nim_res_code_def.h
23
30typedef void (*nim_json_transport_cb_func)(const char* json_params, const void* user_data);
31
40typedef void (*nim_relogin_request_token_cb_func)(char*& auth_token, uint32_t* length, const char* json_params, const void* user_data);
41
54};
55
63typedef void (*nim_sdk_log_cb_func)(int log_level, const char* log, const void* user_data);
64
69};
77typedef void (*nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char* log, const void* user_data);
78
83static const char* kNIMCacheFileType = "file_type";
85static const char* kNIMCacheFileCount = "file_count";
87static const char* kNIMCacheFilePath = "file_path";
89static const char* kNIMCacheFileTotalSize = "total_size"; // 查询SDK文件缓存信息回调info结构定义
91
96static const char* kNIMCacheFileOther = "res";
98static const char* kNIMCacheFileImage = "image";
100static const char* kNIMCacheFileAudio = "audio";
102static const char* kNIMCacheFileVideo = "video"; // 查询SDK文件缓存信息文件类型file_type
104
109static const char* kNIMGrayMixStoreEnable = "mixStoreEnable";
111static const char* kNIMGrayTestEnable = "testEnbale";
120typedef void (*nim_sdk_get_cache_file_info_cb_func)(const char* info, const void* user_data);
121
128typedef void (*nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void* user_data);
129
136typedef void (*nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void* user_data);
137
148};
153static const char* kNIMDBErrDBName = "db_name";
155static const char* kNIMDBERROperation = "operation";
157static const char* kNIMDBErrCode = "error_code";
159static const char* kNIMDBErrDescription_ = "error_description";
161static const char* kNIMDBErrAttach = "error_attach"; // SDK DB操作出错时的反馈回调数据 error_info
163
170typedef void (*nim_global_sdk_db_error_cb_func)(const char* error_info, const void* user_data);
171
178typedef void (*nim_global_upload_sdk_log_cb_func)(int rescode, const void* user_data);
179
184};
199};
208typedef void (*nim_global_detect_proxy_cb_func)(bool network_connect, enum NIMProxyDetectStep step, const char* json_params, const void* user_data);
209
210#ifdef __cplusplus
211};
212#endif //__cplusplus
213#endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_GLOBAL_DEF_H_
NIMSDKLogLevel
Definition: nim_chatroom_def.h:507
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
static const char * kNIMCacheFileVideo
视频消息缓存
Definition: nim_global_def.h:102
static const char * kNIMCacheFileImage
图片消息缓存
Definition: nim_global_def.h:98
static const char * kNIMCacheFileOther
杂项文件缓存
Definition: nim_global_def.h:96
NIMProxyType
Definition: nim_global_def.h:186
@ kNIMProxySocks5
Socks5 Proxy.
Definition: nim_global_def.h:196
@ kNIMProxySocks4
Socks4 Proxy.
Definition: nim_global_def.h:192
@ kNIMProxyNone
不使用代理
Definition: nim_global_def.h:188
@ kNIMProxyNrtc
云信音视频私有代理,只在nim_vchat_set_proxy中有效
Definition: nim_global_def.h:198
@ kNIMProxySocks4a
Socks4a Proxy.
Definition: nim_global_def.h:194
@ kNIMProxyHttp11
HTTP 1.1 Proxy(暂不支持)
Definition: nim_global_def.h:190
static const char * kNIMGrayTestEnable
bool, 是否开启测试
Definition: nim_global_def.h:111
static const char * kNIMDBErrDescription_
相应的错误描述
Definition: nim_global_def.h:159
static const char * kNIMCacheFileTotalSize
int64,文件总大小KB
Definition: nim_global_def.h:89
NIMSDKException
Definition: nim_global_def.h:66
@ kNIMSDKExceptionSpaceEmpty
当前数据目录所在盘符空间紧张或用完, log: {"free_space" : lf, "message":""}, free_space单位M
Definition: nim_global_def.h:68
NIMProxyDetectStep
Definition: nim_global_def.h:181
@ kNIMProxyDetectStepAllComplete
探测代理有效性结束
Definition: nim_global_def.h:183
static const char * kNIMCacheFileType
string,文件类型
Definition: nim_global_def.h:83
static const char * kNIMGrayMixStoreEnable
bool, 是否开启融合存储
Definition: nim_global_def.h:109
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:40
void(* nim_sdk_log_cb_func)(int log_level, const char *log, const void *user_data)
Definition: nim_global_def.h:63
static const char * kNIMDBERROperation
出错DB的操作(读、写、更新、删除)
Definition: nim_global_def.h:155
static const char * kNIMDBErrAttach
具体的出错信息
Definition: nim_global_def.h:161
static const char * kNIMCacheFileAudio
语音消息缓存
Definition: nim_global_def.h:100
static const char * kNIMResCode
int, NIMResCode
Definition: nim_global_def.h:21
void(* nim_sdk_get_cache_file_info_cb_func)(const char *info, const void *user_data)
Definition: nim_global_def.h:120
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:208
@ kNIMSDKLogLevelFatal
SDK Fatal级别Log.
Definition: nim_global_def.h:45
@ kNIMSDKLogLevelWarn
SDK Warn级别Log.
Definition: nim_global_def.h:49
@ kNIMSDKLogLevelPro
SDK调试过程级别Log,更加详细,更有利于开发调试
Definition: nim_global_def.h:53
@ kNIMSDKLogLevelApp
SDK应用级别Log,正式发布时为了精简sdk log,可采用此级别
Definition: nim_global_def.h:51
@ kNIMSDKLogLevelError
SDK Error级别Log.
Definition: nim_global_def.h:47
void(* nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:136
void(* nim_json_transport_cb_func)(const char *json_params, const void *user_data)
Definition: nim_global_def.h:30
void(* nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char *log, const void *user_data)
Definition: nim_global_def.h:77
NIMDBOperation
Definition: nim_global_def.h:139
@ kNIMDBOperationInsert
写操作
Definition: nim_global_def.h:141
@ kNIMDBOperationDelete
删除操作
Definition: nim_global_def.h:147
@ kNIMDBOperationUpdate
更新操作
Definition: nim_global_def.h:145
@ kNIMDBOperationRead
读操作
Definition: nim_global_def.h:143
static const char * kNIMCacheFileCount
int,文件数量
Definition: nim_global_def.h:85
void(* nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:128
static const char * kNIMDBErrCode
错误码
Definition: nim_global_def.h:157
static const char * kNIMDBErrDBName
出错DB的名称
Definition: nim_global_def.h:153
static const char * kNIMCacheFilePath
string,文件所在文件夹路径
Definition: nim_global_def.h:87
void(* nim_global_sdk_db_error_cb_func)(const char *error_info, const void *user_data)
Definition: nim_global_def.h:170
void(* nim_global_upload_sdk_log_cb_func)(int rescode, const void *user_data)
Definition: nim_global_def.h:178
NIM SDK提供给外部使用的错误号定义(包含客户端自定义和服务器返回的所有错误号)
NIM SDK 及 NIM ChatRoom SDK 公用头文件