libzypp 17.37.10

zypp::MediaConfig Class Reference
Zypp Configuration Options

`#include <zypp-media/mediaconfig.h>`

Inheritance diagram for zypp::MediaConfig:

## Public Member Functions
bool | setConfigValue (const std::string &section, const std::string &entry, const std::string &value)
Pathname | credentialsGlobalDir () const
Pathname | credentialsGlobalFile () const
long | download_max_concurrent_connections () const
long | download_min_download_speed () const
long | download_max_download_speed () const
long | download_max_silent_tries () const
long | download_transfer_timeout () const
long | download_connect_timeout () const

## Static Public Member Functions
static MediaConfig & | instance ()

## Private Member Functions
| MediaConfig ()

## Private Attributes
std::unique_ptr< MediaConfigPrivate > | d_ptr

## Detailed Description

Helper class to collect global options and settings related to zypp-media. Use it to avoid hardcoded values and calls to getZYpp() just to retrieve some value like credentials path or download related settings.

Note, if you add settings to this file, please follow the following convention:

namespace.settingname

should become

namespace_settingName()

Definition at line 42 of file mediaconfig.h.

## Constructor & Destructor Documentation

## ◆ MediaConfig()

zypp::MediaConfig::MediaConfig | ( |  | ) |
| private

Definition at line 43 of file mediaconfig.cc.

## Member Function Documentation

## ◆ instance()

MediaConfig & zypp::MediaConfig::instance | ( |  | ) |
| static

Singleton ctor

Definition at line 46 of file mediaconfig.cc.

## ◆ setConfigValue()

bool zypp::MediaConfig::setConfigValue | ( | const std::string & | section,
|  | const std::string & | entry,
|  | const std::string & | value )

Definition at line 52 of file mediaconfig.cc.

## ◆ credentialsGlobalDir()

Pathname zypp::MediaConfig::credentialsGlobalDir | ( |  | ) | const

Defaults to /etc/zypp/credentials.d

Definition at line 95 of file mediaconfig.cc.

## ◆ credentialsGlobalFile()

Pathname zypp::MediaConfig::credentialsGlobalFile | ( |  | ) | const

Defaults to /etc/zypp/credentials.cat

Definition at line 102 of file mediaconfig.cc.

## ◆ download_max_concurrent_connections()

long zypp::MediaConfig::download_max_concurrent_connections | ( |  | ) | const

Maximum number of concurrent connections for a single transfer

Definition at line 109 of file mediaconfig.cc.

## ◆ download_min_download_speed()

long zypp::MediaConfig::download_min_download_speed | ( |  | ) | const

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

Definition at line 112 of file mediaconfig.cc.

## ◆ download_max_download_speed()

long zypp::MediaConfig::download_max_download_speed | ( |  | ) | const

Maximum download speed (bytes per second)

Definition at line 115 of file mediaconfig.cc.

## ◆ download_max_silent_tries()

long zypp::MediaConfig::download_max_silent_tries | ( |  | ) | const

Maximum silent tries

Definition at line 118 of file mediaconfig.cc.

## ◆ download_transfer_timeout()

long zypp::MediaConfig::download_transfer_timeout | ( |  | ) | const

Maximum time in seconds that you allow a transfer operation to take.

Definition at line 121 of file mediaconfig.cc.

## ◆ download_connect_timeout()

long zypp::MediaConfig::download_connect_timeout | ( |  | ) | const

Maximum time in seconds that you allow the connection phase to the server to take.

Definition at line 124 of file mediaconfig.cc.

## Member Data Documentation

## ◆ d_ptr

std::unique_ptr<MediaConfigPrivate> zypp::MediaConfig::d_ptr
| private

Definition at line 95 of file mediaconfig.h.

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

- zypp-media/mediaconfig.h
- zypp-media/mediaconfig.cc