libzypp  17.23.6
ZsyncParser.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_MEDIA_ZSYNCPARSER_H
13 #define ZYPP_MEDIA_ZSYNCPARSER_H
14 
15 #include <string>
16 
17 #include <zypp/base/Exception.h>
18 #include <zypp/base/NonCopyable.h>
20 #include <zypp/Url.h>
21 
22 namespace zypp {
23  namespace media {
24 
26 public:
27  ZsyncParser();
28 
33  void parse(std::string filename);
37  std::vector<Url> getUrls();
42 
43 private:
44  off_t filesize;
45  size_t blksize;
46  int sql;
47  int rsl;
48  int csl;
50  std::vector<std::string> urls;
51 };
52 
53  } // namespace media
54 } // namespace zypp
55 
56 #endif // ZYPP_MEDIA_ZSYNCPARSER_H
zypp::media::ZsyncParser::bl
MediaBlockList bl
Definition: ZsyncParser.h:49
zypp::media::ZsyncParser::csl
int csl
Definition: ZsyncParser.h:48
zypp::media::ZsyncParser::filesize
off_t filesize
Definition: ZsyncParser.h:44
zypp::media::ZsyncParser::getBlockList
MediaBlockList getBlockList()
return the block list from the parsed metalink data
Definition: ZsyncParser.cc:139
zypp::media::MediaBlockList
Definition: MediaBlockList.h:35
zypp::media::ZsyncParser::sql
int sql
Definition: ZsyncParser.h:46
Exception.h
Url.h
MediaBlockList.h
zypp::media::ZsyncParser::parse
void parse(std::string filename)
parse a file consisting of zlink data
Definition: ZsyncParser.cc:64
zypp::base::NonCopyable
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
zypp::media::ZsyncParser::ZsyncParser
ZsyncParser()
Definition: ZsyncParser.cc:31
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::media::ZsyncParser::rsl
int rsl
Definition: ZsyncParser.h:47
zypp::media::ZsyncParser
Definition: ZsyncParser.h:25
zypp::media::ZsyncParser::blksize
size_t blksize
Definition: ZsyncParser.h:45
zypp::media::ZsyncParser::urls
std::vector< std::string > urls
Definition: ZsyncParser.h:50
zypp::media::ZsyncParser::getUrls
std::vector< Url > getUrls()
return the download urls from the parsed metalink data
Definition: ZsyncParser.cc:129
NonCopyable.h