libzypp  11.13.5
ZConfig.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_ZCONFIG_H
13 #define ZYPP_ZCONFIG_H
14 
15 #include <iosfwd>
16 #include <set>
17 #include <string>
18 
19 #include "zypp/APIConfig.h"
20 #include "zypp/base/NonCopyable.h"
21 #include "zypp/base/PtrTypes.h"
22 
23 #include "zypp/Arch.h"
24 #include "zypp/Locale.h"
25 #include "zypp/Pathname.h"
26 #include "zypp/IdString.h"
27 
28 #include "zypp/DownloadMode.h"
30 
32 namespace zypp
33 {
34 
36  //
37  // CLASS NAME : ZConfig
38  //
58  class ZConfig : private base::NonCopyable
59  {
60  public:
61 
63  static ZConfig & instance();
64 
66  std::ostream & about( std::ostream & str ) const;
67 
68  public:
69 
73  Pathname systemRoot() const;
74 
75  public:
76 
79 
81  Arch systemArchitecture() const;
82 
89  void setSystemArchitecture( const Arch & arch_r );
90 
94 
95  public:
98  static Locale defaultTextLocale();
99 
102  Locale textLocale() const;
103 
105  void setTextLocale( const Locale & locale_r );
106 
110 
111  public:
116  Pathname repoCachePath() const;
117 
122  Pathname repoMetadataPath() const;
123 
128  Pathname repoSolvfilesPath() const;
129 
134  Pathname repoPackagesPath() const;
135 
140  Pathname configPath() const;
141 
146  Pathname knownReposPath() const;
147 
152  Pathname knownServicesPath() const;
153 
159  bool repo_add_probe() const;
160 
164  unsigned repo_refresh_delay() const;
165 
170 
176  bool repoLabelIsAlias() const;
177 
185  void repoLabelIsAlias( bool yesno_r );
186 
191 
196  long download_min_download_speed() const;
197 
201  long download_max_download_speed() const;
202 
206  long download_max_silent_tries() const;
207 
211  long download_transfer_timeout() const;
212 
213 
217  bool download_use_deltarpm() const;
218 
223  bool download_use_deltarpm_always() const;
224 
229  bool download_media_prefer_download() const;
232  { return ! download_media_prefer_download(); }
236  void set_download_media_prefer_download( bool yesno_r );
241 
246 
251  Pathname vendorPath() const;
252 
256  bool solver_onlyRequires() const;
257 
262  Pathname solver_checkSystemFile() const;
263 
267  bool solver_allowVendorChange() const;
268 
272  bool solver_cleandepsOnRemove() const;
273 
281  unsigned solver_upgradeTestcasesToKeep() const;
282 
298  void setSolverUpgradeRemoveDroppedPackages( bool val_r );
301 
308  const std::set<std::string> & multiversionSpec() const;
309  void addMultiversionSpec( const std::string & name_r );
310  void removeMultiversionSpec( const std::string & name_r );
312 
317  Pathname locksFile() const;
318 
322  bool apply_locks_file() const;
323 
327  Pathname update_dataPath() const;
328 
333  Pathname update_scriptsPath() const;
334 
339  Pathname update_messagesPath() const;
340 
344  std::string updateMessagesNotify() const;
346  void setUpdateMessagesNotify( const std::string & val_r );
350 
359  target::rpm::RpmInstFlags rpmInstallFlags() const;
361 
368  Pathname historyLogFile() const;
369 
373  Pathname credentialsGlobalDir() const;
374 
378  Pathname credentialsGlobalFile() const;
379 
388  std::string distroverpkg() const;
389 
395  Pathname pluginsPath() const;
396 
398  public:
399  class Impl;
401  ~ZConfig();
402  private:
403  friend class Impl;
405  ZConfig();
408  };
410 
412 } // namespace zypp
414 #endif // ZYPP_ZCONFIG_H