libzypp  17.14.0
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 #include "zypp/TriBool.h"
28 
29 #include "zypp/DownloadMode.h"
31 
33 namespace zypp
34 {
35 
37  //
38  // CLASS NAME : ZConfig
39  //
59  class ZConfig : private base::NonCopyable
60  {
61  public:
62 
64  static ZConfig & instance();
65 
67  std::ostream & about( std::ostream & str ) const;
68 
69  public:
70 
74  Pathname systemRoot() const;
75 
79  Pathname repoManagerRoot() const;
80 
84  void setRepoManagerRoot ( const Pathname &root );
85 
86  public:
87 
90 
92  Arch systemArchitecture() const;
93 
100  void setSystemArchitecture( const Arch & arch_r );
101 
105 
106  public:
109  static Locale defaultTextLocale();
110 
113  Locale textLocale() const;
114 
116  void setTextLocale( const Locale & locale_r );
117 
121 
122  public:
128  bool hasUserData() const;
129 
131  std::string userData() const;
132 
137  bool setUserData( const std::string & str_r );
139 
140  public:
145  Pathname repoCachePath() const;
146 
150  void setRepoCachePath ( const Pathname &path_r );
151 
155  Pathname pubkeyCachePath() const;
156 
161  Pathname repoMetadataPath() const;
162 
163 
167  void setRepoMetadataPath ( const Pathname &path_r );
168 
173  Pathname repoSolvfilesPath() const;
174 
178  void setRepoSolvfilesPath ( const Pathname &path_r );
179 
184  Pathname repoPackagesPath() const;
185 
189  void setRepoPackagesPath ( const Pathname &path_r );
190 
195  Pathname configPath() const;
196 
201  Pathname knownReposPath() const;
202 
207  Pathname knownServicesPath() const;
208 
213  Pathname needrebootFile() const;
214 
219  Pathname needrebootPath() const;
220 
226  Pathname varsPath() const;
227 
233  bool repo_add_probe() const;
234 
238  unsigned repo_refresh_delay() const;
239 
244 
250  bool repoLabelIsAlias() const;
251 
259  void repoLabelIsAlias( bool yesno_r );
260 
265 
270  long download_min_download_speed() const;
271 
275  long download_max_download_speed() const;
276 
280  long download_max_silent_tries() const;
281 
285  long download_transfer_timeout() const;
286 
287 
291  bool download_use_deltarpm() const;
292 
297  bool download_use_deltarpm_always() const;
298 
303  bool download_media_prefer_download() const;
306  { return ! download_media_prefer_download(); }
310  void set_download_media_prefer_download( bool yesno_r );
315 
320  Pathname download_mediaMountdir() const;
322  void set_download_mediaMountdir( Pathname newval_r );
325 
330 
344  bool gpgCheck() const;
345  TriBool repoGpgCheck() const;
346  TriBool pkgGpgCheck() const;
347 
348  void setGpgCheck( bool val_r );
349  void setRepoGpgCheck( TriBool val_r );
350  void setPkgGpgCheck( TriBool val_r );
351 
352  void resetGpgCheck();
353  void resetRepoGpgCheck();
354  void resetPkgGpgCheck();
355 
356  //
361  Pathname vendorPath() const;
362 
366  bool solver_onlyRequires() const;
367 
372  Pathname solver_checkSystemFile() const;
373 
379  Pathname solver_checkSystemFileDir() const;
380 
384  bool solver_allowVendorChange() const;
385 
387  bool solver_dupAllowDowngrade() const;
388 
390  bool solver_dupAllowNameChange() const;
391 
393  bool solver_dupAllowArchChange() const;
394 
396  bool solver_dupAllowVendorChange() const;
397 
401  bool solver_cleandepsOnRemove() const;
402 
410  unsigned solver_upgradeTestcasesToKeep() const;
411 
427  void setSolverUpgradeRemoveDroppedPackages( bool val_r );
430 
441  const std::set<std::string> & multiversionSpec() const;
442  void multiversionSpec( std::set<std::string> new_r );
443  void clearMultiversionSpec();
444  void addMultiversionSpec( const std::string & name_r );
445  void removeMultiversionSpec( const std::string & name_r );
447 
452  Pathname locksFile() const;
453 
457  bool apply_locks_file() const;
458 
462  Pathname update_dataPath() const;
463 
468  Pathname update_scriptsPath() const;
469 
474  Pathname update_messagesPath() const;
475 
479  std::string updateMessagesNotify() const;
481  void setUpdateMessagesNotify( const std::string & val_r );
485 
494  target::rpm::RpmInstFlags rpmInstallFlags() const;
496 
503  Pathname historyLogFile() const;
504 
508  Pathname credentialsGlobalDir() const;
509 
513  Pathname credentialsGlobalFile() const;
514 
523  std::string distroverpkg() const;
524 
530  Pathname pluginsPath() const;
531 
533  public:
534  class Impl;
536  ~ZConfig();
537  private:
538  friend class Impl;
540  ZConfig();
543  };
545 
547 } // namespace zypp
549 #endif // ZYPP_ZCONFIG_H