zypp::source::susetags::SuseTagsImpl Class Reference

#include <SuseTagsImpl.h>

Inheritance diagram for zypp::source::susetags::SuseTagsImpl:

zypp::source::SourceImpl zypp::base::ReferenceCounted zypp::base::ProvideNumericId< SourceImpl, Source_Ref::NumericId > NonCopyable List of all members.

Public Types

typedef intrusive_ptr< SuseTagsImplPtr
typedef intrusive_ptr< const
SuseTagsImpl
constPtr

Public Member Functions

 SuseTagsImpl ()
 Default Ctor.
 ~SuseTagsImpl ()
 Dtor.
virtual void createResolvables (Source_Ref source_r)
 Late initialize the ResStore.
virtual ResStore provideResolvables (Source_Ref source_r, zypp::Resolvable::Kind kind)
 Provide only resolvables of a certain kind.
virtual std::string type (void) const
virtual unsigned numberOfMedia (void) const
virtual std::string vendor (void) const
virtual const std::list< PathnamepublicKeys ()
virtual std::string unique_id (void) const
Pathname sourceDir (const std::string &dir)
virtual void storeMetadata (const Pathname &cache_dir_r)
virtual media::MediaVerifierRef verifier (media::MediaNr media_nr)
 Get media verifier for the specified media.

Static Public Member Functions

static std::string typeString (void)
 Text used for identifying the type of the source.

Public Attributes

std::map< NVRA, SuseTagsPackageImplData_package_data
std::map< NVRA, bool > _is_shared
std::list< std::string > _pkg_translations

Protected Member Functions

virtual std::ostream & dumpOn (std::ostream &str) const
 Stream output.
void initCacheDir (const Pathname &cache_dir_r)
bool cacheExists ()

Private Member Functions

virtual void factoryInit ()
 Ctor substitute.
void readContentFile ()
void provideProducts (Source_Ref source_r, ResStore &store)
void providePackages (Source_Ref source_r, ResStore &store)
void provideSelections (Source_Ref source_r, ResStore &store)
void provideSelection (Source_Ref source_r, ResStore &store)
void providePatterns (Source_Ref source_r, ResStore &store)
bool verifyChecksumsMode ()
 verify media mode (use the new META tags)
void verifyFile (const Pathname &path, const std::string &key)
 Verify file checksum.

Private Attributes

unsigned _media_count
Pathname _descr_dir
Pathname _data_dir
Pathname _orig_descr_dir
Pathname _content_file
Pathname _content_file_sig
Pathname _content_file_key
std::string _vendor
std::string _media_id
detail::ResImplTraits< SuseTagsProductImpl
>::Ptr 
_prodImpl
 pointer to the product implementation we need it to access the checksums if we are in verify mode
Product::Ptr _product

Detailed Description

Definition at line 54 of file SuseTagsImpl.h.


Member Typedef Documentation

typedef intrusive_ptr<SuseTagsImpl> zypp::source::susetags::SuseTagsImpl::Ptr
 

Definition at line 57 of file SuseTagsImpl.h.

typedef intrusive_ptr<const SuseTagsImpl> zypp::source::susetags::SuseTagsImpl::constPtr
 

Definition at line 58 of file SuseTagsImpl.h.


Constructor & Destructor Documentation

zypp::source::susetags::SuseTagsImpl::SuseTagsImpl  ) 
 

Default Ctor.

Just initilizes data members. Metadata retrieval is delayed untill factoryInit.

Definition at line 50 of file SuseTagsImpl.cc.

zypp::source::susetags::SuseTagsImpl::~SuseTagsImpl  ) 
 

Dtor.

Definition at line 338 of file SuseTagsImpl.cc.


Member Function Documentation

void zypp::source::susetags::SuseTagsImpl::createResolvables Source_Ref  source_r  )  [virtual]
 

Late initialize the ResStore.

Reimplemented from zypp::source::SourceImpl.

Definition at line 265 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::_store, zypp::source::CreateSourceReport::NO_ERROR, providePackages(), providePatterns(), provideProducts(), provideSelections(), and zypp::source::SourceImpl::url().

ResStore zypp::source::susetags::SuseTagsImpl::provideResolvables Source_Ref  source_r,
zypp::Resolvable::Kind  kind
[virtual]
 

Provide only resolvables of a certain kind.

Reimplemented from zypp::source::SourceImpl.

Definition at line 312 of file SuseTagsImpl.cc.

References zypp::source::CreateSourceReport::NO_ERROR, providePackages(), providePatterns(), provideProducts(), provideSelections(), and zypp::source::SourceImpl::url().

virtual std::string zypp::source::susetags::SuseTagsImpl::type void   )  const [inline, virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 75 of file SuseTagsImpl.h.

References typeString().

static std::string zypp::source::susetags::SuseTagsImpl::typeString void   )  [inline, static]
 

