libzypp  10.5.0
ZsyncParser.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_MEDIA_ZSYNCPARSER_H
00013 #define ZYPP_MEDIA_ZSYNCPARSER_H
00014 
00015 #include <string>
00016 
00017 #include "zypp/base/Exception.h"
00018 #include "zypp/base/NonCopyable.h"
00019 #include "zypp/media/MediaBlockList.h"
00020 #include "zypp/Url.h"
00021 
00022 namespace zypp {
00023   namespace media {
00024 
00025 class ZsyncParser : private zypp::base::NonCopyable {
00026 public:
00027   ZsyncParser();
00028 
00033   void parse(std::string filename);
00037   std::vector<Url> getUrls();
00041   MediaBlockList getBlockList();
00042 
00043 private:
00044   off_t filesize;
00045   size_t blksize;
00046   int sql;
00047   int rsl;
00048   int csl;
00049   MediaBlockList bl;
00050   std::vector<std::string> urls;
00051 };
00052 
00053   } // namespace media
00054 } // namespace zypp
00055 
00056 #endif // ZYPP_MEDIA_ZSYNCPARSER_H