NIM CPP SDK  8.3.5
nim_client_def.h
Go to the documentation of this file.
1 
8 #ifndef NIM_SDK_DLL_EXPORT_HEADERS_NIM_CLIENT_DEF_H_
9 #define NIM_SDK_DLL_EXPORT_HEADERS_NIM_CLIENT_DEF_H_
10 
11 #include "nim_global_def.h"
12 
13 #ifdef __cplusplus
14 extern"C"
15 {
16 #endif
17 
26 typedef void(*nim_client_multiport_push_config_cb_func)(int rescode, const char *content, const char *json_params, const void *user_data);
27 
36 typedef void(*nim_client_dnd_cb_func)(int rescode,const char *content, const char *json_params, const void *user_data);
37 
46 typedef void(*nim_client_get_server_current_time_cb_func)(int rescode, bool calc_local, uint64_t time, const void *user_data);
47 
51 static const char *kNIMMultiportPushConfigContentKeyOpen = "switch_open"; //多端推送设置/同步 内容Json key
53 
58 static const char *kNIMDndShowDetail = "show_detail";
59 static const char *kNIMDndOpened = "switch_open";
60 static const char *kNIMDndFromH = "fromh";
61 static const char *kNIMDndFromM = "fromm";
62 static const char *kNIMDndToH = "toh";
63 static const char *kNIMDndToM = "tom"; //免打扰设置 内容Json key
65 
68 {
71 };
72 
77 };
78 
81 {
86 };
87 
90 {
94 };
95 
98 {
106 };
107 
110 {
115 };
116 
119 {
122 };
123 
132 static const char *kNIMAppKey = "app_key";
133 static const char *kNIMGlobalConfig = "global_config";
134 static const char *kNIMDataBaseEncryptKey = "db_encrypt_key";
135 static const char *kNIMPreloadAttach = "preload_attach";
136 static const char *kNIMPreloadImageQuality = "preload_image_quality";
137 static const char *kNIMPreloadImageResize = "preload_image_resize";
138 static const char *kNIMPreloadAttachImageNameTemplate = "preload_image_name_template";
139 static const char *kNIMSDKLogLevel = "sdk_log_level";
140 static const char *kNIMPushCerName = "push_cer_name";
141 static const char *kNIMPushToken = "push_token";
142 static const char *kNIMSyncSessionAck = "sync_session_ack";
143 static const char *kNIMLoginRetryMaxTimes = "login_retry_max_times";
144 static const char *kNIMUseHttps = "use_https";
145 static const char *kNIMTeamNotificationUnreadCount = "team_notification_unread_count";
146 static const char *kNIMVChatMissUnreadCount = "vchat_miss_unread_count";
147 static const char *kNIMResetUnreadCountWhenRecall = "reset_unread_count_when_recall";
148 static const char *kNIMUploadSDKEventsAfterLogin = "upload_sdk_events_after_login";
149 static const char *kNIMAnimatedImageThumbnailEnabled = "animated_image_thumbnail_enabled";
150 static const char *kNIMClientAntispam = "client_antispam";
151 static const char *kNIMTeamMessageAckEnabled = "team_msg_ack";
152 static const char *kNIMNeedUpdateLBSBeforRelogin = "need_update_lbs_befor_relogin";
153 static const char *kNIMCustomClientType = "custom_client_type";
154 static const char *kNIMServerConfFilePath = "server_conf_file_path";
155 static const char *kNIMPrivateServerSetting = "private_server_setting";
156 static const char *kNIMPrivateEnableHttps = "https_enabled";
157 static const char *kNIMLbsAddress = "lbs";
158 static const char* kNIMLbsBackupAddress = "lbs.backup";
159 static const char *kNIMNosLbsAddress = "nos_lbs";
160 static const char *kNIMDefaultLinkAddress = "link";
161 static const char *kNIMDefaultLinkAddressIPV6 = "link_ipv6";
162 static const char *kNIMDefaultNosUploadAddress = "nos_uploader";
163 static const char *kNIMDefaultNosUploadHost = "nos_uploader_host";
164 static const char *kNIMRsaPublicKeyModule = "module";
165 static const char *kNIMRsaVersion = "version";
166 static const char *kNIMDownloadAddressTemplate = "nos_downloader";
167 static const char *kNIMAccelerateHost = "nos_accelerate_host";
168 static const char* kMINAccelerateHostList = "nos_accelerate_host_list";
169 static const char *kNIMAccelerateAddressTemplate = "nos_accelerate";
170 //static const char* kNIMMarkreadAfterSaveDBEnabled = "enable_markread_after_save_db_";/**< bool, 是否开启消保存在本地DB以后再向服务端发送"已接收回执" 缺省 false 关闭*/
171 static const char *kNIMCachingMarkreadEnabled = "caching_markread_enabled";
172 static const char *kNIMCachingMarkreadTime = "caching_markread_time";
173 static const char *kNIMCachingMarkreadCount = "caching_markread_count";
174 static const char *kNIMUserDataFileLocalBackupFolder = "user_datafile_localbackup_folder";
175 static const char *kNIMEnableUserDataFileLocalBackup = "enable_user_datafile_backup";
176 static const char *kNIMEnableUserDataFileLocalRestore = "enable_user_datafile_restore";
177 static const char *kNIMEnableUserDataFileDefRestoreProc = "enable_user_datafile_defrestoreproc";
178 static const char *kNIMDedicatedClusteFlag = "dedicated_cluste_flag";
179 static const char* kNIMHandShakeType = "hand_shake_type";
180 static const char *kNIMNegoKeyNECA = "nego_key_neca";
181 static const char *kNIMNegoKeyNECAKeyPA = "nego_key_enca_key_parta";
182 static const char *kNIMNegoKeyNECAKeyPB = "nego_key_enca_key_partb";
183 static const char *kNIMNegoKeyNECAKeyV = "nego_key_enca_key_version";
184 static const char *kNIMCommNECA = "comm_enca";
186 static const char *kNIMIPProtVersion = "ip_protocol_version";
187 static const char *kNIMProbeIPV4URL = "probe_ipv4_url";
188 static const char *kNIMProbeIPV6URL = "probe_ipv6_url";
190 static const char *kNIMSyncDataTypeConfig = "sync_data_type_config";
191 static const char *kNIMSyncDataTypeConfigKey = "key";
192 static const char *kNIMSyncDataTypeConfigValue = "value";
194 static const char* kNIMHttpDNSServerInterface = "httpdns_server_interface";
196 static const char* kNIMPriorityUseCdnHost = "priority_use_cdn_host"; //json extension params for nim_client_init API
199 
207 static const char *kNIMKickoutOtherDeviceIDs = "device_ids"; //json extension params for nim_client_kick_other_client API
209 
217 static const char *kNIMErrorCode = "err_code";
218 static const char *kNIMRelogin = "relogin";
219 static const char *kNIMLoginStep = "login_step";
220 static const char *kNIMRetrying = "retrying";
221 static const char *kNIMOtherClientsPres = "other_clients_pres";
223 static const char *kNIMPresAppAccount = "app_account";
224 static const char *kNIMPresClientType = "client_type";
225 static const char *kNIMPresOS = "client_os";
226 static const char *kNIMPresMac = "mac";
227 static const char *kNIMPresDeviceID = "device_id";
228 static const char *kNIMPresLoginTime = "login_time";
229 static const char *kNIMPresCustomTag = "custom_tag";
230 static const char* kNIMPresAuthType = "auth_type";
231 static const char* kNIMPresLoginExData = "login_ex";
232 static const char *kNIMPresCustomClientType = "custom_client_type"; //json params for nim_json_transport_cb_func that has been registered in nim_client_login and nim_client_reg_auto_relogin_cb API
235 
243 static const char *kNIMMultiSpotNotifyType = "multi_spot_notiy_type"; //json params for nim_json_transport_cb_func that has been registered in nim_client_reg_multispot_login_notify_cb API
245 
252 static const char *kNIMLogoutErrorCode = "err_code"/*kNIMResCode*/; //json params for nim_json_transport_cb_func that has been registered in nim_client_logout API
254 
262 static const char *kNIMKickoutClientType = "client_type";
263 static const char *kNIMKickoutReasonCode = "reason_code";
264 static const char* kNIMKickoutReasonDescription = "reason_description";
265 static const char* kNIMKickoutReasonCustomClientType = "custom_client_type"; //json params for nim_json_transport_cb_func that has been registered in nim_client_reg_kickout_cb API
267 
275 static const char *kNIMKickoutOtherResErrorCode = "err_code"/*kNIMResCode*/;
276 static const char *kNIMKickoutOtherResDeviceIDs = "device_ids"; //json params for nim_json_transport_cb_func that has been registered in nim_client_reg_kickout_other_client_cb API
278 #ifdef __cplusplus
279 };
280 #endif //__cplusplus
281 #endif //NIM_SDK_DLL_EXPORT_HEADERS_NIM_CLIENT_DEF_H_
kNIMLogoutKickout
@ kNIMLogoutKickout
Definition: nim_client_def.h:83
kNIMPresLoginTime
static const char * kNIMPresLoginTime
Definition: nim_client_def.h:228
kNIMAuthTypeByAppToken
@ kNIMAuthTypeByAppToken
Definition: nim_client_def.h:76
kNIMDataBaseEncryptKey
static const char * kNIMDataBaseEncryptKey
Definition: nim_client_def.h:134
kNIMServerConfFilePath
static const char * kNIMServerConfFilePath
Definition: nim_client_def.h:154
kNIMProbeIPV6URL
static const char * kNIMProbeIPV6URL
Definition: nim_client_def.h:188
kNIMPresAppAccount
static const char * kNIMPresAppAccount
Definition: nim_client_def.h:223
kNIMAccelerateHost
static const char * kNIMAccelerateHost
Definition: nim_client_def.h:167
kNIMLoginStepLogin
@ kNIMLoginStepLogin
Definition: nim_client_def.h:114
kNIMKickoutReasonCode
static const char * kNIMKickoutReasonCode
Definition: nim_client_def.h:263
kNIMKickoutOtherResDeviceIDs
static const char * kNIMKickoutOtherResDeviceIDs
Definition: nim_client_def.h:276
kNIMProbeIPV4URL
static const char * kNIMProbeIPV4URL
Definition: nim_client_def.h:187
kNIMNegoKeyNECAKeyV
static const char * kNIMNegoKeyNECAKeyV
Definition: nim_client_def.h:183
kNIMClientAntispam
static const char * kNIMClientAntispam
Definition: nim_client_def.h:150
kNIMKickReasonServerKick
@ kNIMKickReasonServerKick
Definition: nim_client_def.h:92
kNIMOtherClientsPres
static const char * kNIMOtherClientsPres
Definition: nim_client_def.h:221
NIMLoginStep
NIMLoginStep
Definition: nim_client_def.h:109
kNIMDndFromH
static const char * kNIMDndFromH
Definition: nim_client_def.h:60
kNIMCachingMarkreadEnabled
static const char * kNIMCachingMarkreadEnabled
Definition: nim_client_def.h:171
kNIMSyncDataTypeConfigKey
static const char * kNIMSyncDataTypeConfigKey
Definition: nim_client_def.h:191
kNIMLoginStateUnLogin
@ kNIMLoginStateUnLogin
Definition: nim_client_def.h:70
kNIMDndShowDetail
static const char * kNIMDndShowDetail
Definition: nim_client_def.h:58
kNIMKickoutOtherDeviceIDs
static const char * kNIMKickoutOtherDeviceIDs
Definition: nim_client_def.h:207
kNIMCachingMarkreadCount
static const char * kNIMCachingMarkreadCount
Definition: nim_client_def.h:173
kNIMDownloadAddressTemplate
static const char * kNIMDownloadAddressTemplate
Definition: nim_client_def.h:166
kNIMDefaultNosUploadHost
static const char * kNIMDefaultNosUploadHost
Definition: nim_client_def.h:163
kNIMClientTypeMacOS
@ kNIMClientTypeMacOS
Definition: nim_client_def.h:105
NIMLoginState
NIMLoginState
Definition: nim_client_def.h:67
kNIMCommNECA
static const char * kNIMCommNECA
Definition: nim_client_def.h:184
NIMClientType
NIMClientType
Definition: nim_client_def.h:97
kNIMPresOS
static const char * kNIMPresOS
Definition: nim_client_def.h:225
kNIMKickReasonSameGeneric
@ kNIMKickReasonSameGeneric
Definition: nim_client_def.h:91
kNIMClientTypeDefault
@ kNIMClientTypeDefault
Definition: nim_client_def.h:99
kNIMPriorityUseCdnHost
static const char * kNIMPriorityUseCdnHost
Definition: nim_client_def.h:196
kNIMAccelerateAddressTemplate
static const char * kNIMAccelerateAddressTemplate
Definition: nim_client_def.h:169
kNIMPreloadAttach
static const char * kNIMPreloadAttach
Definition: nim_client_def.h:135
kNIMLogoutChangeAccout
@ kNIMLogoutChangeAccout
Definition: nim_client_def.h:82
kNIMAnimatedImageThumbnailEnabled
static const char * kNIMAnimatedImageThumbnailEnabled
Definition: nim_client_def.h:149
kNIMUseHttps
static const char * kNIMUseHttps
Definition: nim_client_def.h:144
kNIMLoginStateLogin
@ kNIMLoginStateLogin
Definition: nim_client_def.h:69
kNIMLogoutErrorCode
static const char * kNIMLogoutErrorCode
Definition: nim_client_def.h:252
kNIMEnableUserDataFileLocalBackup
static const char * kNIMEnableUserDataFileLocalBackup
Definition: nim_client_def.h:175
kNIMDndToM
static const char * kNIMDndToM
Definition: nim_client_def.h:63
kNIMLoginRetryMaxTimes
static const char * kNIMLoginRetryMaxTimes
Definition: nim_client_def.h:143
kNIMTeamMessageAckEnabled
static const char * kNIMTeamMessageAckEnabled
Definition: nim_client_def.h:151
NIMKickReason
NIMKickReason
Definition: nim_client_def.h:89
kNIMHttpDNSServerInterface
static const char * kNIMHttpDNSServerInterface
Definition: nim_client_def.h:194
kNIMLogoutAppExit
@ kNIMLogoutAppExit
Definition: nim_client_def.h:84
kNIMLoginStepLink
@ kNIMLoginStepLink
Definition: nim_client_def.h:112
kNIMDndOpened
static const char * kNIMDndOpened
Definition: nim_client_def.h:59
kNIMPresLoginExData
static const char * kNIMPresLoginExData
Definition: nim_client_def.h:231
kNIMClientTypeAndroid
@ kNIMClientTypeAndroid
Definition: nim_client_def.h:100
kNIMRelogin
static const char * kNIMRelogin
Definition: nim_client_def.h:218
kNIMNegoKeyNECA
static const char * kNIMNegoKeyNECA
Definition: nim_client_def.h:180
kNIMAuthTypeDefault
@ kNIMAuthTypeDefault
Definition: nim_client_def.h:74
kNIMPreloadAttachImageNameTemplate
static const char * kNIMPreloadAttachImageNameTemplate
Definition: nim_client_def.h:138
kNIMPresCustomClientType
static const char * kNIMPresCustomClientType
Definition: nim_client_def.h:232
kNIMClientTypeWeb
@ kNIMClientTypeWeb
Definition: nim_client_def.h:103
kNIMPushCerName
static const char * kNIMPushCerName
Definition: nim_client_def.h:140
kNIMUserDataFileLocalBackupFolder
static const char * kNIMUserDataFileLocalBackupFolder
Definition: nim_client_def.h:174
kNIMPresClientType
static const char * kNIMPresClientType
Definition: nim_client_def.h:224
kNIMCachingMarkreadTime
static const char * kNIMCachingMarkreadTime
Definition: nim_client_def.h:172
kMINAccelerateHostList
static const char * kMINAccelerateHostList
Definition: nim_client_def.h:168
kNIMSyncDataTypeConfigValue
static const char * kNIMSyncDataTypeConfigValue
Definition: nim_client_def.h:192
kNIMPresCustomTag
static const char * kNIMPresCustomTag
Definition: nim_client_def.h:229
kNIMLoginStepLinking
@ kNIMLoginStepLinking
Definition: nim_client_def.h:111
kNIMAppKey
static const char * kNIMAppKey
Definition: nim_client_def.h:132
kNIMClientTypePCWindows
@ kNIMClientTypePCWindows
Definition: nim_client_def.h:102
kNIMAuthTypeBySecretToken
@ kNIMAuthTypeBySecretToken
Definition: nim_client_def.h:75
kNIMDefaultLinkAddressIPV6
static const char * kNIMDefaultLinkAddressIPV6
Definition: nim_client_def.h:161
kNIMRetrying
static const char * kNIMRetrying
Definition: nim_client_def.h:220
kNIMRsaVersion
static const char * kNIMRsaVersion
Definition: nim_client_def.h:165
kNIMPrivateServerSetting
static const char * kNIMPrivateServerSetting
Definition: nim_client_def.h:155
kNIMLoginStep
static const char * kNIMLoginStep
Definition: nim_client_def.h:219
kNIMHandShakeType
static const char * kNIMHandShakeType
Definition: nim_client_def.h:179
nim_global_def.h
辅助能力 接口相关的常量函数等定义头文件
kNIMClientTypeRestAPI
@ kNIMClientTypeRestAPI
Definition: nim_client_def.h:104
kNIMLbsAddress
static const char * kNIMLbsAddress
Definition: nim_client_def.h:157
kNIMPreloadImageQuality
static const char * kNIMPreloadImageQuality
Definition: nim_client_def.h:136
kNIMDndToH
static const char * kNIMDndToH
Definition: nim_client_def.h:62
NIMAuthType
NIMAuthType
Definition: nim_client_def.h:73
kNIMNeedUpdateLBSBeforRelogin
static const char * kNIMNeedUpdateLBSBeforRelogin
Definition: nim_client_def.h:152
kNIMPresMac
static const char * kNIMPresMac
Definition: nim_client_def.h:226
kNIMKickoutReasonDescription
static const char * kNIMKickoutReasonDescription
Definition: nim_client_def.h:264
kNIMVChatMissUnreadCount
static const char * kNIMVChatMissUnreadCount
Definition: nim_client_def.h:146
NIMLogoutType
NIMLogoutType
Definition: nim_client_def.h:80
kNIMLoginStepLogining
@ kNIMLoginStepLogining
Definition: nim_client_def.h:113
kNIMMultiSpotNotifyTypeImOut
@ kNIMMultiSpotNotifyTypeImOut
Definition: nim_client_def.h:121
kNIMEnableUserDataFileLocalRestore
static const char * kNIMEnableUserDataFileLocalRestore
Definition: nim_client_def.h:176
nim_client_dnd_cb_func
void(* nim_client_dnd_cb_func)(int rescode, const char *content, const char *json_params, const void *user_data)
Definition: nim_client_def.h:36
kNIMDefaultLinkAddress
static const char * kNIMDefaultLinkAddress
Definition: nim_client_def.h:160
kNIMLbsBackupAddress
static const char * kNIMLbsBackupAddress
Definition: nim_client_def.h:158
kNIMErrorCode
static const char * kNIMErrorCode
Definition: nim_client_def.h:217
nim_client_multiport_push_config_cb_func
void(* nim_client_multiport_push_config_cb_func)(int rescode, const char *content, const char *json_params, const void *user_data)
Definition: nim_client_def.h:26
kNIMUploadSDKEventsAfterLogin
static const char * kNIMUploadSDKEventsAfterLogin
Definition: nim_client_def.h:148
kNIMCustomClientType
static const char * kNIMCustomClientType
Definition: nim_client_def.h:153
kNIMNosLbsAddress
static const char * kNIMNosLbsAddress
Definition: nim_client_def.h:159
kNIMMultiSpotNotifyType
static const char * kNIMMultiSpotNotifyType
Definition: nim_client_def.h:243
kNIMEnableUserDataFileDefRestoreProc
static const char * kNIMEnableUserDataFileDefRestoreProc
Definition: nim_client_def.h:177
kNIMDefaultNosUploadAddress
static const char * kNIMDefaultNosUploadAddress
Definition: nim_client_def.h:162
NIMMultiSpotNotifyType
NIMMultiSpotNotifyType
Definition: nim_client_def.h:118
kNIMSyncSessionAck
static const char * kNIMSyncSessionAck
Definition: nim_client_def.h:142
kNIMKickReasonKickBySelfOtherClient
@ kNIMKickReasonKickBySelfOtherClient
Definition: nim_client_def.h:93
kNIMRsaPublicKeyModule
static const char * kNIMRsaPublicKeyModule
Definition: nim_client_def.h:164
kNIMMultiportPushConfigContentKeyOpen
static const char * kNIMMultiportPushConfigContentKeyOpen
Definition: nim_client_def.h:51
kNIMIPProtVersion
static const char * kNIMIPProtVersion
Definition: nim_client_def.h:186
kNIMPresDeviceID
static const char * kNIMPresDeviceID
Definition: nim_client_def.h:227
kNIMKickoutReasonCustomClientType
static const char * kNIMKickoutReasonCustomClientType
Definition: nim_client_def.h:265
kNIMDedicatedClusteFlag
static const char * kNIMDedicatedClusteFlag
Definition: nim_client_def.h:178
kNIMPrivateEnableHttps
static const char * kNIMPrivateEnableHttps
Definition: nim_client_def.h:156
kNIMTeamNotificationUnreadCount
static const char * kNIMTeamNotificationUnreadCount
Definition: nim_client_def.h:145
kNIMNegoKeyNECAKeyPB
static const char * kNIMNegoKeyNECAKeyPB
Definition: nim_client_def.h:182
kNIMClientTypeiOS
@ kNIMClientTypeiOS
Definition: nim_client_def.h:101
kNIMSDKLogLevel
static const char * kNIMSDKLogLevel
Definition: nim_client_def.h:139
kNIMPushToken
static const char * kNIMPushToken
Definition: nim_client_def.h:141
kNIMResetUnreadCountWhenRecall
static const char * kNIMResetUnreadCountWhenRecall
Definition: nim_client_def.h:147
kNIMSyncDataTypeConfig
static const char * kNIMSyncDataTypeConfig
Definition: nim_client_def.h:190
kNIMKickoutOtherResErrorCode
static const char * kNIMKickoutOtherResErrorCode
Definition: nim_client_def.h:275
kNIMPresAuthType
static const char * kNIMPresAuthType
Definition: nim_client_def.h:230
nim_client_get_server_current_time_cb_func
void(* nim_client_get_server_current_time_cb_func)(int rescode, bool calc_local, uint64_t time, const void *user_data)
Definition: nim_client_def.h:46
kNIMKickoutClientType
static const char * kNIMKickoutClientType
Definition: nim_client_def.h:262
kNIMGlobalConfig
static const char * kNIMGlobalConfig
Definition: nim_client_def.h:133
kNIMNegoKeyNECAKeyPA
static const char * kNIMNegoKeyNECAKeyPA
Definition: nim_client_def.h:181
kNIMLogoutRelogin
@ kNIMLogoutRelogin
Definition: nim_client_def.h:85
kNIMMultiSpotNotifyTypeImIn
@ kNIMMultiSpotNotifyTypeImIn
Definition: nim_client_def.h:120
kNIMDndFromM
static const char * kNIMDndFromM
Definition: nim_client_def.h:61
kNIMPreloadImageResize
static const char * kNIMPreloadImageResize
Definition: nim_client_def.h:137