NIM SDK API  9.0.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 
93 static const char* kNIMGrayMixStoreEnable = "mixStoreEnable";
94 static const char* kNIMGrayTestEnable = "testEnbale";
103 typedef void (*nim_sdk_get_cache_file_info_cb_func)(const char* info, const void* user_data);
104 
111 typedef void (*nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void* user_data);
112 
119 typedef void (*nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void* user_data);
120 
127 };
131 static const char* kNIMDBErrDBName = "db_name";
132 static const char* kNIMDBERROperation = "operation";
133 static const char* kNIMDBErrCode = "error_code";
134 static const char* kNIMDBErrDescription_ = "error_description";
135 static const char* kNIMDBErrAttach = "error_attach"; // SDK DB操作出错时的反馈回调数据 error_info
137 
144 typedef void (*nim_global_sdk_db_error_cb_func)(const char* error_info, const void* user_data);
145 
152 typedef void (*nim_global_upload_sdk_log_cb_func)(int rescode, const void* user_data);
153 
157 };
166 };
175 typedef void (*nim_global_detect_proxy_cb_func)(bool network_connect, enum NIMProxyDetectStep step, const char* json_params, const void* user_data);
176 
177 #ifdef __cplusplus
178 };
179 #endif //__cplusplus
180 #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:103
kNIMProxySocks4a
@ kNIMProxySocks4a
Definition: nim_global_def.h:163
kNIMCacheFileVideo
static const char * kNIMCacheFileVideo
Definition: nim_global_def.h:87
kNIMDBERROperation
static const char * kNIMDBERROperation
Definition: nim_global_def.h:132
kNIMDBOperationInsert
@ kNIMDBOperationInsert
Definition: nim_global_def.h:123
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:131
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:164
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:144
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:111
kNIMDBErrCode
static const char * kNIMDBErrCode
Definition: nim_global_def.h:133
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:175
NIMSDKLogLevel
NIMSDKLogLevel
Definition: nim_chatroom_def.h:495
kNIMProxyDetectStepAllComplete
@ kNIMProxyDetectStepAllComplete
Definition: nim_global_def.h:156
kNIMProxyHttp11
@ kNIMProxyHttp11
Definition: nim_global_def.h:161
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:134
kNIMProxyNrtc
@ kNIMProxyNrtc
Definition: nim_global_def.h:165
public_defines.h
NIM SDK 及 NIM ChatRoom SDK 公用头文件
NIMProxyType
NIMProxyType
Definition: nim_tools_http_def.h:15
kNIMGrayMixStoreEnable
static const char * kNIMGrayMixStoreEnable
Definition: nim_global_def.h:93
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:119
kNIMCacheFileAudio
static const char * kNIMCacheFileAudio
Definition: nim_global_def.h:86
kNIMDBOperationDelete
@ kNIMDBOperationDelete
Definition: nim_global_def.h:126
kNIMCacheFileType
static const char * kNIMCacheFileType
Definition: nim_global_def.h:75
kNIMDBOperationUpdate
@ kNIMDBOperationUpdate
Definition: nim_global_def.h:125
NIMResCode
NIMResCode
Definition: nim_chatroom_res_code_def.h:15
NIMDBOperation
NIMDBOperation
Definition: nim_global_def.h:122
kNIMGrayTestEnable
static const char * kNIMGrayTestEnable
Definition: nim_global_def.h:94
kNIMCacheFileOther
static const char * kNIMCacheFileOther
Definition: nim_global_def.h:84
kNIMDBErrAttach
static const char * kNIMDBErrAttach
Definition: nim_global_def.h:135
kNIMSDKLogLevelApp
@ kNIMSDKLogLevelApp
Definition: nim_global_def.h:46
kNIMDBOperationRead
@ kNIMDBOperationRead
Definition: nim_global_def.h:124
kNIMProxyNone
@ kNIMProxyNone
Definition: nim_global_def.h:160
kNIMProxySocks4
@ kNIMProxySocks4
Definition: nim_global_def.h:162
NIMProxyDetectStep
NIMProxyDetectStep
Definition: nim_global_def.h:155
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