|
libzypp 17.38.15
|
Holds transfer setting. More...
#include <zypp-curl/transfersettings.h>
Classes | |
| class | Impl |
Public Types | |
| using | Headers = std::vector<std::string> |
Public Member Functions | |
| TransferSettings () | |
| Constructs a transfer program cmd line access. | |
| void | reset () |
| reset the settings to the defaults | |
| void | addHeader (std::string &&val_r) |
| add a header, on the form "Foo: Bar" (trims) | |
| void | addHeader (const std::string &val_r) |
| const Headers & | headers () const |
| returns a list of all added headers (trimmed) | |
| void | setUserAgentString (std::string &&val_r) |
| sets the user agent ie: "Mozilla v3" (trims) | |
| void | setUserAgentString (const std::string &val_r) |
| const std::string & | userAgentString () const |
| user agent string (trimmed) | |
| bool | hasCredentials () const |
| has a non-empty username and a non-empty password | |
| std::ostream & | logCredentials (std::ostream &str) const |
| log credentials to stream hiding the password. | |
| void | setUsername (const std::string &val_r) |
| sets the auth username | |
| void | setUsername (std::string &&val_r) |
| const std::string & | username () const |
| auth username | |
| void | setPassword (const std::string &val_r) |
| sets the auth password | |
| void | setPassword (std::string &&val_r) |
| const std::string & | password () const |
| auth password | |
| void | setAnonymousAuth () |
| sets anonymous authentication (ie: for ftp) | |
| void | setProxyEnabled (bool enabled) |
| whether the proxy is used or not | |
| bool | proxyEnabled () const |
| proxy is enabled | |
| void | setProxy (const std::string &val_r) |
| proxy to use if it is enabled | |
| void | setProxy (std::string &&val_r) |
| const std::string & | proxy () const |
| proxy host | |
| bool | hasProxyCredentials () const |
| has a proxy username, maybe even the password | |
| std::ostream & | logProxyCredentials (std::ostream &str) const |
| log credentials to stream hiding the password. | |
| void | setProxyUsername (const std::string &val_r) |
| sets the proxy user | |
| void | setProxyUsername (std::string &&val_r) |
| const std::string & | proxyUsername () const |
| proxy auth username | |
| void | setProxyPassword (const std::string &val_r) |
| sets the proxy password | |
| void | setProxyPassword (std::string &&val_r) |
| const std::string & | proxyPassword () const |
| proxy auth password | |
| std::string | proxyUserPassword () const |
| returns the proxy user and password as a user:pass string | |
| void | setConnectTimeout (long t) |
| set the connect timeout | |
| long | connectTimeout () const |
| connection timeout | |
| void | setTimeout (long t) |
| set the transfer timeout | |
| long | timeout () const |
| transfer timeout | |
| void | setMaxConcurrentConnections (long v) |
| Set maximum number of concurrent connections for a single transfer. | |
| long | maxConcurrentConnections () const |
| Maximum number of concurrent connections for a single transfer. | |
| void | setMinDownloadSpeed (long v) |
| Set minimum download speed (bytes per second) until the connection is dropped. | |
| long | minDownloadSpeed () const |
| Minimum download speed (bytes per second) until the connection is dropped. | |
| void | setMaxDownloadSpeed (long v) |
| Set max download speed (bytes per second) | |
| long | maxDownloadSpeed () const |
| Maximum download speed (bytes per second) | |
| void | setMaxSilentTries (long v) |
| Set maximum silent retries. | |
| long | maxSilentTries () const |
| Maximum silent retries. | |
| void | setVerifyHostEnabled (bool enabled) |
| Sets whether to verify host for ssl. | |
| bool | verifyHostEnabled () const |
| Whether to verify host for ssl. | |
| void | setVerifyPeerEnabled (bool enabled) |
| Sets whether to verify host for ssl. | |
| bool | verifyPeerEnabled () const |
| Whether to verify peer for ssl. | |
| void | setCertificateAuthoritiesPath (const Pathname &val_r) |
| Sets the SSL certificate authorities path. | |
| void | setCertificateAuthoritiesPath (Pathname &&val_r) |
| const Pathname & | certificateAuthoritiesPath () const |
| SSL certificate authorities path ( default: /etc/ssl/certs ) | |
| void | setAuthType (const std::string &val_r) |
| set the allowed authentication types | |
| void | setAuthType (std::string &&val_r) |
| const std::string & | authType () const |
| get the allowed authentication types | |
| void | setHeadRequestsAllowed (bool allowed) |
| set whether HEAD requests are allowed | |
| bool | headRequestsAllowed () const |
| whether HEAD requests are allowed | |
| void | setClientCertificatePath (const Pathname &val_r) |
| Sets the SSL client certificate file. | |
| void | setClientCertificatePath (Pathname &&val_r) |
| const Pathname & | clientCertificatePath () const |
| SSL client certificate file. | |
| void | setClientKeyPath (const Pathname &val_r) |
| Sets the SSL client key file. | |
| void | setClientKeyPath (Pathname &&val_r) |
| const Pathname & | clientKeyPath () const |
| SSL client key file. | |
| void | setEnableCookieFile (bool enable=true) |
| Enable or disable the use of the cookie file. | |
| bool | cookieFileEnabled () const |
Static Public Member Functions | |
| static std::ostream & | logUserPass (std::ostream &str, const std::string &user_r, const std::string &pass_r) |
| Log credentials to stream hiding the password ("","[user]","[user:########]"). | |
Protected Attributes | |
| RWCOW_pointer< Impl > | _impl |
Holds transfer setting.
Definition at line 33 of file transfersettings.h.
| using zypp::media::TransferSettings::Headers = std::vector<std::string> |
Definition at line 43 of file transfersettings.h.
| zypp::media::TransferSettings::TransferSettings | ( | ) |
Constructs a transfer program cmd line access.
Definition at line 128 of file transfersettings.cc.
|
static |
Log credentials to stream hiding the password ("","[user]","[user:########]").
Definition at line 115 of file transfersettings.cc.
| void zypp::media::TransferSettings::reset | ( | ) |
reset the settings to the defaults
Definition at line 132 of file transfersettings.cc.
| void zypp::media::TransferSettings::addHeader | ( | std::string && | val_r | ) |
add a header, on the form "Foo: Bar" (trims)
Definition at line 138 of file transfersettings.cc.
| void zypp::media::TransferSettings::addHeader | ( | const std::string & | val_r | ) |
Definition at line 136 of file transfersettings.cc.
| const TransferSettings::Headers & zypp::media::TransferSettings::headers | ( | ) | const |
returns a list of all added headers (trimmed)
Definition at line 141 of file transfersettings.cc.
| void zypp::media::TransferSettings::setUserAgentString | ( | std::string && | val_r | ) |
sets the user agent ie: "Mozilla v3" (trims)
Definition at line 150 of file transfersettings.cc.
| void zypp::media::TransferSettings::setUserAgentString | ( | const std::string & | val_r | ) |
Definition at line 147 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::userAgentString | ( | ) | const |
user agent string (trimmed)
Definition at line 153 of file transfersettings.cc.
| bool zypp::media::TransferSettings::hasCredentials | ( | ) | const |
has a non-empty username and a non-empty password
Definition at line 157 of file transfersettings.cc.
|
inline |
log credentials to stream hiding the password.
Definition at line 67 of file transfersettings.h.
| void zypp::media::TransferSettings::setUsername | ( | const std::string & | val_r | ) |
sets the auth username
Definition at line 160 of file transfersettings.cc.
| void zypp::media::TransferSettings::setUsername | ( | std::string && | val_r | ) |
Definition at line 163 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::username | ( | ) | const |
auth username
Definition at line 166 of file transfersettings.cc.
| void zypp::media::TransferSettings::setPassword | ( | const std::string & | val_r | ) |
sets the auth password
Definition at line 169 of file transfersettings.cc.
| void zypp::media::TransferSettings::setPassword | ( | std::string && | val_r | ) |
Definition at line 172 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::password | ( | ) | const |
auth password
Definition at line 175 of file transfersettings.cc.
| void zypp::media::TransferSettings::setAnonymousAuth | ( | ) |
sets anonymous authentication (ie: for ftp)
Definition at line 178 of file transfersettings.cc.
whether the proxy is used or not
Definition at line 185 of file transfersettings.cc.
| bool zypp::media::TransferSettings::proxyEnabled | ( | ) | const |
proxy is enabled
Definition at line 188 of file transfersettings.cc.
| void zypp::media::TransferSettings::setProxy | ( | const std::string & | val_r | ) |
proxy to use if it is enabled
Definition at line 192 of file transfersettings.cc.
| void zypp::media::TransferSettings::setProxy | ( | std::string && | val_r | ) |
Definition at line 195 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::proxy | ( | ) | const |
proxy host
Definition at line 198 of file transfersettings.cc.
| bool zypp::media::TransferSettings::hasProxyCredentials | ( | ) | const |
has a proxy username, maybe even the password
|
inline |
log credentials to stream hiding the password.
Definition at line 107 of file transfersettings.h.
| void zypp::media::TransferSettings::setProxyUsername | ( | const std::string & | val_r | ) |
sets the proxy user
Definition at line 202 of file transfersettings.cc.
| void zypp::media::TransferSettings::setProxyUsername | ( | std::string && | val_r | ) |
Definition at line 205 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::proxyUsername | ( | ) | const |
proxy auth username
Definition at line 208 of file transfersettings.cc.
| void zypp::media::TransferSettings::setProxyPassword | ( | const std::string & | val_r | ) |
sets the proxy password
Definition at line 211 of file transfersettings.cc.
| void zypp::media::TransferSettings::setProxyPassword | ( | std::string && | val_r | ) |
Definition at line 214 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::proxyPassword | ( | ) | const |
proxy auth password
Definition at line 217 of file transfersettings.cc.
| std::string zypp::media::TransferSettings::proxyUserPassword | ( | ) | const |
returns the proxy user and password as a user:pass string
Definition at line 220 of file transfersettings.cc.
| void zypp::media::TransferSettings::setConnectTimeout | ( | long | t | ) |
set the connect timeout
Definition at line 237 of file transfersettings.cc.
| long zypp::media::TransferSettings::connectTimeout | ( | ) | const |
connection timeout
Definition at line 240 of file transfersettings.cc.
| void zypp::media::TransferSettings::setTimeout | ( | long | t | ) |
set the transfer timeout
Definition at line 230 of file transfersettings.cc.
| long zypp::media::TransferSettings::timeout | ( | ) | const |
transfer timeout
Definition at line 233 of file transfersettings.cc.
| void zypp::media::TransferSettings::setMaxConcurrentConnections | ( | long | v | ) |
Set maximum number of concurrent connections for a single transfer.
Definition at line 244 of file transfersettings.cc.
| long zypp::media::TransferSettings::maxConcurrentConnections | ( | ) | const |
Maximum number of concurrent connections for a single transfer.
Definition at line 247 of file transfersettings.cc.
| void zypp::media::TransferSettings::setMinDownloadSpeed | ( | long | v | ) |
Set minimum download speed (bytes per second) until the connection is dropped.
Definition at line 251 of file transfersettings.cc.
| long zypp::media::TransferSettings::minDownloadSpeed | ( | ) | const |
Minimum download speed (bytes per second) until the connection is dropped.
Definition at line 254 of file transfersettings.cc.
| void zypp::media::TransferSettings::setMaxDownloadSpeed | ( | long | v | ) |
Set max download speed (bytes per second)
Definition at line 258 of file transfersettings.cc.
| long zypp::media::TransferSettings::maxDownloadSpeed | ( | ) | const |
Maximum download speed (bytes per second)
Definition at line 261 of file transfersettings.cc.
| void zypp::media::TransferSettings::setMaxSilentTries | ( | long | v | ) |
Set maximum silent retries.
Definition at line 265 of file transfersettings.cc.
| long zypp::media::TransferSettings::maxSilentTries | ( | ) | const |
Maximum silent retries.
Definition at line 268 of file transfersettings.cc.
Sets whether to verify host for ssl.
Definition at line 272 of file transfersettings.cc.
| bool zypp::media::TransferSettings::verifyHostEnabled | ( | ) | const |
Whether to verify host for ssl.
Definition at line 275 of file transfersettings.cc.
Sets whether to verify host for ssl.
Definition at line 279 of file transfersettings.cc.
| bool zypp::media::TransferSettings::verifyPeerEnabled | ( | ) | const |
Whether to verify peer for ssl.
Definition at line 282 of file transfersettings.cc.
Sets the SSL certificate authorities path.
Definition at line 310 of file transfersettings.cc.
Definition at line 313 of file transfersettings.cc.
| const Pathname & zypp::media::TransferSettings::certificateAuthoritiesPath | ( | ) | const |
SSL certificate authorities path ( default: /etc/ssl/certs )
Definition at line 316 of file transfersettings.cc.
| void zypp::media::TransferSettings::setAuthType | ( | const std::string & | val_r | ) |
set the allowed authentication types
Definition at line 320 of file transfersettings.cc.
| void zypp::media::TransferSettings::setAuthType | ( | std::string && | val_r | ) |
Definition at line 323 of file transfersettings.cc.
| const std::string & zypp::media::TransferSettings::authType | ( | ) | const |
get the allowed authentication types
Definition at line 326 of file transfersettings.cc.
set whether HEAD requests are allowed
Definition at line 330 of file transfersettings.cc.
| bool zypp::media::TransferSettings::headRequestsAllowed | ( | ) | const |
whether HEAD requests are allowed
Definition at line 333 of file transfersettings.cc.
Sets the SSL client certificate file.
Definition at line 285 of file transfersettings.cc.
Definition at line 288 of file transfersettings.cc.
| const Pathname & zypp::media::TransferSettings::clientCertificatePath | ( | ) | const |
SSL client certificate file.
Definition at line 291 of file transfersettings.cc.
Sets the SSL client key file.
Definition at line 295 of file transfersettings.cc.
Definition at line 298 of file transfersettings.cc.
| const Pathname & zypp::media::TransferSettings::clientKeyPath | ( | ) | const |
SSL client key file.
Definition at line 301 of file transfersettings.cc.
Enable or disable the use of the cookie file.
Definition at line 304 of file transfersettings.cc.
| bool zypp::media::TransferSettings::cookieFileEnabled | ( | ) | const |
Definition at line 307 of file transfersettings.cc.
|
protected |
Definition at line 228 of file transfersettings.h.