zypp::parser::yum::RepoParser::Impl Class Reference

Inheritance diagram for zypp::parser::yum::RepoParser::Impl:
[legend]

List of all members.

Public Member Functions

 Impl (const data::RecordId &repository_id, data::ResolvableDataConsumer &consumer, const RepoParserOpts &options=RepoParserOpts(), const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
 CTOR.
void parse (const Pathname &cache_dir)
 Implementation of RepoParser::parse(Pathname).
void doJobs (const Pathname &path)
 Iterates through parser _jobs and executes them using *FileReader classes.
bool repomd_CB (const OnMediaLocation &loc, const ResourceType &dtype)
 Callback for processing data returned from RepomdFileReader.
bool primary_CB (const data::Packagebase_Ptr &package_r)
 Callback for processing packages returned from PrimaryFileReader.
bool patches_CB (const OnMediaLocation &loc, const std::string &patch_id)
 Callback for processing data returned from PatchesFileReader.
bool patch_CB (const data::Patch_Ptr &patch)
 Callback for processing data returned from PatchFileReader.
bool other_CB (const data::Resolvable_Ptr &res_ptr, const Changelog &changelog)
 Callback for processing data returned from OtherFileReader.
bool filelist_CB (const data::Resolvable_Ptr &res_ptr, const data::Filenames &filenames)
 Callback for processing data returned from FilelistsFileReader.
bool pattern_CB (const data::Pattern_Ptr &pattern_ptr)
 Callback for processing data returned from PatternFileReader.
bool product_CB (const data::Product_Ptr &product_ptr)
 Callback for processing data returned from ProductFileReader.

Private Attributes

data::RecordId _repository_id
 ID of the repository record in the DB (repositories.id).
data::ResolvableDataConsumer_consumer
 Object for processing the read data.
std::list
< RepoParserJob
_jobs
 List of parser jobs read from repomd.xml and patches.xml files.
ProgressData _ticks
 Progress reporting object for overall YUM parser progress.
const RepoParserOpts_options


Detailed Description

Definition at line 69 of file RepoParser.cc.


Constructor & Destructor Documentation

zypp::parser::yum::RepoParser::Impl::Impl ( const data::RecordId repository_id,
data::ResolvableDataConsumer consumer,
const RepoParserOpts options = RepoParserOpts(),
const ProgressData::ReceiverFnc progress = ProgressData::ReceiverFnc() 
)

CTOR.

Definition at line 178 of file RepoParser.cc.

References _ticks, zypp::ProgressData::name(), and zypp::ProgressData::sendTo().


Member Function Documentation

void zypp::parser::yum::RepoParser::Impl::parse ( const Pathname &  cache_dir  ) 

Implementation of RepoParser::parse(Pathname).

Definition at line 308 of file RepoParser.cc.

References _jobs, _ticks, doJobs(), zypp::parser::yum::RepoParserJob::filename(), MIL, zypp::ProgressData::range(), repomd_CB(), zypp::ProgressData::toMax(), and zypp::ProgressData::toMin().

void zypp::parser::yum::RepoParser::Impl::doJobs ( const Pathname &  path  ) 

Iterates through parser _jobs and executes them using *FileReader classes.

Parameters:
path location of the raw repository cache

Definition at line 333 of file RepoParser.cc.

References _jobs, _options, _ticks, filelist_CB(), zypp::parser::yum::RepoParserJob::filename(), zypp::ProgressData::incr(), zypp::ProgressData::max(), MIL, other_CB(), patch_CB(), patches_CB(), pattern_CB(), primary_CB(), product_CB(), zypp::ProgressData::range(), zypp::parser::yum::RepoParserOpts::skipFilelists, zypp::parser::yum::RepoParserOpts::skipOther, zypp::repo::yum::ResourceType::toEnum(), zypp::parser::yum::RepoParserJob::type(), WAR, and ZYPP_THROW.

Referenced by parse().

bool zypp::parser::yum::RepoParser::Impl::repomd_CB ( const OnMediaLocation loc,
const ResourceType dtype 
)

Callback for processing data returned from RepomdFileReader.

Adds returned files to parser job list (_jobs).

Parameters:
loc location of discovered data file
dtype YUM data type

Definition at line 192 of file RepoParser.cc.

References _jobs, DBG, and zypp::OnMediaLocation::filename().

Referenced by parse().

bool zypp::parser::yum::RepoParser::Impl::primary_CB ( const data::Packagebase_Ptr &  package_r  ) 

Callback for processing packages returned from PrimaryFileReader.

Uses _consumer to process read package data.

Parameters:
package_r pointer to package data

Definition at line 205 of file RepoParser.cc.

References _consumer, _repository_id, zypp::data::ResolvableDataConsumer::consumePackage(), and zypp::data::ResolvableDataConsumer::consumeSourcePackage().

Referenced by doJobs().

bool zypp::parser::yum::RepoParser::Impl::patches_CB ( const OnMediaLocation loc,
const std::string &  patch_id 
)

Callback for processing data returned from PatchesFileReader.

Adds discovered patch*.xml files to parser _jobs.

Parameters:
loc location of discovered patch file
patch_id (not used so far)

Referenced by doJobs().

bool zypp::parser::yum::RepoParser::Impl::patch_CB ( const data::Patch_Ptr &  patch  ) 

Callback for processing data returned from PatchFileReader.

Uses _consumer to process read patch data.

Parameters:
patch pointer to patch data

Definition at line 237 of file RepoParser.cc.

References _consumer, _repository_id, zypp::data::ResolvableDataConsumer::consumePatch(), and MIL.

Referenced by doJobs().

bool zypp::parser::yum::RepoParser::Impl::other_CB ( const data::Resolvable_Ptr &  res_ptr,
const Changelog changelog 
)

Callback for processing data returned from OtherFileReader.

Uses _consumer to process read changelog data.

Parameters:
res_ptr resolvable to which the changelog belongs
changelog read changelog

Definition at line 251 of file RepoParser.cc.

Referenced by doJobs().

bool zypp::parser::yum::RepoParser::Impl::filelist_CB ( const data::Resolvable_Ptr &  res_ptr,
const data::Filenames filenames 
)

Callback for processing data returned from FilelistsFileReader.

Uses _consumer to process read filelist.

Parameters:
res_ptr resolvable to which the filelist belongs.
filenames the read filelist

Definition at line 268 of file RepoParser.cc.

Referenced by doJobs().

bool zypp::parser::yum::RepoParser::Impl::pattern_CB ( const data::Pattern_Ptr &  pattern_ptr  ) 

Callback for processing data returned from PatternFileReader.

Uses _consumer to process read pattern.

Parameters:
pattern_ptr pointer to pattern data object

Definition at line 285 of file RepoParser.cc.

References _consumer, _repository_id, zypp::data::ResolvableDataConsumer::consumePattern(), and MIL.

Referenced by doJobs().

bool zypp::parser::yum::RepoParser::Impl::product_CB ( const data::Product_Ptr &  product_ptr  ) 

Callback for processing data returned from ProductFileReader.

Uses _consumer to process read product.

Parameters:
product_ptr pointer to product data object

Definition at line 296 of file RepoParser.cc.

References _consumer, _repository_id, zypp::data::ResolvableDataConsumer::consumeProduct(), and MIL.

Referenced by doJobs().


Member Data Documentation

data::RecordId zypp::parser::yum::RepoParser::Impl::_repository_id [private]

ID of the repository record in the DB (repositories.id).

Definition at line 161 of file RepoParser.cc.

Referenced by patch_CB(), pattern_CB(), primary_CB(), and product_CB().

data::ResolvableDataConsumer& zypp::parser::yum::RepoParser::Impl::_consumer [private]

Object for processing the read data.

Definition at line 164 of file RepoParser.cc.

Referenced by patch_CB(), pattern_CB(), primary_CB(), and product_CB().

std::list<RepoParserJob> zypp::parser::yum::RepoParser::Impl::_jobs [private]

List of parser jobs read from repomd.xml and patches.xml files.

Definition at line 167 of file RepoParser.cc.

Referenced by doJobs(), parse(), and repomd_CB().

ProgressData zypp::parser::yum::RepoParser::Impl::_ticks [private]

Progress reporting object for overall YUM parser progress.

Definition at line 170 of file RepoParser.cc.

Referenced by doJobs(), Impl(), and parse().

const RepoParserOpts& zypp::parser::yum::RepoParser::Impl::_options [private]

Definition at line 173 of file RepoParser.cc.

Referenced by doJobs().


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