Public Types | |
| enum | { DEFAULT_TIMEOUT_CONNECT = 10 , DEFAULT_TIMEOUT_MAX = 0 , DEFAULT_SIZE_LIMIT = 1024 * 1024 * 1024 } |
Public Member Functions | |
| priv (const std::string &url) | |
| ~priv () | |
| void | set_timeout_connect (long timeout) |
| void | set_timeout_max (long timeout) |
| void | form_add_file (const char *name, const fs::path &path, const char *filename, boost::filesystem::ifstream::off_type offset, size_t length) |
| void | mime_form_add_text (const char *name, const char *value) |
| void | mime_form_add_file (const char *name, const char *path) |
| void | set_post_body (const fs::path &path) |
| void | set_post_body (const std::string &body) |
| void | set_put_body (const fs::path &path) |
| void | set_del_body (const std::string &body) |
| void | set_range (const std::string &range) |
| std::string | curl_error (CURLcode curlcode) |
| std::string | body_size_error () |
| void | http_perform () |
Static Public Member Functions | |
| static bool | ca_file_supported (::CURL *curl) |
| static size_t | writecb (void *data, size_t size, size_t nmemb, void *userp) |
| static int | xfercb (void *userp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow) |
| static int | xfercb_legacy (void *userp, double dltotal, double dlnow, double ultotal, double ulnow) |
| static size_t | form_file_read_cb (char *buffer, size_t size, size_t nitems, void *userp) |
| static size_t | headers_cb (char *buffer, size_t size, size_t nitems, void *userp) |
Public Attributes | |
| ::CURL * | curl |
| ::curl_httppost * | form |
| ::curl_httppost * | form_end |
| ::curl_mime * | mime |
| ::curl_slist * | headerlist |
| std::string | url |
| std::string | method |
| std::string | buffer |
| std::deque< form_file > | form_files |
| std::string | postfields |
| std::string | error_buffer |
| std::string | headers |
| size_t | limit |
| std::atomic_bool | cancel |
| std::unique_ptr< form_file > | putFile |
| std::thread | io_thread |
| Http::CompleteFn | completefn |
| Http::ErrorFn | errorfn |
| Http::ProgressFn | progressfn |
| Http::IPResolveFn | ipresolvefn |
| Http::HeaderCallbackFn | headerfn |
| anonymous enum |
| Enumerator | |
|---|---|
| DEFAULT_TIMEOUT_CONNECT | |
| DEFAULT_TIMEOUT_MAX | |
| DEFAULT_SIZE_LIMIT | |
| Slic3r::Http::priv::priv | ( | const std::string & | url | ) |
References cancel, curl, DEFAULT_TIMEOUT_CONNECT, DEFAULT_TIMEOUT_MAX, error_buffer, form, form_end, headerlist, L, limit, Slic3r::log_trace(), method, mime, set_timeout_connect(), set_timeout_max(), Slic3r::Http::tls_global_init(), and url.
| Slic3r::Http::priv::~priv | ( | ) |
References curl, form, headerlist, and mime.
| std::string Slic3r::Http::priv::body_size_error | ( | ) |
References limit.
Referenced by http_perform().
|
static |
References curl.
Referenced by Slic3r::Http::ca_file(), and Slic3r::Http::ca_file_supported().
| std::string Slic3r::Http::priv::curl_error | ( | CURLcode | curlcode | ) |
References error_buffer.
Referenced by http_perform().
| void Slic3r::Http::priv::form_add_file | ( | const char * | name, |
| const fs::path & | path, | ||
| const char * | filename, | ||
| boost::filesystem::ifstream::off_type | offset, | ||
| size_t | length ) |
References Slic3r::f(), form, form_end, form_files, Slic3r::length(), and Slic3r::offset().
|
static |
References buffer, and Slic3r::f().
Referenced by http_perform().
|
static |
References buffer.
Referenced by http_perform().
| void Slic3r::Http::priv::http_perform | ( | ) |
References body_size_error(), buffer, cancel, completefn, curl, curl_error(), errorfn, form, form_file_read_cb(), headerlist, headers_cb(), ipresolvefn, L, method, mime, postfields, progressfn, putFile, writecb(), xfercb(), and xfercb_legacy().
| void Slic3r::Http::priv::mime_form_add_file | ( | const char * | name, |
| const char * | path ) |
| void Slic3r::Http::priv::mime_form_add_text | ( | const char * | name, |
| const char * | value ) |
| void Slic3r::Http::priv::set_del_body | ( | const std::string & | body | ) |
References postfields.
| void Slic3r::Http::priv::set_post_body | ( | const fs::path & | path | ) |
References postfields.
| void Slic3r::Http::priv::set_post_body | ( | const std::string & | body | ) |
References postfields.
| void Slic3r::Http::priv::set_put_body | ( | const fs::path & | path | ) |
| void Slic3r::Http::priv::set_range | ( | const std::string & | range | ) |
| void Slic3r::Http::priv::set_timeout_connect | ( | long | timeout | ) |
| void Slic3r::Http::priv::set_timeout_max | ( | long | timeout | ) |
|
static |
References DEFAULT_SIZE_LIMIT, and limit.
Referenced by http_perform().
|
static |
Referenced by http_perform(), and xfercb_legacy().
|
static |
References xfercb().
Referenced by http_perform().
| std::string Slic3r::Http::priv::buffer |
Referenced by form_file_read_cb(), headers_cb(), and http_perform().
| std::atomic_bool Slic3r::Http::priv::cancel |
Referenced by priv(), and http_perform().
| Http::CompleteFn Slic3r::Http::priv::completefn |
Referenced by http_perform().
| ::CURL* Slic3r::Http::priv::curl |
| std::string Slic3r::Http::priv::error_buffer |
Referenced by priv(), and curl_error().
| Http::ErrorFn Slic3r::Http::priv::errorfn |
Referenced by http_perform().
| ::curl_httppost* Slic3r::Http::priv::form |
Referenced by priv(), ~priv(), form_add_file(), and http_perform().
| ::curl_httppost* Slic3r::Http::priv::form_end |
Referenced by priv(), and form_add_file().
| std::deque<form_file> Slic3r::Http::priv::form_files |
Referenced by form_add_file().
| Http::HeaderCallbackFn Slic3r::Http::priv::headerfn |
| ::curl_slist* Slic3r::Http::priv::headerlist |
Referenced by priv(), ~priv(), and http_perform().
| std::string Slic3r::Http::priv::headers |
| std::thread Slic3r::Http::priv::io_thread |
| Http::IPResolveFn Slic3r::Http::priv::ipresolvefn |
Referenced by http_perform().
| size_t Slic3r::Http::priv::limit |
Referenced by priv(), body_size_error(), and writecb().
| std::string Slic3r::Http::priv::method |
Referenced by priv(), and http_perform().
| ::curl_mime* Slic3r::Http::priv::mime |
Referenced by priv(), ~priv(), http_perform(), mime_form_add_file(), and mime_form_add_text().
| std::string Slic3r::Http::priv::postfields |
Referenced by http_perform(), set_del_body(), set_post_body(), and set_post_body().
| Http::ProgressFn Slic3r::Http::priv::progressfn |
Referenced by http_perform().
| std::unique_ptr<form_file> Slic3r::Http::priv::putFile |
Referenced by http_perform(), and set_put_body().
| std::string Slic3r::Http::priv::url |
Referenced by priv().