X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/71ecaad29d8066a494f516efc5efd80860653fe2..67c3067f1a615fd6ff0b332c2a526d052442913d:/apt-pkg/algorithms.h diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 948fe1103..489d81159 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -10,7 +10,7 @@ see all of the effects of an upgrade run. pkgDistUpgrade computes an upgrade that causes as many packages as - possible to move to the newest verison. + possible to move to the newest version. pkgApplyStatus sets the target state based on the content of the status field in the status file. It is important to get proper crash recovery. @@ -36,7 +36,19 @@ #include -class pkgAcquireStatus; +#include + +#ifndef APT_8_CLEANER_HEADERS +#include +using std::ostream; +#endif + +#ifndef APT_9_CLEANER_HEADERS +// include pkg{DistUpgrade,AllUpgrade,MiniizeUpgrade} here for compatibility +#include +#include +#endif + class pkgSimulate : public pkgPackageManager /*{{{*/ { @@ -73,10 +85,12 @@ private: public: pkgSimulate(pkgDepCache *Cache); + ~pkgSimulate(); }; /*}}}*/ class pkgProblemResolver /*{{{*/ { + private: /** \brief dpointer placeholder (for later in case we need it) */ void *d; @@ -91,7 +105,7 @@ class pkgProblemResolver /*{{{*/ enum Flags {Protected = (1 << 0), PreInstalled = (1 << 1), Upgradable = (1 << 2), ReInstateTried = (1 << 3), ToRemove = (1 << 4)}; - signed short *Scores; + int *Scores; unsigned char *Flags; bool Debug; @@ -126,21 +140,16 @@ class pkgProblemResolver /*{{{*/ // Try to resolve problems only by using keep bool ResolveByKeep(); - // Install all protected packages - void InstallProtect(); - + __deprecated void InstallProtect(); + pkgProblemResolver(pkgDepCache *Cache); ~pkgProblemResolver(); }; /*}}}*/ -bool pkgDistUpgrade(pkgDepCache &Cache); bool pkgApplyStatus(pkgDepCache &Cache); bool pkgFixBroken(pkgDepCache &Cache); -bool pkgAllUpgrade(pkgDepCache &Cache); -bool pkgMinimizeUpgrade(pkgDepCache &Cache); void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List); -bool ListUpdate(pkgAcquireStatus &progress, pkgSourceList &List, int PulseInterval=0); - + #endif