libzypp 17.37.10

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