X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/f9eec0e748c2e735980bf80445535d32f27f8301..a3eaf9544039a9adfef159e8185f376f19b15c68:/apt-pkg/pkgcachegen.h diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 8ffb277c6..f264b314d 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.h,v 1.12 1999/02/23 06:46:24 jgg Exp $ +// $Id: pkgcachegen.h,v 1.17 1999/07/26 17:46:08 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -28,6 +28,7 @@ class pkgSourceList; class OpProgress; +class MMap; class pkgCacheGenerator { @@ -44,7 +45,7 @@ class pkgCacheGenerator DynamicMMap ⤅ pkgCache Cache; - OpProgress &Progress; + OpProgress *Progress; string PkgFileName; pkgCache::PackageFile *CurrentFile; @@ -54,12 +55,13 @@ class pkgCacheGenerator unsigned long NewVersion(pkgCache::VerIterator &Ver,string VerStr,unsigned long Next); unsigned long WriteUniqString(const char *S,unsigned int Size); - inline unsigned long WriteUniqString(string S) {return WriteUniqString(S);}; - + inline unsigned long WriteUniqString(string S) {return WriteUniqString(S.c_str(),S.length());}; + public: + void DropProgress() {Progress = 0;}; bool SelectFile(string File,unsigned long Flags = 0); - bool MergeList(ListParser &List); + bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0); inline pkgCache &GetCache() {return Cache;}; inline pkgCache::PkgFileIterator GetCurFile() {return pkgCache::PkgFileIterator(Cache,CurrentFile);}; @@ -71,6 +73,7 @@ class pkgCacheGenerator bool pkgSrcCacheCheck(pkgSourceList &List); bool pkgPkgCacheCheck(string CacheFile); bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress); +MMap *pkgMakeStatusCacheMem(pkgSourceList &List,OpProgress &Progress); // This is the abstract package list parser class. class pkgCacheGenerator::ListParser @@ -80,10 +83,10 @@ class pkgCacheGenerator::ListParser // Some cache items pkgCache::VerIterator OldDepVer; - __apt_ptrloc *OldDepLast; + map_ptrloc *OldDepLast; protected: - + inline unsigned long WriteUniqString(string S) {return Owner->WriteUniqString(S);}; inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);}; inline unsigned long WriteString(string S) {return Owner->Map.WriteString(S);}; @@ -99,6 +102,7 @@ class pkgCacheGenerator::ListParser virtual string Package() = 0; virtual string Version() = 0; virtual bool NewVersion(pkgCache::VerIterator Ver) = 0; + virtual unsigned short VersionHash() = 0; virtual bool UsePackage(pkgCache::PkgIterator Pkg, pkgCache::VerIterator Ver) = 0; virtual unsigned long Offset() = 0; @@ -109,4 +113,8 @@ class pkgCacheGenerator::ListParser virtual ~ListParser() {}; }; +bool pkgMergeStatus(OpProgress &Progress,pkgCacheGenerator &Gen, + unsigned long &CurrentSize,unsigned long TotalSize); +bool pkgAddStatusSize(unsigned long &TotalSize); + #endif