14#ifndef ZYPP_MEDIA_PRIVATE_CURLHELPER_P_H_INCLUDED
15#define ZYPP_MEDIA_PRIVATE_CURLHELPER_P_H_INCLUDED
18#include <zypp-core/Url.h>
19#include <zypp-curl/TransferSettings>
21#define CONNECT_TIMEOUT 60
22#define TRANSFER_TIMEOUT_MAX 60 * 60
23#define DETECT_DIR_INDEX 0
25#define EXPLICITLY_NO_PROXY "_none_"
27#undef CURLVERSION_AT_LEAST
28#define CURLVERSION_AT_LEAST(M,N,O) LIBCURL_VERSION_NUM >= ((((M)<<8)+(N))<<8)+(O)
38 if (
char *ptr = ::getenv(
"ZYPP_MEDIA_CURL_DEBUG"); ptr && *ptr )
52int log_curl(CURL *curl, curl_infotype info,
char *ptr,
size_t len,
void *max_lvl);
59void curlEscape( std::string & str_r,
const char char_r,
const std::string & escaped_r );
void fillSettingsFromUrl(const Url &url, media::TransferSettings &s)
Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo.
size_t log_redirects_curl(char *ptr, size_t size, size_t nmemb, void *userdata)
void globalInitCurlOnce()
zypp::Url propagateQueryParams(zypp::Url url_r, const zypp::Url &template_r)
std::string curlUnEscape(std::string text_r)
std::string curlEscapedPath(std::string path_r)
void fillSettingsSystemProxy(const Url &url, media::TransferSettings &s)
Reads the system proxy configuration and fills the settings structure proxy information.
Url clearQueryString(const Url &url)
int log_curl(CURL *, curl_infotype info, char *ptr, size_t len, void *max_lvl)
void curlEscape(std::string &str_r, const char char_r, const std::string &escaped_r)
int ZYPP_MEDIA_CURL_IPRESOLVE()
4/6 to force IPv4/v6
long ZYPP_MEDIA_CURL_DEBUG()
Long number for setting CURLOPT_DEBUGDATA.
TInt strtonum(const C_Str &str)
Parsing numbers from string.
Easy-to use interface to the ZYPP dependency resolver.