upgrade.h 971 B

1234567891011121314151617181920212223242526272829303132333435
  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. class pkgDepCache;
  11. class OpProgress;
  12. namespace APT {
  13. namespace Upgrade {
  14. // FIXME: make this "enum class UpgradeMode {" once we enable c++11
  15. enum UpgradeMode {
  16. FORBID_REMOVE_PACKAGES = 1,
  17. FORBID_INSTALL_NEW_PACKAGES = 2
  18. };
  19. bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
  20. }
  21. }
  22. // please use APT::Upgrade::Upgrade() instead
  23. bool pkgDistUpgrade(pkgDepCache &Cache, OpProgress * const Progress = NULL);
  24. bool pkgAllUpgrade(pkgDepCache &Cache, OpProgress * const Progress = NULL);
  25. bool pkgMinimizeUpgrade(pkgDepCache &Cache);
  26. #endif