summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-06-09 13:15:34 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-06-09 13:15:34 +0200
commit189bb640d2443a5fcaade2ce169429c629ba3148 (patch)
tree1046a11805ae78557e9947569f91c2f8fa853f88 /apt-pkg/depcache.h
parentba74b79fb5c74d916f9bfe1b314e8107a9e7eab4 (diff)
parent308b793694774eece8765d172b8e989d8ed29925 (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r--apt-pkg/depcache.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 3decc7a5f..c6f245a80 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -286,9 +286,11 @@ class pkgDepCache : protected pkgCache::Namespace
pkgCache *Cache;
StateCache *PkgState;
unsigned char *DepState;
-
- double iUsrSize;
- double iDownloadSize;
+
+ /** Stores the space changes after installation */
+ signed long long iUsrSize;
+ /** Stores how much we need to download to get the packages */
+ unsigned long long iDownloadSize;
unsigned long iInstCount;
unsigned long iDelCount;
unsigned long iKeepCount;
@@ -321,8 +323,9 @@ class pkgDepCache : protected pkgCache::Namespace
void Update(PkgIterator const &P);
// Count manipulators
- void AddSizes(const PkgIterator &Pkg,signed long Mult = 1);
- inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg,-1);};
+ void AddSizes(const PkgIterator &Pkg, bool const &Invert = false);
+ inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg, true);};
+ void AddSizes(const PkgIterator &Pkg,signed long Mult) __deprecated;
void AddStates(const PkgIterator &Pkg,int Add = 1);
inline void RemoveStates(const PkgIterator &Pkg) {AddStates(Pkg,-1);};
@@ -451,8 +454,8 @@ class pkgDepCache : protected pkgCache::Namespace
bool writeStateFile(OpProgress *prog, bool InstalledOnly=true);
// Size queries
- inline double UsrSize() {return iUsrSize;};
- inline double DebSize() {return iDownloadSize;};
+ inline signed long long UsrSize() {return iUsrSize;};
+ inline unsigned long long DebSize() {return iDownloadSize;};
inline unsigned long DelCount() {return iDelCount;};
inline unsigned long KeepCount() {return iKeepCount;};
inline unsigned long InstCount() {return iInstCount;};