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 = "/var/adm/ZYPP/SourceCache"
 directory to store cached data
static unsigned _next_cache_id = 0
 counter of caches

Friends

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


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::filesystem::Pathname::asString(), zypp::bit::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::bit::asString(), zypp::iostr::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::bit::asString(), zypp::iostr::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 = "/var/adm/ZYPP/SourceCache" [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 = 0 [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 Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6