Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PMYouSettings Class Reference

#include <PMYouSettings.h>

Inheritance diagram for PMYouSettings:

CountedRep Rep List of all members.

Public Member Functions

 PMYouSettings ()
 PMYouSettings (const std::string &product, const std::string &version, const std::string &baseArch)
 ~PMYouSettings ()
void init (const std::string &product, const std::string &version, const std::string &baseArch)
PMError initProduct ()
void setMasterMedia (const PMYouMediaPtr &)
PMYouMediaPtr masterMedia ()
void setPathPrefix (const Pathname &)
Pathname pathPrefix ()
void filterExclusiveProducts (const std::list< std::string > &)
void setPatchServer (const PMYouServer &)
PMYouServer patchServer ()
void setUsernamePassword (const std::string &username, const std::string &password)
Url patchUrl ()
Pathname mediaPatchesFile ()
Pathname localDir ()
Pathname localWriteDir ()
Pathname attachPoint ()
Pathname rootAttachPoint ()
Pathname installDir ()
Pathname externalRpmDir ()
Pathname filesDir ()
std::string directoryFileName ()
std::string mediaMapFileName ()
Pathname cookiesFile ()
Pathname configFile ()
Pathname passwordFile ()
Pathname logFile ()
SysConfigconfig ()
void setLangCode (const LangCode &)
LangCode langCode () const
std::string locale () const
std::string defaultLocale () const
std::list< PMYouProductPtr > products () const
PMYouProductPtr primaryProduct () const
void setCheckSignatures (bool)
bool checkSignatures () const
void setReloadPatches (bool)
bool reloadPatches ()
void setNoExternalPackages (bool)
bool noExternalPackages () const
void setDryRun (bool)
bool dryRun () const
void setGetAll (bool)
bool getAll () const
void setGetOnly (bool)
bool getOnly () const
void setLogEnabled (bool)
bool isLogEnabled () const

Static Public Member Functions

std::string translateLangCode (const LangCode &lang)

Protected Member Functions

void init ()

Private Member Functions

 REP_BODY (PMYouSettings)

Private Attributes

PMYouMediaPtr _masterMedia
Pathname _pathPrefix
PMYouServer _patchServer
SysConfig_config
LangCode _lang
std::list< PMYouProductPtr > _products
bool _checkSignatures
bool _reloadPatches
bool _noExternalPackages
bool _dryRun
bool _getAll
bool _getOnly
bool _isLogEnabled

Detailed Description

This class provides general settings for YOU.


Constructor & Destructor Documentation

PMYouSettings::PMYouSettings  ) 
 

Constructor.

PMYouSettings::PMYouSettings const std::string &  product,
const std::string &  version,
const std::string &  baseArch
 

Constructor. Initialise object with values based on the given product, version and baseArch.

PMYouSettings::~PMYouSettings  ) 
 

Destructor


Member Function Documentation

Pathname PMYouSettings::attachPoint  ) 
 

Return directory used as attach point for media interface, i.e. for mounting CDs or NFS servers or for downloading files via FTP, HTTP etc. This function returns a writable location.

bool PMYouSettings::checkSignatures  )  const
 

Return true, if signatures should be checked, otherwise return false.

SysConfig * PMYouSettings::config  ) 
 

Return configuration object for file at configFile().

Pathname PMYouSettings::configFile  ) 
 

Return path to file used for storing configuration information.

Pathname PMYouSettings::cookiesFile  ) 
 

Return path to file used for storing cookies.

string PMYouSettings::defaultLocale  )  const
 

Return default locale. See locale().

string PMYouSettings::directoryFileName  ) 
 

Return name of file holding the list of patches in the "patches" directory.

bool PMYouSettings::dryRun  )  const
 

Return true, if the YOU run should be performed as dry run, i.e. without actually installing the patches, otherwise return false.

Pathname PMYouSettings::externalRpmDir  ) 
 

Return path to directory where external RPMs are stored.

Pathname PMYouSettings::filesDir  ) 
 

Return path to directory where extra files are stored.

void PMYouSettings::filterExclusiveProducts const std::list< std::string > &   ) 
 

Filter exclusive products. Remove all products which are not contained in the argument list. If the list is empty no products are removed.

bool PMYouSettings::getAll  )  const
 

Return true if all packages should be retrieved, not only the ones which actually will be installed, otherwise return false.

bool PMYouSettings::getOnly  )  const
 

Get if patches will only be retrived, but not installed.

void PMYouSettings::init  )  [protected]
 

void PMYouSettings::init const std::string &  product,
const std::string &  version,
const std::string &  baseArch
 

Init object with given product, version and baseArch values.

PMError PMYouSettings::initProduct  ) 
 

