From 2e5f4e45f593535e2c88181ff7a9e2d32a5e60f9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 4 Jun 2010 14:43:03 +0200 Subject: * apt-pkg/cachefile.{cc,h}: - split Open() into submethods to be able to build only parts - make the OpProgress optional in the Cache buildprocess --- apt-pkg/cachefile.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'apt-pkg/cachefile.h') diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index 3b057951c..b75a7dbe4 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -30,11 +30,10 @@ class pkgCacheFile MMap *Map; pkgCache *Cache; pkgDepCache *DCache; - + pkgPolicy *Policy; + public: - pkgPolicy *Policy; - // We look pretty much exactly like a pointer to a dep cache inline operator pkgCache &() {return *Cache;}; inline operator pkgCache *() {return Cache;}; @@ -45,12 +44,16 @@ class pkgCacheFile inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) {return (*DCache)[I];}; inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*DCache)[I];}; - bool BuildCaches(OpProgress &Progress,bool WithLock = true); - bool Open(OpProgress &Progress,bool WithLock = true); + bool BuildCaches(OpProgress *Progress = NULL,bool WithLock = true); + __deprecated bool BuildCaches(OpProgress &Progress,bool const &WithLock = true) { return BuildCaches(&Progress, WithLock); }; + bool BuildPolicy(OpProgress *Progress = NULL); + bool BuildDepCache(OpProgress *Progress = NULL); + bool Open(OpProgress *Progress = NULL, bool WithLock = true); + __deprecated bool Open(OpProgress &Progress,bool const &WithLock = true) { return Open(&Progress, WithLock); }; void Close(); pkgCacheFile(); - ~pkgCacheFile(); + virtual ~pkgCacheFile(); }; #endif -- cgit v1.2.3