#include <MetaLinkParser.h>
Public Member Functions | |
MetaLinkParser () | |
~MetaLinkParser () | |
void | parse (const Pathname &filename) |
parse a file consisting of metalink xml data | |
void | parse (const InputStream &is) |
parse an InputStream consisting of metalink xml data | |
void | parseBytes (const char *bytes, size_t len) |
parse a chunk of a file consisting of metalink xml data. | |
void | parseEnd () |
tells the parser that all chunks are now processed | |
std::vector< Url > | getUrls () |
return the download urls from the parsed metalink data | |
MediaBlockList | getBlockList () |
return the block list from the parsed metalink data | |
Private Attributes | |
struct ml_parsedata * | pd |
Definition at line 28 of file MetaLinkParser.h.
zypp::media::MetaLinkParser::MetaLinkParser | ( | ) |
Definition at line 407 of file MetaLinkParser.cc.
zypp::media::MetaLinkParser::~MetaLinkParser | ( | ) |
void zypp::media::MetaLinkParser::parse | ( | const Pathname & | filename | ) |
parse a file consisting of metalink xml data
Exception |
Definition at line 417 of file MetaLinkParser.cc.
Referenced by zypp::media::MediaMultiCurl::doGetFileCopy(), and zypp::repo::RepoMirrorList::parseXML().
void zypp::media::MetaLinkParser::parse | ( | const InputStream & | is | ) |
parse an InputStream consisting of metalink xml data
Exception |
Definition at line 423 of file MetaLinkParser.cc.
References parseBytes(), parseEnd(), zypp::InputStream::stream(), and ZYPP_THROW.
void zypp::media::MetaLinkParser::parseBytes | ( | const char * | bytes, | |
size_t | len | |||
) |
parse a chunk of a file consisting of metalink xml data.
Exception |
Definition at line 437 of file MetaLinkParser.cc.
References zypp::media::ml_parsedata::parser, pd, and ZYPP_THROW.
Referenced by parse().
void zypp::media::MetaLinkParser::parseEnd | ( | ) |
tells the parser that all chunks are now processed
Exception |
Definition at line 451 of file MetaLinkParser.cc.
References zypp::media::ml_parsedata::nurls, zypp::media::ml_parsedata::parser, pd, zypp::media::urlcmp(), zypp::media::ml_parsedata::urls, and ZYPP_THROW.
Referenced by parse().
std::vector< Url > zypp::media::MetaLinkParser::getUrls | ( | ) |
return the download urls from the parsed metalink data
Definition at line 460 of file MetaLinkParser.cc.
References zypp::media::ml_parsedata::nurls, pd, and zypp::media::ml_parsedata::urls.
Referenced by zypp::media::MediaMultiCurl::doGetFileCopy(), and zypp::repo::RepoMirrorList::parseXML().
MediaBlockList zypp::media::MetaLinkParser::getBlockList | ( | ) |
return the block list from the parsed metalink data
Definition at line 470 of file MetaLinkParser.cc.
References zypp::media::MediaBlockList::addBlock(), zypp::media::ml_parsedata::blksize, zypp::media::ml_parsedata::chksum, zypp::media::ml_parsedata::chksuml, zypp::media::ml_parsedata::nsha1, zypp::media::ml_parsedata::nzsync, pd, zypp::media::MediaBlockList::setChecksum(), zypp::media::MediaBlockList::setFileChecksum(), zypp::media::MediaBlockList::setRsum(), zypp::media::ml_parsedata::sha1, zypp::media::ml_parsedata::size, and zypp::media::ml_parsedata::zsync.
Referenced by zypp::media::MediaMultiCurl::doGetFileCopy().
struct ml_parsedata* zypp::media::MetaLinkParser::pd [read, private] |
Definition at line 66 of file MetaLinkParser.h.
Referenced by getBlockList(), getUrls(), parseBytes(), parseEnd(), and ~MetaLinkParser().