1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/media/MetaLinkParser.h
12 #ifndef ZYPP_MEDIA_METALINKPARSER_H
13 #define ZYPP_MEDIA_METALINKPARSER_H
17 #include <zypp/base/Exception.h>
18 #include <zypp/base/NonCopyable.h>
19 #include <zypp/base/InputStream.h>
20 #include <zypp/media/MediaBlockList.h>
28 class MetaLinkParser : private zypp::base::NonCopyable {
34 * parse a file consisting of metalink xml data
37 void parse(const Pathname &filename);
40 * parse an InputStream consisting of metalink xml data
43 void parse(const InputStream &is);
46 * parse a chunk of a file consisting of metalink xml data.
49 void parseBytes(const char* bytes, size_t len);
51 * tells the parser that all chunks are now processed
57 * return the download urls from the parsed metalink data
59 std::vector<Url> getUrls();
61 * return the block list from the parsed metalink data
63 MediaBlockList getBlockList();
66 struct ml_parsedata *pd;
72 #endif // ZYPP_MEDIA_METALINKPARSER_H