upgrade.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. /* ######################################################################
  4. Upgrade - Upgrade/DistUpgrade releated code
  5. ##################################################################### */
  6. /*}}}*/
  7. #ifndef PKGLIB_UPGRADE_H
  8. #define PKGLIB_UPGRADE_H
  9. #include <stddef.h>
  10. #include <apt-pkg/macros.h>
  11. class pkgDepCache;
  12. class OpProgress;
  13. namespace APT {
  14. namespace Upgrade {
  15. // FIXME: make this "enum class UpgradeMode {" once we enable c++11
  16. enum UpgradeMode {
  17. FORBID_REMOVE_PACKAGES = 1,
  18. FORBID_INSTALL_NEW_PACKAGES = 2,
  19. ALLOW_EVERYTHING = 0
  20. };
  21. #if APT_PKG_ABI >= 413
  22. bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
  23. #else
  24. bool Upgrade(pkgDepCache &Cache, int UpgradeMode);
  25. bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress);
  26. #endif
  27. }
  28. }
  29. // please use APT::Upgrade::Upgrade() instead
  30. APT_DEPRECATED bool pkgDistUpgrade(pkgDepCache &Cache);
  31. APT_DEPRECATED bool pkgAllUpgrade(pkgDepCache &Cache);
  32. bool pkgMinimizeUpgrade(pkgDepCache &Cache);
  33. #endif