]> git.saurik.com Git - apt.git/blame - apt-pkg/upgrade.h
headers are for declarations only
[apt.git] / apt-pkg / upgrade.h
CommitLineData
82e369c4
MV
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3/* ######################################################################
4
5 Upgrade - Upgrade/DistUpgrade releated code
6
7 ##################################################################### */
8 /*}}}*/
9
10#ifndef PKGLIB_UPGRADE_H
11#define PKGLIB_UPGRADE_H
12
2a884c61 13#include <stddef.h>
67caa2e6 14#include <apt-pkg/macros.h>
2a884c61 15
453b82a3 16class pkgDepCache;
2a884c61 17class OpProgress;
453b82a3 18
82e369c4
MV
19namespace APT {
20 namespace Upgrade {
21 // FIXME: make this "enum class UpgradeMode {" once we enable c++11
22 enum UpgradeMode {
23 FORBID_REMOVE_PACKAGES = 1,
fa5404ab
DK
24 FORBID_INSTALL_NEW_PACKAGES = 2,
25 ALLOW_EVERYTHING = 0
82e369c4 26 };
fa5404ab 27#if APT_PKG_ABI >= 413
2a884c61 28 bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress = NULL);
fa5404ab
DK
29#else
30 bool Upgrade(pkgDepCache &Cache, int UpgradeMode);
31 bool Upgrade(pkgDepCache &Cache, int UpgradeMode, OpProgress * const Progress);
32#endif
82e369c4
MV
33 }
34}
35
3f506f68 36// please use APT::Upgrade::Upgrade() instead
fa5404ab
DK
37APT_DEPRECATED bool pkgDistUpgrade(pkgDepCache &Cache);
38APT_DEPRECATED bool pkgAllUpgrade(pkgDepCache &Cache);
82e369c4 39
2a884c61 40bool pkgMinimizeUpgrade(pkgDepCache &Cache);
82e369c4 41#endif