libzypp 17.31.23
mediaconfig.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_MEDIA_MEDIACONFIG_H
13#define ZYPP_MEDIA_MEDIACONFIG_H
14
15#include <zypp-core/base/NonCopyable.h>
16#include <zypp-core/Pathname.h>
17#include <zypp-core/zyppng/base/zyppglobal.h>
18#include <memory>
19#include <string>
20
21namespace zypp {
22
23 class MediaConfigPrivate;
24
43 {
44 ZYPP_DECLARE_PRIVATE(MediaConfig)
45 public:
46
48 static MediaConfig & instance();
49
50 bool setConfigValue ( const std::string &section, const std::string &entry, const std::string &value );
51
56
61
66
71 long download_min_download_speed() const;
72
76 long download_max_download_speed() const;
77
81 long download_max_silent_tries() const;
82
86 long download_transfer_timeout() const;
87
91 long download_connect_timeout() const;
92
93 private:
95 std::unique_ptr<MediaConfigPrivate> d_ptr;
96 };
97
98}
99
100#endif
Pathname credentialsGlobalFile() const
Definition: mediaconfig.cc:102
long download_max_download_speed() const
Definition: mediaconfig.cc:115
Pathname credentialsGlobalDir() const
Definition: mediaconfig.cc:95
long download_min_download_speed() const
Definition: mediaconfig.cc:112
long download_connect_timeout() const
Definition: mediaconfig.cc:124
long download_max_concurrent_connections() const
Definition: mediaconfig.cc:109
std::unique_ptr< MediaConfigPrivate > d_ptr
Definition: mediaconfig.h:95
bool setConfigValue(const std::string &section, const std::string &entry, const std::string &value)
Definition: mediaconfig.cc:52
static MediaConfig & instance()
Definition: mediaconfig.cc:46
long download_transfer_timeout() const
Definition: mediaconfig.cc:121
long download_max_silent_tries() const
Definition: mediaconfig.cc:118
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2