]> git.saurik.com Git - apt.git/blob - apt-private/private-install.h
separate implementation from declaration of TryTo{Install,Remove}
[apt.git] / apt-private / private-install.h
1 #ifndef APT_PRIVATE_INSTALL_H
2 #define APT_PRIVATE_INSTALL_H
3
4 #include <apt-pkg/cachefile.h>
5 #include <apt-pkg/configuration.h>
6 #include <apt-pkg/pkgcache.h>
7 #include <apt-pkg/cacheiterators.h>
8 #include <apt-pkg/cacheset.h>
9 #include <apt-pkg/macros.h>
10
11 #include <list>
12 #include <string>
13 #include <utility>
14
15 class CacheFile;
16 class CommandLine;
17 class pkgProblemResolver;
18
19 #define RAMFS_MAGIC 0x858458f6
20
21 APT_PUBLIC bool DoInstall(CommandLine &Cmd);
22
23 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache,
24 std::map<unsigned short, APT::VersionSet> &verset);
25 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache);
26
27 APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
28 bool Safety = true);
29
30
31 // TryToInstall - Mark a package for installation /*{{{*/
32 struct APT_PUBLIC TryToInstall {
33 pkgCacheFile* Cache;
34 pkgProblemResolver* Fix;
35 bool FixBroken;
36 unsigned long AutoMarkChanged;
37 APT::PackageSet doAutoInstallLater;
38
39 TryToInstall(pkgCacheFile &Cache, pkgProblemResolver *PM, bool const FixBroken) : Cache(&Cache), Fix(PM),
40 FixBroken(FixBroken), AutoMarkChanged(0) {};
41
42 void operator() (pkgCache::VerIterator const &Ver);
43 bool propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > const &start, std::ostream &out);
44 void doAutoInstall();
45 };
46 /*}}}*/
47 // TryToRemove - Mark a package for removal /*{{{*/
48 struct APT_PUBLIC TryToRemove {
49 pkgCacheFile* Cache;
50 pkgProblemResolver* Fix;
51 bool PurgePkgs;
52
53 TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM) : Cache(&Cache), Fix(PM),
54 PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};
55
56 void operator() (pkgCache::VerIterator const &Ver);
57 };
58 /*}}}*/
59
60
61 #endif