zypp::ZConfig Class Reference

Interim helper class to collect global options and settings. More...

#include <ZConfig.h>

Inheritance diagram for zypp::ZConfig:
[legend]

List of all members.

Public Member Functions

Arch systemArchitecture () const
 The zypp system architecture.
void overrideSystemArchitecture (const Arch &)
 Override the zypp system architecture, useful for test scenarious.
Locale textLocale () const
 The prefered locale for translated labels, descriptions, descriptions, etc.
Pathname repoMetadataPath () const
 Path where the repo metadata is downloaded and kept.
Pathname repoCachePath () const
 Path where the processed cache is kept (this is where zypp.db is located.
Pathname knownReposPath () const
 Path where the known repositories .repo files are kept.
const std::string & cacheDBSplitJoinSeparator () const
 Separator string for storing/reading sets of strings to/from metadata cache DB.
bool repo_add_probe () const
 Whether repository urls should be probed.
unsigned repo_refresh_delay () const
 Amount of time in minutes that must pass before another refresh.
bool download_use_patchrpm () const
 Whether to consider using a patchrpm when downloading a package.
bool download_use_deltarpm () const
 Whether to consider using a deltarpm when downloading a package.
bool autolock_untrustedvendor () const
 Whether untrusted vendor should be autolocked / config option repo.add.probe.
 ~ZConfig ()
 Dtor.

Static Public Member Functions

static ZConfiginstance ()
 Singleton ctor.

Private Member Functions

 ZConfig ()
 Default ctor.

Private Attributes

RW_pointer< Impl,
rw_pointer::Scoped
< Impl > > 
_pimpl
 Pointer to implementation.

Classes

class  Impl
 ZConfig implementation. More...


Detailed Description

Interim helper class to collect global options and settings.

Use it to avoid hardcoded values and calls to getZYpp() just to retrieve some value like architecture, languages or tmppath.

It reads /etc/zypp/zypp.conf, the filename can be overridden by setting the ZYPP_CONF environment variable to a different file.

Definition at line 41 of file ZConfig.h.


Constructor & Destructor Documentation

zypp::ZConfig::~ZConfig (  ) 

Dtor.

Definition at line 176 of file ZConfig.cc.

zypp::ZConfig::ZConfig (  )  [private]

Default ctor.

Definition at line 165 of file ZConfig.cc.


Member Function Documentation

ZConfig & zypp::ZConfig::instance (  )  [static]

Singleton ctor.

Definition at line 154 of file ZConfig.cc.

Referenced by zypp::RepoManager::addRepository(), zypp::cache::CacheStore::appendStringContainerAttribute(), zypp::VendorAttr::autoProtect(), zypp::RepoManager::checkIfToRefreshMetadata(), zypp::parser::yum::ProductFileReader::Impl::consumeNode(), zypp::parser::yum::PatchFileReader::Impl::consumePackageNode(), zypp::repo::PackageProvider::doProvidePackage(), zypp::repo::susetags::Downloader::download(), zypp::repo::RepoVariablesStringReplacer::operator()(), zypp::parser::susetags::ContentFileReader::parse(), zypp::parser::susetags::RepoParser::Impl::parse(), zypp::cache::ResolvableQuery::queryStringContainerAttribute(), zypp::RepoManagerOptions::RepoManagerOptions(), and zypp::TranslatedText::Impl::text().

Arch zypp::ZConfig::systemArchitecture (  )  const

The zypp system architecture.

Definition at line 187 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::parser::yum::PatchFileReader::Impl::consumePackageNode(), zypp::repo::susetags::Downloader::download(), zypp::repo::RepoVariablesStringReplacer::operator()(), and zypp::parser::susetags::RepoParser::Impl::parse().

void zypp::ZConfig::overrideSystemArchitecture ( const Arch arch  ) 

Override the zypp system architecture, useful for test scenarious.

This should be used for testing/debugging only since the Target backend won't be able to install incompatible packages !! DONT use for normal application unless you know what you're doing.

Definition at line 200 of file ZConfig.cc.

References _pimpl, and WAR.

Locale zypp::ZConfig::textLocale (  )  const

The prefered locale for translated labels, descriptions, descriptions, etc.

passed to the UI.

Definition at line 212 of file ZConfig.cc.

Referenced by zypp::TranslatedText::Impl::text().

Pathname zypp::ZConfig::repoMetadataPath (  )  const

Path where the repo metadata is downloaded and kept.

Definition at line 217 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::RepoManagerOptions::RepoManagerOptions().

Pathname zypp::ZConfig::repoCachePath (  )  const

Path where the processed cache is kept (this is where zypp.db is located.

Definition at line 223 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::RepoManagerOptions::RepoManagerOptions().

Pathname zypp::ZConfig::knownReposPath (  )  const

Path where the known repositories .repo files are kept.

Definition at line 229 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::RepoManagerOptions::RepoManagerOptions().

const std::string & zypp::ZConfig::cacheDBSplitJoinSeparator (  )  const

Separator string for storing/reading sets of strings to/from metadata cache DB.

Definition at line 235 of file ZConfig.cc.

bool zypp::ZConfig::repo_add_probe (  )  const

Whether repository urls should be probed.

/ config option repo.add.probe

Definition at line 241 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::RepoManager::addRepository().

unsigned zypp::ZConfig::repo_refresh_delay (  )  const

Amount of time in minutes that must pass before another refresh.

Definition at line 246 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::RepoManager::checkIfToRefreshMetadata().

bool zypp::ZConfig::download_use_patchrpm (  )  const

Whether to consider using a patchrpm when downloading a package.

Config option download.use_patchrpm (true)

Definition at line 251 of file ZConfig.cc.

References _pimpl.

Referenced by zypp::repo::PackageProvider::doProvidePackage().

bool zypp::ZConfig::download_use_deltarpm (  )  const

Whether to consider using a deltarpm when downloading a package.

Config option download.use_deltarpm (true)

Definition at line 254 of file ZConfig.cc.

References _pimpl.

bool zypp::ZConfig::autolock_untrustedvendor (  )  const

Whether untrusted vendor should be autolocked / config option repo.add.probe.

Definition at line 257 of file ZConfig.cc.

References _pimpl.


Member Data Documentation

RW_pointer<Impl, rw_pointer::Scoped<Impl> > zypp::ZConfig::_pimpl [private]

Pointer to implementation.

Definition at line 122 of file ZConfig.h.

Referenced by autolock_untrustedvendor(), download_use_deltarpm(), download_use_patchrpm(), knownReposPath(), overrideSystemArchitecture(), repo_add_probe(), repo_refresh_delay(), repoCachePath(), repoMetadataPath(), and systemArchitecture().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:17 2007 for libzypp by  doxygen 1.5.3