libzypp 9.41.1

zypp::media::TransferSettings Class Reference

Holds transfer setting. More...

#include <TransferSettings.h>

List of all members.

Classes

class  Impl

Public Types

typedef std::vector< std::string > Headers

Public Member Functions

 TransferSettings ()
 Constructs a transfer program cmd line access.
 TransferSettings (const zypp::Url &url)
 Constructs the settings from a url object where.
void reset ()
 reset the settings to the defaults
void addHeader (const std::string &header)
 add a header, on the form "Foo: Bar"
Headers::const_iterator headersBegin () const
 begin iterators to additional headers
Headers::const_iterator headersEnd () const
 end iterators to additional headers
void setUserAgentString (const std::string &agent)
 sets the user agent ie: "Mozilla v3"
std::string userAgentString () const
 user agent string
void setUsername (const std::string &username)
 sets the auth username
std::string username () const
 auth username
void setPassword (const std::string &password)
 sets the auth password
std::string password () const
 auth password
std::string userPassword () const
 returns the user and password as a user:pass string
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 &proxyhost)
 proxy to use if it is enabled
std::string proxy () const
 proxy host
void setProxyUsername (const std::string &proxyuser)
 sets the proxy user
std::string proxyUsername () const
 proxy auth username
void setProxyPassword (const std::string &proxypass)
 sets the proxy password
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
long maxConcurrentConnections () const
 Maximum number of concurrent connections for a single transfer.
void setMaxConcurrentConnections (long v)
 Set maximum number of concurrent connections for a single transfer.
long minDownloadSpeed () const
 Minimum download speed (bytes per second) until the connection is dropped.
void setMinDownloadSpeed (long v)
 Set minimum download speed (bytes per second) until the connection is dropped.
long maxDownloadSpeed () const
 Maximum download speed (bytes per second)
void setMaxDownloadSpeed (long v)
 Set max download speed (bytes per second)
long maxSilentTries () const
 Maximum silent retries.
void setMaxSilentTries (long v)
 Set maximum silent retries.
bool verifyHostEnabled () const
 Whether to verify host for ssl.
void setVerifyHostEnabled (bool enabled)
 Sets whether to verify host for ssl.
bool verifyPeerEnabled () const
 Whether to verify peer for ssl.
void setVerifyPeerEnabled (bool enabled)
 Sets whether to verify host for ssl.
Pathname certificateAuthoritiesPath () const
 SSL certificate authorities path ( default: /etc/ssl/certs )
void setCertificateAuthoritiesPath (const zypp::Pathname &path)
 Sets the SSL certificate authorities path.
void setAuthType (const std::string &authtype)
 set the allowed authentication types
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
Pathname clientCertificatePath () const
 SSL client certificate file.
void setClientCertificatePath (const zypp::Pathname &path)
 Sets the SSL client certificate file.
Pathname clientKeyPath () const
 SSL client key file.
void setClientKeyPath (const zypp::Pathname &path)
 Sets the SSL client key file.

Protected Attributes

RWCOW_pointer< Impl_impl

Detailed Description

Holds transfer setting.

Definition at line 20 of file TransferSettings.h.


Member Typedef Documentation

typedef std::vector<std::string> zypp::media::TransferSettings::Headers

Definition at line 35 of file TransferSettings.h.


Constructor & Destructor Documentation

zypp::media::TransferSettings::TransferSettings ( )

Constructs a transfer program cmd line access.

Definition at line 86 of file TransferSettings.cc.

zypp::media::TransferSettings::TransferSettings ( const zypp::Url url)

Constructs the settings from a url object where.

authentication/proxy information can be extracted from the url


Member Function Documentation

void zypp::media::TransferSettings::reset ( )

reset the settings to the defaults

Definition at line 92 of file TransferSettings.cc.

References _impl, and zypp::RWCOW_pointer< _D, _Traits >::reset().

void zypp::media::TransferSettings::addHeader ( const std::string &  header)

add a header, on the form "Foo: Bar"

Definition at line 97 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaAccess::open(), and zypp::media::MediaCurl::setupEasy().

TransferSettings::Headers::const_iterator zypp::media::TransferSettings::headersBegin ( ) const

begin iterators to additional headers

Definition at line 102 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and zypp::media::MediaCurl::setupEasy().

TransferSettings::Headers::const_iterator zypp::media::TransferSettings::headersEnd ( ) const

end iterators to additional headers

Definition at line 107 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setUserAgentString ( const std::string &  agent)

sets the user agent ie: "Mozilla v3"

Definition at line 112 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaAria2c::attachTo(), and zypp::media::MediaCurl::setupEasy().

std::string zypp::media::TransferSettings::userAgentString ( ) const

user agent string

Definition at line 117 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setUsername ( const std::string &  username)
std::string zypp::media::TransferSettings::username ( ) const
void zypp::media::TransferSettings::setPassword ( const std::string &  password)
std::string zypp::media::TransferSettings::password ( ) const
std::string zypp::media::TransferSettings::userPassword ( ) const

returns the user and password as a user:pass string

Definition at line 149 of file TransferSettings.cc.

References password(), and username().

