libzypp 17.25.7
MetaLinkParser.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_MEDIA_METALINKPARSER_H
13#define ZYPP_MEDIA_METALINKPARSER_H
14
15#include <string>
16
17#include <zypp/base/Exception.h>
21#include <zypp/Url.h>
22
23namespace zypp {
24 namespace media {
25
26struct ml_parsedata;
27
29public:
32
37 void parse(const Pathname &filename);
38
43 void parse(const InputStream &is);
44
49 void parseBytes(const char* bytes, size_t len);
54 void parseEnd();
55
59 std::vector<Url> getUrls();
64
65private:
67};
68
69 } // namespace media
70} // namespace zypp
71
72#endif // ZYPP_MEDIA_METALINKPARSER_H
Helper to create and pass std::istream.
Definition: InputStream.h:57
void parseEnd()
tells the parser that all chunks are now processed
MediaBlockList getBlockList()
return the block list from the parsed metalink data
std::vector< Url > getUrls()
return the download urls from the parsed metalink data
struct ml_parsedata * pd
void parse(const Pathname &filename)
parse a file consisting of metalink xml data
void parseBytes(const char *bytes, size_t len)
parse a chunk of a file consisting of metalink xml data.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2