Text used for identifying the type of the source.

Used by the SourceFactory when creating a source of a given type only.

Definition at line 82 of file SuseTagsImpl.h.

Referenced by type().

unsigned zypp::source::susetags::SuseTagsImpl::numberOfMedia void   )  const [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 352 of file SuseTagsImpl.cc.

References _media_count.

std::string zypp::source::susetags::SuseTagsImpl::vendor void   )  const [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 355 of file SuseTagsImpl.cc.

References _vendor.

Referenced by factoryInit().

const std::list< Pathname > zypp::source::susetags::SuseTagsImpl::publicKeys  )  [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 278 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_path, cacheExists(), zypp::source::SourceImpl::dirInfo(), MIL, zypp::source::SourceImpl::provideFile(), and zypp::filesystem::readdir().

std::string zypp::source::susetags::SuseTagsImpl::unique_id void   )  const [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 358 of file SuseTagsImpl.cc.

References _media_id.

Pathname zypp::source::susetags::SuseTagsImpl::sourceDir const std::string &  dir  ) 
 

Definition at line 341 of file SuseTagsImpl.cc.

References _data_dir.

void zypp::source::susetags::SuseTagsImpl::storeMetadata const Pathname cache_dir_r  )  [virtual]
 

Reimplemented from zypp::source::SourceImpl.

Definition at line 69 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::_cache_dir, _orig_descr_dir, zypp::source::SourceImpl::_path, zypp::source::SourceImpl::alias(), zypp::filesystem::assert_dir(), zypp::bit::asString(), cacheExists(), zypp::CheckSum::checksum(), zypp::filesystem::copy(), zypp::filesystem::copy_dir(), zypp::source::SourceImpl::dirInfo(), zypp::CheckSum::empty(), initCacheDir(), INT, MIL, zypp::source::SourceImpl::provideDirTree(), zypp::source::SourceImpl::provideFile(), zypp::filesystem::sha1sum(), and ZYPP_THROW.

media::MediaVerifierRef zypp::source::susetags::SuseTagsImpl::verifier media::MediaNr  media_nr  )  [virtual]
 

Get media verifier for the specified media.

Definition at line 346 of file SuseTagsImpl.cc.

References _media_id, and _vendor.

std::ostream & zypp::source::susetags::SuseTagsImpl::dumpOn std::ostream &  str  )  const [protected, virtual]
 

Stream output.

Reimplemented from zypp::source::SourceImpl.

Definition at line 740 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::dumpOn().

void zypp::source::susetags::SuseTagsImpl::initCacheDir const Pathname cache_dir_r  )  [protected]
 

Definition at line 53 of file SuseTagsImpl.cc.

References zypp::filesystem::assert_dir(), zypp::filesystem::Pathname::asString(), zypp::filesystem::clean_dir(), zypp::filesystem::Pathname::dirname(), zypp::filesystem::mkdir(), and ZYPP_THROW.

Referenced by storeMetadata().

bool zypp::source::susetags::SuseTagsImpl::cacheExists  )  [protected]
 

Definition at line 159 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::_cache_dir, and MIL.

Referenced by factoryInit(), providePackages(), providePatterns(), provideSelections(), publicKeys(), readContentFile(), and storeMetadata().

void zypp::source::susetags::SuseTagsImpl::factoryInit  )  [private, virtual]
 

Ctor substitute.

Actually get the metadata.

Exceptions:
EXCEPTION on fail

Reimplemented from zypp::source::SourceImpl.

Definition at line 185 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::_cache_dir, zypp::source::SourceImpl::_media_set, _vendor, zypp::filesystem::Pathname::asString(), cacheExists(), ERR, zypp::iostr::getline(), zypp::media::MediaManager::localPath(), zypp::source::SourceImpl::media_mgr, zypp::media::MediaManager::provideFile(), zypp::str::TRIM, vendor(), and ZYPP_THROW.

void zypp::source::susetags::SuseTagsImpl::readContentFile  )  [private]
 

Definition at line 361 of file SuseTagsImpl.cc.

References zypp::source::SourceImpl::_cache_dir, _content_file, _content_file_key, _content_file_sig, zypp::source::SourceImpl::_path, cacheExists(), DBG, zypp::source::SourceImpl::dirInfo(), and zypp::source::SourceImpl::provideFile().

void zypp::source::susetags::SuseTagsImpl::provideProducts Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 456 of file SuseTagsImpl.cc.

References _product, zypp::ResStore::insert(), and MIL.

Referenced by createResolvables(), and provideResolvables().

void zypp::source::susetags::SuseTagsImpl::providePackages Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 503 of file SuseTagsImpl.cc.

References _descr_dir, _pkg_translations, cacheExists(), DBG, zypp::source::SourceImpl::dirInfo(), MIL, zypp::source::susetags::parsePackages(), zypp::source::SourceImpl::provideFile(), zypp::filesystem::readdir(), and verifyFile().

