NIM CPP SDK  8.3.5
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 "public_define/nim_util_include.h"
12 #include "public_define/defines/nim_define/nim_res_code_def.h"
13 
14 #ifdef __cplusplus
15 extern"C"
16 {
17 #endif
18 
21 static const char *kNIMResCode = "err_code"; //json params for NIMResCode, see nim_res_code_def.h
23 
30 typedef void (*nim_json_transport_cb_func)(const char *json_params, const void *user_data);
31 
40 typedef void(*nim_relogin_request_token_cb_func)(char *&auth_token, uint32_t *length, const char *json_params, const void *user_data);
41 
44 {
50 };
51 
59 typedef void(*nim_sdk_log_cb_func)(int log_level, const char *log, const void *user_data);
60 
63 {
65 };
73 typedef void(*nim_sdk_exception_cb_func)(enum NIMSDKException exception, const char *log, const void *user_data);
74 
78 static const char *kNIMCacheFileType = "file_type";
79 static const char *kNIMCacheFileCount = "file_count";
80 static const char *kNIMCacheFilePath = "file_path";
81 static const char *kNIMCacheFileTotalSize = "total_size"; //查询SDK文件缓存信息回调info结构定义
83 
87 static const char *kNIMCacheFileOther = "res";
88 static const char *kNIMCacheFileImage = "image";
89 static const char *kNIMCacheFileAudio = "audio";
90 static const char *kNIMCacheFileVideo = "video"; //查询SDK文件缓存信息文件类型file_type
92 
99 typedef void(*nim_sdk_get_cache_file_info_cb_func)(const char *info, const void *user_data);
100 
107 typedef void(*nim_sdk_del_cache_file_cb_func)(enum NIMResCode rescode, const void *user_data);
108 
115 typedef void(*nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void *user_data);
116 
119 {
124 };
128 static const char *kNIMDBErrDBName = "db_name";
129 static const char *kNIMDBERROperation = "operation";
130 static const char *kNIMDBErrCode = "error_code";
131 static const char *kNIMDBErrDescription_= "error_description";
132 static const char *kNIMDBErrAttach = "error_attach"; //SDK DB操作出错时的反馈回调数据 error_info
134 
141 typedef void(*nim_global_sdk_db_error_cb_func)(const char *error_info, const void *user_data);
142 
149 typedef void(*nim_global_upload_sdk_log_cb_func)(int rescode, const void *user_data);
150 
153 {
155 };
158 {
165 };
174 typedef void(*nim_global_detect_proxy_cb_func)(bool network_connect, enum NIMProxyDetectStep step, const char *json_params, const void *user_data);
175 
176 #ifdef __cplusplus
177 };
178 #endif //__cplusplus
179 #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:99
kNIMProxySocks4a
@ kNIMProxySocks4a
Definition: nim_global_def.h:162
kNIMCacheFileVideo
static const char * kNIMCacheFileVideo
Definition: nim_global_def.h:90
kNIMDBERROperation
static const char * kNIMDBERROperation
Definition: nim_global_def.h:129
kNIMDBOperationInsert
@ kNIMDBOperationInsert
Definition: nim_global_def.h:120
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:59
nim_json_transport_cb_func
void(* nim_json_transport_cb_func)(const char *json_params, const void *user_data)
Definition: nim_global_def.h:30
kNIMCacheFileCount
static const char * kNIMCacheFileCount
Definition: nim_global_def.h:79
kNIMDBErrDBName
static const char * kNIMDBErrDBName
Definition: nim_global_def.h:128
kNIMSDKLogLevelPro
@ kNIMSDKLogLevelPro
Definition: nim_global_def.h:49
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:73
kNIMProxySocks5
@ kNIMProxySocks5
Definition: nim_global_def.h:163
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:141
kNIMResCode
static const char * kNIMResCode
Definition: nim_global_def.h:21
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:107
kNIMDBErrCode
static const char * kNIMDBErrCode
Definition: nim_global_def.h:130
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:174
kNIMProxyDetectStepAllComplete
@ kNIMProxyDetectStepAllComplete
Definition: nim_global_def.h:154
kNIMProxyHttp11
@ kNIMProxyHttp11
Definition: nim_global_def.h:160
kNIMSDKLogLevelWarn
@ kNIMSDKLogLevelWarn
Definition: nim_global_def.h:47
NIMSDKException
NIMSDKException
Definition: nim_global_def.h:62
kNIMDBErrDescription_
static const char * kNIMDBErrDescription_
Definition: nim_global_def.h:131
kNIMProxyNrtc
@ kNIMProxyNrtc
Definition: nim_global_def.h:164
kNIMCacheFileImage
static const char * kNIMCacheFileImage
Definition: nim_global_def.h:88
nim_sdk_feedback_cb_func
void(* nim_sdk_feedback_cb_func)(enum NIMResCode rescode, const void *user_data)
Definition: nim_global_def.h:115
kNIMCacheFileAudio
static const char * kNIMCacheFileAudio
Definition: nim_global_def.h:89
kNIMDBOperationDelete
@ kNIMDBOperationDelete
Definition: nim_global_def.h:123
kNIMCacheFileType
static const char * kNIMCacheFileType
Definition: nim_global_def.h:78
NIMResCode
NIMResCode
Definition: nim_res_code_def.h:16
kNIMDBOperationUpdate
@ kNIMDBOperationUpdate
Definition: nim_global_def.h:122
NIMDBOperation
NIMDBOperation
Definition: nim_global_def.h:118
kNIMCacheFileOther
static const char * kNIMCacheFileOther
Definition: nim_global_def.h:87
kNIMDBErrAttach
static const char * kNIMDBErrAttach
Definition: nim_global_def.h:132
kNIMSDKLogLevelApp
@ kNIMSDKLogLevelApp
Definition: nim_global_def.h:48
kNIMDBOperationRead
@ kNIMDBOperationRead
Definition: nim_global_def.h:121
nim_global_upload_sdk_log_cb_func
void(* nim_global_upload_sdk_log_cb_func)(int rescode, const void *user_data)
Definition: nim_global_def.h:149
kNIMProxyNone
@ kNIMProxyNone
Definition: nim_global_def.h:159
kNIMProxySocks4
@ kNIMProxySocks4
Definition: nim_global_def.h:161
NIMSDKLogLevel
NIMSDKLogLevel
Definition: nim_global_def.h:43
NIMProxyDetectStep
NIMProxyDetectStep
Definition: nim_global_def.h:152
kNIMSDKExceptionSpaceEmpty
@ kNIMSDKExceptionSpaceEmpty
Definition: nim_global_def.h:64
kNIMCacheFileTotalSize
static const char * kNIMCacheFileTotalSize
Definition: nim_global_def.h:81
nim_relogin_request_token_cb_func
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
kNIMSDKLogLevelFatal
@ kNIMSDKLogLevelFatal
Definition: nim_global_def.h:45
kNIMSDKLogLevelError
@ kNIMSDKLogLevelError
Definition: nim_global_def.h:46
kNIMCacheFilePath
static const char * kNIMCacheFilePath
Definition: nim_global_def.h:80
NIMProxyType
NIMProxyType
Definition: nim_global_def.h:157