libzypp  13.10.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
std::vector< Url > getUrls()
return the download urls from the parsed metalink data
Definition: ZsyncParser.cc:129
MediaBlockList getBlockList()
return the block list from the parsed metalink data
Definition: ZsyncParser.cc:139
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26
void parse(std::string filename)
parse a file consisting of zlink data
Definition: ZsyncParser.cc:64
std::vector< std::string > urls
Definition: ZsyncParser.h:50