NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_tools_http_cpp.cpp 文件参考

NIM HTTP提供的传输工具接口(CPP接口) 更多...

#include "nim_tools_cpp_wrapper/nim_tools_http_cpp.h"
#include <assert.h>
#include <exception>
#include "nim_wrapper_util/nim_sdk_util.h"

struct  nim_http::CompletedCallbackUserData
 
struct  nim_http::ResponseCallbackUserData
 

命名空间

namespace  nim_http
 NIM提供的HTTP工具
 

类型定义

typedef void(* nim_http::typeof_nim_http_init) ()
 
typedef void(* nim_http::typeof_nim_http_uninit) ()
 
typedef void(* nim_http::typeof_nim_http_init_log) (const char *log_file_path)
 
typedef bool(* nim_http::typeof_nim_http_is_init_log) ()
 
typedef HttpRequestHandle(* nim_http::typeof_nim_http_create_download_file_request) (const char *url, const char *download_file_path, nim_http_request_completed_cb complete_cb, const void *user_data)
 
typedef HttpRequestHandle(* nim_http::typeof_nim_http_create_download_file_range_request) (const char *url, const char *download_file_path, int64_t range_start, nim_http_request_completed_cb complete_cb, const void *user_data)
 
typedef HttpRequestHandle(* nim_http::typeof_nim_http_create_request) (const char *url, const char *post_body, size_t post_body_size, nim_http_request_response_cb response_cb, const void *user_data)
 
typedef HttpRequestHandle(* nim_http::typeof_nim_http_create_request_ex) (const char *url, const char *post_body, size_t post_body_size, nim_http_request_response_ex_cb response_cb, const void *user_data)
 
typedef void(* nim_http::typeof_nim_http_add_request_header) (HttpRequestHandle request_handle, const char *key, const char *value)
 
typedef void(* nim_http::typeof_nim_http_set_request_progress_cb) (HttpRequestHandle request_handle, nim_http_request_progress_cb progress_callback, const void *user_data)
 
typedef void(* nim_http::typeof_nim_http_set_request_speed_cb) (HttpRequestHandle request_handle, nim_http_request_speed_cb speed_callback, const void *user_data)
 
typedef void(* nim_http::typeof_nim_http_set_request_transfer_cb) (HttpRequestHandle request_handle, nim_http_request_transfer_cb transfer_callback, const void *user_data)
 
typedef void(* nim_http::typeof_nim_http_set_request_method_as_post) (HttpRequestHandle request_handle)
 
typedef void(* nim_http::typeof_nim_http_set_timeout) (HttpRequestHandle request_handle, int timeout_ms)
 
typedef void(* nim_http::typeof_nim_http_set_low_speed) (HttpRequestHandle request_handle, int low_speed_limit, int low_speed_time)
 
typedef void(* nim_http::typeof_nim_http_set_proxy) (HttpRequestHandle request_handle, int type, const char *host, short port, const char *user, const char *pass)
 
typedef HttpRequestID(* nim_http::typeof_nim_http_post_request) (HttpRequestHandle)
 
typedef void(* nim_http::typeof_nim_http_remove_request) (HttpRequestID http_request_id)
 
typedef const char *const(* nim_http::typeof_nim_http_get_response_head) (HttpRequestID http_request_id)
 

函数

bool nim_http::Init (const std::string &library_path)
 
void nim_http::Uninit ()
 
void nim_http::InitLog (const std::string &log_file_path)
 
bool nim_http::IsInitLog ()
 
void nim_http::SetGlobalProxy (nim::NIMProxyType type, const std::string &host, short port, const std::string &user, const std::string &pass)
 
HttpRequestID nim_http::PostRequest (const HttpRequest &http_request)
 
void nim_http::RemoveRequest (HttpRequestID http_request_id)
 
std::string nim_http::GetResponseHead (HttpRequestID http_request_id)
 

变量

nim::SDKInstancenim_http::sdk_instance_ = nullptr
 
typeof_nim_http_init nim_http::g_nim_http_init = nullptr
 
typeof_nim_http_uninit nim_http::g_nim_http_uninit = nullptr
 
typeof_nim_http_init_log nim_http::g_nim_http_init_log = nullptr
 
typeof_nim_http_is_init_log nim_http::g_nim_http_is_init_log = nullptr
 
typeof_nim_http_create_download_file_request nim_http::g_nim_http_create_download_file_request = nullptr
 
typeof_nim_http_create_download_file_range_request nim_http::g_nim_http_create_download_file_range_request = nullptr
 
typeof_nim_http_create_request nim_http::g_nim_http_create_request = nullptr
 
typeof_nim_http_create_request_ex nim_http::g_nim_http_create_request_ex = nullptr
 
typeof_nim_http_add_request_header nim_http::g_nim_http_add_request_header = nullptr
 
typeof_nim_http_set_request_progress_cb nim_http::g_nim_http_set_request_progress_cb = nullptr
 
typeof_nim_http_set_request_speed_cb nim_http::g_nim_http_set_request_speed_cb = nullptr
 
typeof_nim_http_set_request_transfer_cb nim_http::g_nim_http_set_request_transfer_cb = nullptr
 
typeof_nim_http_set_request_method_as_post nim_http::g_nim_http_set_request_method_as_post = nullptr
 
typeof_nim_http_set_timeout nim_http::g_nim_http_set_timeout = nullptr
 
typeof_nim_http_set_low_speed nim_http::g_nim_http_set_low_speed = nullptr
 
typeof_nim_http_set_proxy nim_http::g_nim_http_set_proxy = nullptr
 
typeof_nim_http_post_request nim_http::g_nim_http_post_request = nullptr
 
typeof_nim_http_remove_request nim_http::g_nim_http_remove_request = nullptr
 
typeof_nim_http_get_response_head nim_http::g_nim_http_get_response_head = nullptr
 
nim::NIMProxyType nim_http::proxy_type_ = nim::kNIMProxyNone
 
std::string nim_http::proxy_host_
 
short nim_http::proxy_port_ = 0
 
std::string nim_http::proxy_user_
 
std::string nim_http::proxy_pass_
 

详细描述

NIM HTTP提供的传输工具接口(CPP接口)

作者
towik, Oleg
日期
2015/4/30