NIM SDK API  8.5.1
nim_tools_http_def.h
Go to the documentation of this file.
1 
7 #ifndef NIM_TOOLS_HTTP_DEF_H
8 #define NIM_TOOLS_HTTP_DEF_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
22 };
23 
27 typedef void* HttpRequestHandle;
28 #define INVALID_HTTPREQUESTHANDLE (0)
29 
32 typedef unsigned int HttpRequestID;
33 #define INVALID_HTTPREQUESTID (0xFFFFFFFF)
34 
41 typedef void (*nim_http_request_completed_cb)(const void* user_data, bool result, int response_code);
42 
51 typedef void (*nim_http_request_response_cb)(const void* user_data, bool result, int response_code, const char* response_content);
52 
62 typedef void (*nim_http_request_response_ex_cb)(const void* user_data,
63  bool result,
64  int response_code,
65  const char* response_content,
66  const char* response_header);
67 
77 typedef void (*nim_http_request_progress_cb)(const void* user_data,
78  double total_upload_size,
79  double uploaded_size,
80  double total_download_size,
81  double downloaded_size);
82 
92 typedef void (*nim_http_request_transfer_cb)(const void* user_data,
93  double actual_upload_size,
94  double upload_speed,
95  double actual_download_size,
96  double download_speed);
97 
105 typedef void (*nim_http_request_speed_cb)(const void* user_data, double upload_speed, double download_speed);
106 
107 #ifdef __cplusplus
108 };
109 #endif //__cplusplus
110 #endif // NIM_TOOLS_HTTP_DEF_H
kNIMProxySocks4
@ kNIMProxySocks4
Definition: nim_tools_http_def.h:18
HttpRequestID
unsigned int HttpRequestID
Definition: nim_tools_http_def.h:32
kNIMProxySocks4a
@ kNIMProxySocks4a
Definition: nim_tools_http_def.h:19
kNIMProxySocks5
@ kNIMProxySocks5
Definition: nim_tools_http_def.h:20
kNIMProxySocks5HostName
@ kNIMProxySocks5HostName
Definition: nim_tools_http_def.h:21
nim_http_request_progress_cb
void(* nim_http_request_progress_cb)(const void *user_data, double total_upload_size, double uploaded_size, double total_download_size, double downloaded_size)
Definition: nim_tools_http_def.h:77
nim_http_request_response_cb
void(* nim_http_request_response_cb)(const void *user_data, bool result, int response_code, const char *response_content)
Definition: nim_tools_http_def.h:51
kNIMProxyNone
@ kNIMProxyNone
Definition: nim_tools_http_def.h:16
HttpRequestHandle
void * HttpRequestHandle
Definition: nim_tools_http_def.h:27
kNIMProxyHttp11
@ kNIMProxyHttp11
Definition: nim_tools_http_def.h:17
nim_http_request_transfer_cb
void(* nim_http_request_transfer_cb)(const void *user_data, double actual_upload_size, double upload_speed, double actual_download_size, double download_speed)
Definition: nim_tools_http_def.h:92
nim_http_request_response_ex_cb
void(* nim_http_request_response_ex_cb)(const void *user_data, bool result, int response_code, const char *response_content, const char *response_header)
Definition: nim_tools_http_def.h:62
nim_http_request_completed_cb
void(* nim_http_request_completed_cb)(const void *user_data, bool result, int response_code)
Definition: nim_tools_http_def.h:41
nim_http_request_speed_cb
void(* nim_http_request_speed_cb)(const void *user_data, double upload_speed, double download_speed)
Definition: nim_tools_http_def.h:105
NIMProxyType
NIMProxyType
Definition: nim_global_def.h:152