NIM SDK API  8.5.0
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
15 extern "C" {
16 #endif
17 
20 static const char* kNIMResCode = "err_code"; // json params for NIMResCode, see nim_res_code_def.h
22 
29 typedef void (*nim_json_transport_cb_func)(const char* json_params, const void* user_data);
30 
39 typedef void (*nim_relogin_request_token_cb_func)(char*& auth_token, uint32_t* length, const char* json_params, const void* user_data);
40 
48 };
49 
57 typedef void (*nim_sdk_log_cb_func)(int log_level, const char* log, const void* user_data);
58 
62 };
70 typedef void (*nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char* log, const void* user_data);
71 
75 static const char* kNIMCacheFileType = "file_type";
76 static const char* kNIMCacheFileCount = "file_count";
77 static const char* kNIMCacheFilePath = "file_path";
78 static const char* kNIMCacheFileTotalSize = "total_size"; // 查询SDK文件缓存信息回调info结构定义
80 
84 static const char* kNIMCacheFileOther = "res";
85 static const char* kNIMCacheFileImage = "image";
86 static const char* kNIMCacheFileAudio = "audio";
87 static const char* kNIMCacheFileVideo = "video"; // 查询SDK文件缓存信息文件类型file_type
89 
96 typedef void (*nim_sdk_get_cache_file_info_cb_func)(const char* info, const void* user_data);
97 
104 typedef void (*nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void* user_data);
105 
112 typedef void (*nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void* user_data);
113 
120 };
124 static const char* kNIMDBErrDBName = "db_name";
125 static const char* kNIMDBERROperation = "operation";
126 static const char* kNIMDBErrCode = "error_code";
127 static const char* kNIMDBErrDescription_ = "error_description";
128 static const char* kNIMDBErrAttach = "error_attach"; // SDK DB操作出错时的反馈回调数据 error_info
130 
137 typedef void (*nim_global_sdk_db_error_cb_func)(const char* error_info, const void* user_data);
138 
145 typedef void (*nim_global_upload_sdk_log_cb_func)(int rescode, const void* user_data);
146 
150 };
159 };
168 typedef void (*nim_global_detect_proxy_cb_func)(bool network_connect, enum NIMProxyDetectStep step, const char* json_params, const void* user_data);
169 
170 #ifdef __cplusplus
171 };
172 #endif //__cplusplus
173 #endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_GLOBAL_DEF_H_
nim_sdk_get_cache_file_info_cb_func
void(* nim_sdk_get_cache_file_info_cb_func)(const char *info, const void *user_data)
Definition: nim_global_def.h:96
kNIMProxySocks4a
@ kNIMProxySocks4a
Definition: nim_global_def.h:156
kNIMCacheFileVideo
static const char * kNIMCacheFileVideo
Definition: nim_global_def.h:87
kNIMDBERROperation
static const char * kNIMDBERROperation
Definition: nim_global_def.h:125
kNIMDBOperationInsert
@ kNIMDBOperationInsert
Definition: nim_global_def.h:116
nim_sdk_log_cb_func
void(* nim_sdk_log_cb_func)(int log_level, const char *log, const void *user_data)
Definition: nim_global_def.h:57
nim_json_transport_cb_func
void(* nim_json_transport_cb_func)(const char *json_params, const void *user_data)
Definition: nim_global_def.h:29
kNIMCacheFileCount
static const char * kNIMCacheFileCount
Definition: nim_global_def.h:76
kNIMDBErrDBName
static const char * kNIMDBErrDBName
Definition: nim_global_def.h:124
kNIMSDKLogLevelPro
@ kNIMSDKLogLevelPro
Definition: nim_global_def.h:47
nim_sdk_exception_cb_func
void(* nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char *log, const void *user_data)
Definition: nim_global_def.h:70
kNIMProxySocks5
@ kNIMProxySocks5
Definition: nim_global_def.h:157
nim_global_sdk_db_error_cb_func
void(* nim_global_sdk_db_error_cb_func)(const char *error_info, const void *user_data)
Definition: nim_global_def.h:137
kNIMResCode
static const char * kNIMResCode
Definition: nim_global_def.h:20
nim_sdk_del_cache_file_cb_func
void(* nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:104
kNIMDBErrCode
static const char * kNIMDBErrCode
Definition: nim_global_def.h:126
nim_global_detect_proxy_cb_func
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:168
NIMSDKLogLevel
NIMSDKLogLevel
Definition: nim_chatroom_def.h:411
kNIMProxyDetectStepAllComplete
@ kNIMProxyDetectStepAllComplete
Definition: nim_global_def.h:149
kNIMProxyHttp11
@ kNIMProxyHttp11
Definition: nim_global_def.h:154
kNIMSDKLogLevelWarn
@ kNIMSDKLogLevelWarn
Definition: nim_global_def.h:45
NIMSDKException
NIMSDKException
Definition: nim_global_def.h:60
kNIMDBErrDescription_
static const char * kNIMDBErrDescription_
Definition: nim_global_def.h:127
kNIMProxyNrtc
@ kNIMProxyNrtc
Definition: nim_global_def.h:158
public_defines.h
NIM SDK 及 NIM ChatRoom SDK 公用头文件
kNIMCacheFileImage
static const char * kNIMCacheFileImage
Definition: nim_global_def.h:85
nim_sdk_feedback_cb_func
void(* nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:112
kNIMCacheFileAudio
static const char * kNIMCacheFileAudio
Definition: nim_global_def.h:86
kNIMDBOperationDelete
@ kNIMDBOperationDelete
Definition: nim_global_def.h:119
kNIMCacheFileType
static const char * kNIMCacheFileType
Definition: nim_global_def.h:75
kNIMDBOperationUpdate
@ kNIMDBOperationUpdate
Definition: nim_global_def.h:118
NIMDBOperation
NIMDBOperation
Definition: nim_global_def.h:115
kNIMCacheFileOther
static const char * kNIMCacheFileOther
Definition: nim_global_def.h:84
kNIMDBErrAttach
static const char * kNIMDBErrAttach
Definition: nim_global_def.h:128
kNIMSDKLogLevelApp
@ kNIMSDKLogLevelApp
Definition: nim_global_def.h:46
kNIMDBOperationRead
@ kNIMDBOperationRead
Definition: nim_global_def.h:117
kNIMProxyNone
@ kNIMProxyNone
Definition: nim_global_def.h:153
kNIMProxySocks4
@ kNIMProxySocks4
Definition: nim_global_def.h:155
NIMProxyDetectStep
NIMProxyDetectStep
Definition: nim_global_def.h:148
kNIMSDKExceptionSpaceEmpty
@ kNIMSDKExceptionSpaceEmpty
Definition: nim_global_def.h:61
kNIMCacheFileTotalSize
static const char * kNIMCacheFileTotalSize
Definition: nim_global_def.h:78
kNIMSDKLogLevelFatal
@ kNIMSDKLogLevelFatal
Definition: nim_global_def.h:43
nim_res_code_def.h
NIM SDK提供给外部使用的错误号定义(包含客户端自定义和服务器返回的所有错误号)
kNIMSDKLogLevelError
@ kNIMSDKLogLevelError
Definition: nim_global_def.h:44
kNIMCacheFilePath
static const char * kNIMCacheFilePath
Definition: nim_global_def.h:77
NIMProxyType
NIMProxyType
Definition: nim_global_def.h:152