Read information about product (name, version, architecture, YOU URL, if the product is a business product, path on server and name of distproduct) and initialize object accordingly.

Pathname PMYouSettings::installDir  ) 
 

Return directory where information about installed patches is stored.

bool PMYouSettings::isLogEnabled  )  const
 

Return if the separate YOU log is enabled.

LangCode PMYouSettings::langCode  )  const [inline]
 

Return language code used for displaying messages to the user.

Pathname PMYouSettings::localDir  ) 
 

Return local base directory for you related files.

string PMYouSettings::locale  )  const
 

Return clear text locale as used by the patch file parser.

Pathname PMYouSettings::localWriteDir  ) 
 

Return local base directory for you related files suited for writing to it. This depends on the identity of the user. root gets a directory under /var, non-root users get a directory in their home directory.

Pathname PMYouSettings::logFile  ) 
 

Return path to file used for special YOU logs.

PMYouMediaPtr PMYouSettings::masterMedia  ) 
 

Return master media.

string PMYouSettings::mediaMapFileName  ) 
 

Return name of file holding the media map for the patches.

Pathname PMYouSettings::mediaPatchesFile  ) 
 

Return path to patch meta information file (aka media.1/patches).

bool PMYouSettings::noExternalPackages  )  const
 

Return true if external packages should be downloaded, otherwise return false.

Pathname PMYouSettings::passwordFile  ) 
 

Return path to file used for storing passwords.

PMYouServer PMYouSettings::patchServer  ) 
 

Return patch server where patches are read from.

Url PMYouSettings::patchUrl  ) 
 

Return base URL to patches. This doesn't include the product dependent path.

Pathname PMYouSettings::pathPrefix  ) 
 

Get patch prefix.

PMYouProductPtr PMYouSettings::primaryProduct  )  const
 

Return product which characterizes the installed system best.

list< PMYouProductPtr > PMYouSettings::products  )  const
 

Return products relevant for YOU updates.

bool PMYouSettings::reloadPatches  ) 
 

Return true if patches should be reloaded from the server, otherwise return false.

PMYouSettings::REP_BODY PMYouSettings   )  [private]
 

Pathname PMYouSettings::rootAttachPoint  ) 
 

Return directory used as attach point for media interface, i.e. for mounting CDs or NFS servers or for downloading files via FTP, HTTP etc. This function returns the location used by root.

void PMYouSettings::setCheckSignatures bool   ) 
 

Set if signatures should be checked or not.

void PMYouSettings::setDryRun bool   ) 
 

Set if the you run should be performed as dry run, i.e. without actually installing the patches.

void PMYouSettings::setGetAll bool   ) 
 

Set if all packages should be retrieved, not only the ones which actually will be installed.

void PMYouSettings::setGetOnly bool   ) 
 

Set if patches will only be retrived, but not installed.

void PMYouSettings::setLangCode const LangCode  ) 
 

Set language code used for displaying messages to the user. If the language code argument is empty, the preferred YaST locale is set.

void PMYouSettings::setLogEnabled bool   ) 
 

Enable writing of separate YOU log.

void PMYouSettings::setMasterMedia const PMYouMediaPtr &   ) 
 

Set master media. This is used as reference for testing other media instances.

void PMYouSettings::setNoExternalPackages bool   ) 
 

Set if external packages should be downloaded.

void PMYouSettings::setPatchServer const PMYouServer  ) 
 

Set patch server where patches are read from.

void PMYouSettings::setPathPrefix const Pathname  ) 
 

Set path prefix. This is the path read from the file "media.1/patches". It is prepended to the product dependent path to the patches.

void PMYouSettings::setReloadPatches bool   ) 
 

Set if patches should be reloaded from the server.

void PMYouSettings::setUsernamePassword const std::string &  username,
const std::string &  password
 

Set username and password for current server.

string PMYouSettings::translateLangCode const LangCode lang  )  [static]
 

Translate standard lang code into full language name as used in patch info files.


Member Data Documentation

bool PMYouSettings::_checkSignatures [private]
 

SysConfig* PMYouSettings::_config [private]
 

bool PMYouSettings::_dryRun [private]
 

bool PMYouSettings::_getAll [private]
 

bool PMYouSettings::_getOnly [private]
 

bool PMYouSettings::_isLogEnabled [private]
 

LangCode PMYouSettings::_lang [private]
 

PMYouMediaPtr PMYouSettings::_masterMedia [private]
 

bool PMYouSettings::_noExternalPackages [private]
 

PMYouServer PMYouSettings::_patchServer [private]
 

Pathname PMYouSettings::_pathPrefix [private]
 

std::list<PMYouProductPtr> PMYouSettings::_products [private]
 

bool PMYouSettings::_reloadPatches [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:33 2007 for yast2-packagemanager by doxygen 1.3.6