ZConfig.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_ZCONFIG_H
00013 #define ZYPP_ZCONFIG_H
00014 
00015 #include <iosfwd>
00016 #include <set>
00017 #include <string>
00018 
00019 #include "zypp/base/Deprecated.h"
00020 #include "zypp/base/NonCopyable.h"
00021 #include "zypp/base/PtrTypes.h"
00022 
00023 #include "zypp/Arch.h"
00024 #include "zypp/Locale.h"
00025 #include "zypp/Pathname.h"
00026 #include "zypp/IdString.h"
00027 
00028 #include "zypp/DownloadMode.h"
00029 #include "zypp/target/rpm/RpmFlags.h"
00030 
00032 namespace zypp
00033 { 
00034 
00036   //
00037   //    CLASS NAME : ZConfig
00038   //
00057   class ZConfig : private base::NonCopyable
00058   {
00059     public:
00060 
00062       static ZConfig & instance();
00063 
00065       std::ostream & about( std::ostream & str ) const;
00066 
00067     public:
00068 
00072       Pathname systemRoot() const;
00073 
00074     public:
00075 
00077       static Arch defaultSystemArchitecture();
00078 
00080       Arch systemArchitecture() const;
00081 
00088       void setSystemArchitecture( const Arch & arch_r );
00089 
00091       void resetSystemArchitecture()
00092       { setSystemArchitecture( defaultSystemArchitecture() ); }
00093 
00094     public:
00097       static Locale defaultTextLocale();
00098 
00101       Locale textLocale() const;
00102 
00104       void setTextLocale( const Locale & locale_r );
00105 
00107       void resetTextLocale()
00108       { setTextLocale( defaultTextLocale() ); }
00109 
00110     public:
00115       Pathname repoCachePath() const;
00116 
00121       Pathname repoMetadataPath() const;
00122 
00127       Pathname repoSolvfilesPath() const;
00128 
00133       Pathname repoPackagesPath() const;
00134 
00139       Pathname configPath() const;
00140 
00145       Pathname knownReposPath() const;
00146 
00151       Pathname knownServicesPath() const;
00152 
00158       bool repo_add_probe() const;
00159 
00163       unsigned repo_refresh_delay() const;
00164 
00170       bool repoLabelIsAlias() const;
00171 
00179       void repoLabelIsAlias( bool yesno_r );
00180 
00184       long download_max_concurrent_connections() const;
00185 
00190       long download_min_download_speed() const;
00191 
00195       long download_max_download_speed() const;
00196 
00200       long download_max_silent_tries() const;
00201 
00202 
00206       bool download_use_deltarpm() const;
00207 
00212       bool download_use_deltarpm_always() const;
00213 
00218       bool download_media_prefer_download() const;
00220       bool download_media_prefer_volatile() const
00221       { return ! download_media_prefer_download(); }
00225       void set_download_media_prefer_download( bool yesno_r );
00229       void set_default_download_media_prefer_download();
00230 
00234       DownloadMode commit_downloadMode() const;
00235 
00240       Pathname vendorPath() const;
00241 
00245       bool solver_onlyRequires() const;
00246 
00251       Pathname solver_checkSystemFile() const;
00252 
00256       bool solver_allowVendorChange() const;
00257 
00261       bool solver_cleandepsOnRemove() const;
00262 
00270       unsigned solver_upgradeTestcasesToKeep() const;
00271 
00285       bool solverUpgradeRemoveDroppedPackages() const;
00287       void setSolverUpgradeRemoveDroppedPackages( bool val_r );
00289       void resetSolverUpgradeRemoveDroppedPackages();
00290 
00297       const std::set<std::string> & multiversionSpec() const;
00298       void addMultiversionSpec( const std::string & name_r );
00299       void removeMultiversionSpec( const std::string & name_r );
00301 
00306       Pathname locksFile() const;
00307 
00311       bool apply_locks_file() const;
00312 
00316       Pathname update_dataPath() const;
00317 
00322       Pathname update_scriptsPath() const;
00323 
00328       Pathname update_messagesPath() const;
00329 
00333       std::string updateMessagesNotify() const;
00335       void setUpdateMessagesNotify( const std::string & val_r );
00337       void resetUpdateMessagesNotify();
00339 
00348       target::rpm::RpmInstFlags rpmInstallFlags() const;
00350 
00357       Pathname historyLogFile() const;
00358 
00362       Pathname credentialsGlobalDir() const;
00363 
00367       Pathname credentialsGlobalFile() const;
00368 
00369 
00378       std::string distroverpkg() const;
00379 
00380     public:
00381       class Impl;
00383       ~ZConfig();
00384     private:
00385       friend class Impl;
00387       ZConfig();
00389       RW_pointer<Impl, rw_pointer::Scoped<Impl> > _pimpl;
00390   };
00392 
00394 } // namespace zypp
00396 #endif // ZYPP_ZCONFIG_H
Generated on Fri Mar 2 09:45:55 2012 for libzypp by  doxygen 1.6.3