zypp::SourceCache Class Reference

#include <SourceCache.h>

List of all members.

Public Member Functions

 SourceCache ()
 Default ctor.
 ~SourceCache ()
 Dtor.
void setCacheDir (const Pathname &dir_r)
void storeSource (Source_Ref src)
void restoreSources ()
void removeSource (unsigned id)
void removeSource (const Url &url_r, const Pathname &path_r="/")

Static Private Attributes

static Pathname _cache_dir
 directory to store cached data
static unsigned _next_cache_id
 counter of caches

Friends

std::ostream & operator<< (std::ostream &str, const SourceCache &obj)
 Stream output.


Detailed Description

Definition at line 35 of file SourceCache.h.


Constructor & Destructor Documentation

zypp::SourceCache::SourceCache (  ) 

Default ctor.

Definition at line 46 of file SourceCache.cc.

zypp::SourceCache::~SourceCache (  ) 

Dtor.

Definition at line 54 of file SourceCache.cc.


Member Function Documentation

void zypp::SourceCache::setCacheDir ( const Pathname &  dir_r  ) 

Definition at line 57 of file SourceCache.cc.

References _cache_dir.

void zypp::SourceCache::storeSource ( Source_Ref  src  ) 

Definition at line 62 of file SourceCache.cc.

References _cache_dir, _next_cache_id, zypp::Source_Ref::alias(), zypp::Url::asCompleteString(), zypp::filesystem::assert_dir(), zypp::ui::asString(), zypp::str::hexstring(), zypp::Source_Ref::path(), zypp::Source_Ref::storeMetadata(), zypp::Source_Ref::url(), url, and ZYPP_THROW.

void zypp::SourceCache::restoreSources (  ) 

Definition at line 79 of file SourceCache.cc.

References _cache_dir, zypp::ui::asString(), zypp::str::getline(), zypp::filesystem::readdir(), zypp::SourceManager::sourceManager(), url, and ZYPP_THROW.

void zypp::SourceCache::removeSource ( unsigned  id  ) 

Definition at line 101 of file SourceCache.cc.

References _cache_dir, _next_cache_id, zypp::str::hexstring(), zypp::filesystem::recursive_rmdir(), and ZYPP_THROW.

void zypp::SourceCache::removeSource ( const Url url_r,
const Pathname &  path_r = "/" 
)

Definition at line 108 of file SourceCache.cc.

References _cache_dir, zypp::Url::asCompleteString(), zypp::ui::asString(), zypp::str::getline(), zypp::filesystem::readdir(), zypp::filesystem::recursive_rmdir(), url, and ZYPP_THROW.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const SourceCache obj 
) [friend]

Stream output.

Definition at line 137 of file SourceCache.cc.


Member Data Documentation

Pathname zypp::SourceCache::_cache_dir [static, private]

directory to store cached data

Definition at line 58 of file SourceCache.h.

Referenced by removeSource(), restoreSources(), setCacheDir(), and storeSource().

unsigned zypp::SourceCache::_next_cache_id [static, private]

counter of caches

Definition at line 60 of file SourceCache.h.

Referenced by removeSource(), and storeSource().


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 16:49:37 2006 for zypp by  doxygen 1.5.0