X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9eb0042bef1f1b6b1603fb234cdbc53fc76b2ce7..b53c9cea2902572822bbbece5bac236c1bbf846e:/apt-pkg/packagemanager.h diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 4972dcd04..8de6ab3ad 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -1,6 +1,5 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.h,v 1.14 2001/05/07 04:24:08 jgg Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -47,8 +46,8 @@ class pkgRecords; namespace APT { namespace Progress { class PackageManager; - }; -}; + } +} class pkgPackageManager : protected pkgCache::Namespace @@ -96,12 +95,8 @@ class pkgPackageManager : protected pkgCache::Namespace virtual bool Install(PkgIterator /*Pkg*/,std::string /*File*/) {return false;}; virtual bool Configure(PkgIterator /*Pkg*/) {return false;}; virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;}; -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;}; virtual bool Go(int /*statusFd*/=-1) {return true;}; -#else - virtual bool Go(int /*statusFd*/=-1) {return true;}; -#endif virtual void Reset() {}; @@ -114,14 +109,10 @@ class pkgPackageManager : protected pkgCache::Namespace bool GetArchives(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs); - // Do the installation -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) + // Do the installation OrderResult DoInstall(APT::Progress::PackageManager *progress); // compat APT_DEPRECATED OrderResult DoInstall(int statusFd=-1); -#else - OrderResult DoInstall(int statusFd=-1); -#endif // stuff that needs to be done before the fork() of a library that // uses apt @@ -129,14 +120,10 @@ class pkgPackageManager : protected pkgCache::Namespace Res = OrderInstall(); return Res; }; -#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) // stuff that needs to be done after the fork OrderResult DoInstallPostFork(APT::Progress::PackageManager *progress); // compat APT_DEPRECATED OrderResult DoInstallPostFork(int statusFd=-1); -#else - OrderResult DoInstallPostFork(int statusFd=-1); -#endif // ? bool FixMissing(); @@ -144,10 +131,11 @@ class pkgPackageManager : protected pkgCache::Namespace /** \brief returns all packages dpkg let disappear */ inline std::set GetDisappearedPackages() { return disappearedPkgs; }; - pkgPackageManager(pkgDepCache *Cache); + explicit pkgPackageManager(pkgDepCache *Cache); virtual ~pkgPackageManager(); private: + void * const d; enum APT_HIDDEN SmartAction { UNPACK_IMMEDIATE, UNPACK, CONFIGURE }; APT_HIDDEN bool NonLoopingSmart(SmartAction const action, pkgCache::PkgIterator &Pkg, pkgCache::PkgIterator DepPkg, int const Depth, bool const PkgLoop,