libzypp: internal Namespace Reference

libzypp 17.38.10

internal Namespace Reference

## Classes
struct | OptionalDownloadProgressReport
| Bottleneck filtering all DownloadProgressReport issued from Media[Muli]Curl. More...
struct | ProgressData
class | MediaCurlExceptionMayRetryInternaly
| Attempt to work around certain issues by autoretry in MediaCurl::getFileCopy E.g. More...
struct | CurlPollHelper

## Functions
void | globalInitCurlOnce ()
uint | curlVersion ()
int | log_curl (CURL *curl, curl_infotype info, char *ptr, size_t len, void *max_lvl)
void | setupZYPP_MEDIA_CURL_DEBUG (CURL *curl)
| Setup CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION according to env::ZYPP_MEDIA_CURL_DEBUG.
size_t | log_redirects_curl (char *ptr, size_t size, size_t nmemb, void *userdata)
void | prepareSettingsAndUrl (zypp::Url &url_r, zypp::media::TransferSettings &s)
void | fillSettingsFromUrl (const Url &url, media::TransferSettings &s)
| Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo.
void | fillSettingsSystemProxy (const Url &url, media::TransferSettings &s)
| Reads the system proxy configuration and fills the settings structure proxy information.
void | curlEscape (std::string &str_r, const char char_r, const std::string &escaped_r)
std::string | curlEscapedPath (std::string path_r)
std::string | curlUnEscape (const std::string &text_r)
Url | clearQueryString (const Url &url)
zypp::Url | propagateQueryParams (zypp::Url url_r, const zypp::Url &template_r)
CURLcode | setCurlRedirProtocols (CURL *curl)

## Function Documentation

## ◆ globalInitCurlOnce()

void internal::globalInitCurlOnce | ( |  | ) |

Definition at line 64 of file curlhelper.cc.

## ◆ curlVersion()

uint internal::curlVersion | ( |  | ) |

Definition at line 74 of file curlhelper.cc.

## ◆ log_curl()

int internal::log_curl | ( | CURL * | curl,
|  | curl_infotype | info,
|  | char * | ptr,
|  | size_t | len,
|  | void * | max_lvl )

Definition at line 80 of file curlhelper.cc.

## ◆ setupZYPP_MEDIA_CURL_DEBUG()

void internal::setupZYPP_MEDIA_CURL_DEBUG | ( | CURL * | curl | ) |

Setup CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION according to env::ZYPP_MEDIA_CURL_DEBUG.

Definition at line 130 of file curlhelper.cc.

## ◆ log_redirects_curl()

size_t internal::log_redirects_curl | ( | char * | ptr,
|  | size_t | size,
|  | size_t | nmemb,
|  | void * | userdata )

Definition at line 143 of file curlhelper.cc.

## ◆ prepareSettingsAndUrl()

void internal::prepareSettingsAndUrl | ( | zypp::Url & | url_r,
|  | zypp::media::TransferSettings & | s )

Calls fillSettingsFromUrl and fillSettingsSystemProxy as expected, afterwards cleans the Url by calling clearQueryString

Definition at line 180 of file curlhelper.cc.

## ◆ fillSettingsFromUrl()

void internal::fillSettingsFromUrl | ( | const Url & | url,
|  | media::TransferSettings & | s )

Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo.

Definition at line 196 of file curlhelper.cc.

## ◆ fillSettingsSystemProxy()

void internal::fillSettingsSystemProxy | ( | const Url & | url,
|  | media::TransferSettings & | s )

Reads the system proxy configuration and fills the settings structure proxy information.

Definition at line 359 of file curlhelper.cc.

## ◆ curlEscape()

void internal::curlEscape | ( | std::string & | str_r,
|  | const char | char_r,
|  | const std::string & | escaped_r )

Definition at line 381 of file curlhelper.cc.

## ◆ curlEscapedPath()

std::string internal::curlEscapedPath | ( | std::string | path_r | ) |

Definition at line 389 of file curlhelper.cc.

## ◆ curlUnEscape()

std::string internal::curlUnEscape | ( | const std::string & | text_r | ) |

Definition at line 394 of file curlhelper.cc.

## ◆ clearQueryString()

zypp::Url internal::clearQueryString | ( | const Url & | url | ) |

Definition at line 401 of file curlhelper.cc.

## ◆ propagateQueryParams()

zypp::Url internal::propagateQueryParams | ( | zypp::Url | url_r,
|  | const zypp::Url & | template_r )

Definition at line 432 of file curlhelper.cc.

## ◆ setCurlRedirProtocols()

CURLcode internal::setCurlRedirProtocols | ( | CURL * | curl | ) |

Enables the redirection protocols that we support, this code is a bit ugly because for newer versions we need to detect the current curl version at runtime, but at the same time need the compile time switch in case we are built against a older libcurl version.

Reason for this is that we do not explicitely require the libcurl version we are built against, this could mean we are ending up with a libcurl older than the one we built against.

See bsc#1218831

Definition at line 544 of file curlhelper.cc.