14 #ifndef ZYPP_MEDIA_PRIVATE_CURLHELPER_P_H_INCLUDED 15 #define ZYPP_MEDIA_PRIVATE_CURLHELPER_P_H_INCLUDED 17 #include <curl/curl.h> 18 #include <zypp-core/Url.h> 19 #include <zypp-curl/TransferSettings> 23 #define EXPLICITLY_NO_PROXY "_none_" 25 #undef CURLVERSION_AT_LEAST 26 #define CURLVERSION_AT_LEAST(M,N,O) LIBCURL_VERSION_NUM >= ((((M)<<8)+(N))<<8)+(O) 59 void curlEscape( std::string & str_r,
const char char_r,
const std::string & escaped_r );
109 #endif //ZYPP_MEDIA_PRIVATE_CURLHELPER_P_H_INCLUDED void globalInitCurlOnce()
size_t log_redirects_curl(char *ptr, size_t size, size_t nmemb, void *userdata)
zypp::Url propagateQueryParams(zypp::Url url_r, const zypp::Url &template_r)
static int socketcb(CURL *easy, curl_socket_t s, int what, CurlPollHelper *userp, void *sockp)
Url clearQueryString(const Url &url)
std::string curlEscapedPath(std::string path_r)
CURLMcode handleSocketActions(const std::vector< GPollFD > &actionsFds, int first=0)
int ZYPP_MEDIA_CURL_IPRESOLVE()
4/6 to force IPv4/v6
void curlEscape(std::string &str_r, const char char_r, const std::string &escaped_r)
std::vector< GPollFD > socks
const long & ZYPP_MEDIA_CURL_DEBUG()
const long& for setting CURLOPT_DEBUGDATA Returns a reference to a static variable, so it's safe to pass ...
void fillSettingsFromUrl(const Url &url, media::TransferSettings &s)
Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo.
static int timercb(CURLM *, long timeout_ms, CurlPollHelper *thatPtr)
std::string curlUnEscape(std::string text_r)
void setupZYPP_MEDIA_CURL_DEBUG(CURL *curl)
Setup CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION according to env::ZYPP_MEDIA_CURL_DEBUG.
void fillSettingsSystemProxy(const Url &url, media::TransferSettings &s)
Reads the system proxy configuration and fills the settings structure proxy information.
std::optional< long > timeout_ms
Easy-to use interface to the ZYPP dependency resolver.
CURLcode setCurlRedirProtocols(CURL *curl)
CurlPollHelper(CurlPoll &p)