X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9abccf4a63b6c887b213678d940fe912233f04c3..2409df55f65c4937ceda21ba069eec769af9e460:/ftparchive/writer.h diff --git a/ftparchive/writer.h b/ftparchive/writer.h index c6026e954..d8a10e0bb 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -13,16 +13,17 @@ #ifndef WRITER_H #define WRITER_H - #include #include #include #include #include #include +#include +#include +#include "contents.h" #include "cachedb.h" -#include "multicompress.h" #include "override.h" #include "apt-ftparchive.h" @@ -31,7 +32,7 @@ using std::cout; using std::endl; using std::vector; using std::map; - + class FTWScanner { protected: @@ -48,7 +49,7 @@ class FTWScanner static int ScannerFile(const char *File, bool const &ReadLink); bool Delink(string &FileName,const char *OriginalPath, - unsigned long &Bytes,off_t const &FileSize); + unsigned long long &Bytes,unsigned long long const &FileSize); inline void NewLine(unsigned const &Priority) { @@ -81,6 +82,8 @@ class FTWScanner virtual ~FTWScanner() {}; }; +class MultiCompress; + class TranslationWriter { MultiCompress *Comp; @@ -124,8 +127,10 @@ class PackagesWriter : public FTWScanner {return Over.ReadExtraOverride(File);}; virtual bool DoPackage(string FileName); - PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides=string(), - string const &Arch=string()); + PackagesWriter(string const &DB, + string const &Overrides, + string const &ExtOverrides = "", + string const &Arch = ""); virtual ~PackagesWriter() {}; }; @@ -156,24 +161,26 @@ class ContentsWriter : public FTWScanner class SourcesWriter : public FTWScanner { + CacheDB Db; Override BOver; Override SOver; char *Buffer; - unsigned long BufSize; + unsigned long long BufSize; public: bool NoOverride; + bool DoAlwaysStat; // General options string PathPrefix; string DirStrip; FILE *Output; - struct CacheDB::Stats Stats; + struct CacheDB::Stats &Stats; virtual bool DoPackage(string FileName); - SourcesWriter(string const &BOverrides,string const &SOverrides, + SourcesWriter(string const &DB,string const &BOverrides,string const &SOverrides, string const &ExtOverrides=string()); virtual ~SourcesWriter() {free(Buffer);}; }; @@ -198,7 +205,7 @@ protected: string SHA256; string SHA512; // Limited by FileFd::Size() - unsigned long size; + unsigned long long size; ~CheckSum() {}; }; map CheckSums;