Referenced by zypp::media::MediaCurl::authenticate(), zypp::media::multifetchworker::multifetchworker(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setAnonymousAuth ( )

sets anonymous authentication (ie: for ftp)

Definition at line 137 of file TransferSettings.cc.

References setPassword(), and setUsername().

Referenced by zypp::media::fillSettingsFromUrl().

void zypp::media::TransferSettings::setProxyEnabled ( bool  enabled)

whether the proxy is used or not

Definition at line 158 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl(), and zypp::media::fillSettingsSystemProxy().

bool zypp::media::TransferSettings::proxyEnabled ( ) const

proxy is enabled

Definition at line 163 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setProxy ( const std::string &  proxyhost)

proxy to use if it is enabled

Definition at line 168 of file TransferSettings.cc.

References _impl, and proxy().

Referenced by zypp::media::fillSettingsFromUrl(), and zypp::media::fillSettingsSystemProxy().

std::string zypp::media::TransferSettings::proxy ( ) const
void zypp::media::TransferSettings::setProxyUsername ( const std::string &  proxyuser)

sets the proxy user

Definition at line 178 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl(), and zypp::media::fillSettingsSystemProxy().

std::string zypp::media::TransferSettings::proxyUsername ( ) const
void zypp::media::TransferSettings::setProxyPassword ( const std::string &  proxypass)

sets the proxy password

Definition at line 188 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl(), and zypp::media::fillSettingsSystemProxy().

std::string zypp::media::TransferSettings::proxyPassword ( ) const

proxy auth password

Definition at line 193 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and proxyUserPassword().

std::string zypp::media::TransferSettings::proxyUserPassword ( ) const

returns the proxy user and password as a user:pass string

Definition at line 198 of file TransferSettings.cc.

References proxyPassword(), and proxyUsername().

Referenced by zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setConnectTimeout ( long  t)

set the connect timeout

Definition at line 217 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::setupEasy().

long zypp::media::TransferSettings::connectTimeout ( ) const

connection timeout

Definition at line 222 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaMultiCurl::multifetch(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setTimeout ( long  t)

set the transfer timeout

Definition at line 207 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl(), and zypp::media::MediaCurl::setupEasy().

long zypp::media::TransferSettings::timeout ( ) const
long zypp::media::TransferSettings::maxConcurrentConnections ( ) const

Maximum number of concurrent connections for a single transfer.

Definition at line 227 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and zypp::media::MediaMultiCurl::multifetch().

void zypp::media::TransferSettings::setMaxConcurrentConnections ( long  v)

Set maximum number of concurrent connections for a single transfer.

Definition at line 232 of file TransferSettings.cc.

References _impl.

long zypp::media::TransferSettings::minDownloadSpeed ( ) const

Minimum download speed (bytes per second) until the connection is dropped.

Definition at line 237 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setMinDownloadSpeed ( long  v)

Set minimum download speed (bytes per second) until the connection is dropped.

Definition at line 242 of file TransferSettings.cc.

References _impl.

long zypp::media::TransferSettings::maxDownloadSpeed ( ) const

Maximum download speed (bytes per second)

Definition at line 247 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine(), zypp::media::MediaMultiCurl::multifetch(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setMaxDownloadSpeed ( long  v)

Set max download speed (bytes per second)

Definition at line 252 of file TransferSettings.cc.

References _impl.

long zypp::media::TransferSettings::maxSilentTries ( ) const

Maximum silent retries.

Definition at line 257 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillAriaCmdLine().

void zypp::media::TransferSettings::setMaxSilentTries ( long  v)

Set maximum silent retries.

Definition at line 262 of file TransferSettings.cc.

References _impl.

bool zypp::media::TransferSettings::verifyHostEnabled ( ) const

Whether to verify host for ssl.

Definition at line 267 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setVerifyHostEnabled ( bool  enabled)

Sets whether to verify host for ssl.

Definition at line 272 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl().

bool zypp::media::TransferSettings::verifyPeerEnabled ( ) const

Whether to verify peer for ssl.

Definition at line 277 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setVerifyPeerEnabled ( bool  enabled)

Sets whether to verify host for ssl.

Definition at line 303 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl().

Pathname zypp::media::TransferSettings::certificateAuthoritiesPath ( ) const

SSL certificate authorities path ( default: /etc/ssl/certs )

Definition at line 308 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setCertificateAuthoritiesPath ( const zypp::Pathname &  path)

Sets the SSL certificate authorities path.

Definition at line 313 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl().

void zypp::media::TransferSettings::setAuthType ( const std::string &  authtype)

set the allowed authentication types

Definition at line 318 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::authenticate(), zypp::media::fillSettingsFromUrl(), and zypp::media::multifetchworker::multifetchworker().

std::string zypp::media::TransferSettings::authType ( ) const

get the allowed authentication types

Definition at line 323 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::multifetchworker::multifetchworker(), and zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setHeadRequestsAllowed ( bool  allowed)

set whether HEAD requests are allowed

Definition at line 328 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl().

bool zypp::media::TransferSettings::headRequestsAllowed ( ) const

whether HEAD requests are allowed

Definition at line 333 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::doGetDoesFileExist().

Pathname zypp::media::TransferSettings::clientCertificatePath ( ) const

SSL client certificate file.

Definition at line 282 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setClientCertificatePath ( const zypp::Pathname &  path)

Sets the SSL client certificate file.

Definition at line 287 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl().

Pathname zypp::media::TransferSettings::clientKeyPath ( ) const

SSL client key file.

Definition at line 292 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::MediaCurl::setupEasy().

void zypp::media::TransferSettings::setClientKeyPath ( const zypp::Pathname &  path)

Sets the SSL client key file.

Definition at line 297 of file TransferSettings.cc.

References _impl.

Referenced by zypp::media::fillSettingsFromUrl().


Member Data Documentation


The documentation for this class was generated from the following files: