upgrade.h 1021 B

123456789101112131415161718192021222324252627282930313233343536
  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. bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
  22. }
  23. }
  24. APT_DEPRECATED_MSG("Use APT::Upgrade::Upgrade() instead") bool pkgDistUpgrade(pkgDepCache &Cache);
  25. APT_DEPRECATED_MSG("Use APT::Upgrade::Upgrade() instead") bool pkgAllUpgrade(pkgDepCache &Cache);
  26. bool pkgMinimizeUpgrade(pkgDepCache &Cache);
  27. #endif