X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b518cca6bd64abeba1fb84e9363798e5e063469a..c46824ce2ac7b52b644078f997ecc1ea6303b50c:/apt-pkg/depcache.h diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 39ed215b2..7510e111f 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: depcache.h,v 1.2 1998/07/12 01:26:01 jgg Exp $ +// $Id: depcache.h,v 1.8 1998/12/08 01:34:10 jgg Exp $ /* ###################################################################### DepCache - Dependency Extension data for the cache @@ -40,10 +40,11 @@ #define PKGLIB_DEPCACHE_H #ifdef __GNUG__ -#pragma interface "pkglib/depcache.h" +#pragma interface "apt-pkg/depcache.h" #endif -#include +#include +#include class pkgDepCache : public pkgCache { @@ -93,7 +94,7 @@ class pkgDepCache : public pkgCache inline bool Delete() const {return Mode == ModeDelete;}; inline bool Keep() const {return Mode == ModeKeep;}; inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;}; - inline bool Upgradable() const {return Status == 1;}; + inline bool Upgradable() const {return Status >= 1;}; inline bool Downgrade() const {return Status < 0;}; inline bool Held() const {return Status != 0 && Keep();}; inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;}; @@ -109,7 +110,7 @@ class pkgDepCache : public pkgCache void BuildGroupOrs(VerIterator const &V); void UpdateVerState(PkgIterator Pkg); - bool Init(); + bool Init(OpProgress *Prog); protected: @@ -117,13 +118,13 @@ class pkgDepCache : public pkgCache StateCache *PkgState; unsigned char *DepState; - long iUsrSize; - long iDownloadSize; - long iInstCount; - long iDelCount; - long iKeepCount; - long iBrokenCount; - long iBadCount; + signed long iUsrSize; + unsigned long iDownloadSize; + unsigned long iInstCount; + unsigned long iDelCount; + unsigned long iKeepCount; + unsigned long iBrokenCount; + unsigned long iBadCount; // Check for a matching provides bool CheckDep(DepIterator Dep,int Type,PkgIterator &Res); @@ -165,20 +166,18 @@ class pkgDepCache : public pkgCache void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true); // This is for debuging - void Update(); - - // Hook to keep the extra data in sync - virtual bool ReMap(); + void Update(OpProgress *Prog = 0); // Size queries - inline long UsrSize() {return iUsrSize;}; - inline long DebSize() {return iDownloadSize;}; - inline long DelCount() {return iDelCount;}; - inline long KeepCount() {return iKeepCount;}; - inline long InstCount() {return iInstCount;}; - inline long BrokenCount() {return iBrokenCount;}; - inline long BadCount() {return iBadCount;}; + inline signed long UsrSize() {return iUsrSize;}; + inline unsigned long DebSize() {return iDownloadSize;}; + inline unsigned long DelCount() {return iDelCount;}; + inline unsigned long KeepCount() {return iKeepCount;}; + inline unsigned long InstCount() {return iInstCount;}; + inline unsigned long BrokenCount() {return iBrokenCount;}; + inline unsigned long BadCount() {return iBadCount;}; + pkgDepCache(MMap &Map,OpProgress &Prog); pkgDepCache(MMap &Map); virtual ~pkgDepCache(); };