Referenced by createResolvables(), and provideResolvables().

void zypp::source::susetags::SuseTagsImpl::provideSelections Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 620 of file SuseTagsImpl.cc.

References _descr_dir, cacheExists(), DBG, zypp::iostr::getline(), zypp::ResStore::insert(), MIL, zypp::source::susetags::parseSelection(), zypp::source::SourceImpl::provideFile(), and verifyFile().

Referenced by createResolvables(), and provideResolvables().

void zypp::source::susetags::SuseTagsImpl::provideSelection Source_Ref  source_r,
ResStore store
[private]
 

void zypp::source::susetags::SuseTagsImpl::providePatterns Source_Ref  source_r,
ResStore store
[private]
 

Definition at line 679 of file SuseTagsImpl.cc.

References _descr_dir, zypp::source::SourceImpl::_store, cacheExists(), DBG, zypp::iostr::getline(), zypp::ResStore::insert(), MIL, zypp::source::susetags::parsePattern(), zypp::source::SourceImpl::provideFile(), and verifyFile().

Referenced by createResolvables(), and provideResolvables().

bool zypp::source::susetags::SuseTagsImpl::verifyChecksumsMode  )  [private]
 

verify media mode (use the new META tags)

Definition at line 180 of file SuseTagsImpl.cc.

References _prodImpl.

Referenced by verifyFile().

void zypp::source::susetags::SuseTagsImpl::verifyFile const Pathname path,
const std::string &  key
[private]
 

Verify file checksum.

Exceptions:
EXCEPTION on verification file

Definition at line 462 of file SuseTagsImpl.cc.

References _prodImpl, zypp::filesystem::Pathname::asString(), zypp::CheckSum::empty(), MIL, zypp::source::SourceImpl::path(), verifyChecksumsMode(), and ZYPP_THROW.

Referenced by providePackages(), providePatterns(), and provideSelections().


Member Data Documentation

unsigned zypp::source::susetags::SuseTagsImpl::_media_count [private]
 

Definition at line 129 of file SuseTagsImpl.h.

Referenced by numberOfMedia().

Pathname zypp::source::susetags::SuseTagsImpl::_descr_dir [private]
 

Definition at line 134 of file SuseTagsImpl.h.

Referenced by providePackages(), providePatterns(), and provideSelections().

Pathname zypp::source::susetags::SuseTagsImpl::_data_dir [private]
 

Definition at line 135 of file SuseTagsImpl.h.

Referenced by sourceDir().

Pathname zypp::source::susetags::SuseTagsImpl::_orig_descr_dir [private]
 

Definition at line 140 of file SuseTagsImpl.h.

Referenced by storeMetadata().

Pathname zypp::source::susetags::SuseTagsImpl::_content_file [private]
 

Definition at line 142 of file SuseTagsImpl.h.

Referenced by readContentFile().

Pathname zypp::source::susetags::SuseTagsImpl::_content_file_sig [private]
 

Definition at line 143 of file SuseTagsImpl.h.

Referenced by readContentFile().

Pathname zypp::source::susetags::SuseTagsImpl::_content_file_key [private]
 

Definition at line 144 of file SuseTagsImpl.h.

Referenced by readContentFile().

std::string zypp::source::susetags::SuseTagsImpl::_vendor [private]
 

Definition at line 146 of file SuseTagsImpl.h.

Referenced by factoryInit(), vendor(), and verifier().

std::string zypp::source::susetags::SuseTagsImpl::_media_id [private]
 

Definition at line 147 of file SuseTagsImpl.h.

Referenced by unique_id(), and verifier().

detail::ResImplTraits<SuseTagsProductImpl>::Ptr zypp::source::susetags::SuseTagsImpl::_prodImpl [private]
 

pointer to the product implementation we need it to access the checksums if we are in verify mode

Definition at line 152 of file SuseTagsImpl.h.

Referenced by verifyChecksumsMode(), and verifyFile().

Product::Ptr zypp::source::susetags::SuseTagsImpl::_product [private]
 

Definition at line 153 of file SuseTagsImpl.h.

Referenced by provideProducts().

std::map<NVRA, SuseTagsPackageImplData> zypp::source::susetags::SuseTagsImpl::_package_data
 

Definition at line 157 of file SuseTagsImpl.h.

std::map<NVRA, bool> zypp::source::susetags::SuseTagsImpl::_is_shared
 

Definition at line 159 of file SuseTagsImpl.h.

std::list<std::string> zypp::source::susetags::SuseTagsImpl::_pkg_translations
 

Definition at line 162 of file SuseTagsImpl.h.

Referenced by providePackages().


The documentation for this class was generated from the following files:
Generated on Thu May 4 16:03:40 2006 for zypp by  doxygen 1.4.6