]>
git.saurik.com Git - apt.git/blob - apt-pkg/edsp.h
95132ebd0e98dc31ceb01111adc4b2db0773d0e8
1 // -*- mode: cpp; mode: fold -*-
3 /* ######################################################################
4 Set of methods to help writing and reading everything needed for EDSP
5 ##################################################################### */
10 #include <apt-pkg/depcache.h>
11 #include <apt-pkg/cacheset.h>
17 // we could use pkgCache::DepType and ::Priority, but these would be localized stringsā¦
18 static const char * const PrioMap
[];
19 static const char * const DepMap
[];
21 bool static ReadLine(int const input
, std::string
&line
);
22 bool static StringToBool(char const *answer
, bool const defValue
);
24 void static WriteScenarioVersion(pkgDepCache
&Cache
, FILE* output
,
25 pkgCache::PkgIterator
const &Pkg
,
26 pkgCache::VerIterator
const &Ver
);
27 void static WriteScenarioDependency(pkgDepCache
&Cache
, FILE* output
,
28 pkgCache::PkgIterator
const &Pkg
,
29 pkgCache::VerIterator
const &Ver
);
30 void static WriteScenarioLimitedDependency(pkgDepCache
&Cache
, FILE* output
,
31 pkgCache::PkgIterator
const &Pkg
,
32 pkgCache::VerIterator
const &Ver
,
33 APT::PackageSet
const &pkgset
);
35 bool static WriteRequest(pkgDepCache
&Cache
, FILE* output
,
36 bool const upgrade
= false,
37 bool const distUpgrade
= false,
38 bool const autoRemove
= false);
39 bool static WriteScenario(pkgDepCache
&Cache
, FILE* output
);
40 bool static WriteLimitedScenario(pkgDepCache
&Cache
, FILE* output
,
41 APT::PackageSet
const &pkgset
);
42 bool static ReadResponse(int const input
, pkgDepCache
&Cache
);
44 // ReadScenario is provided by the listparser infrastructure
45 bool static ReadRequest(int const input
, std::list
<std::string
> &install
,
46 std::list
<std::string
> &remove
, bool &upgrade
,
47 bool &distUpgrade
, bool &autoRemove
);
48 bool static ApplyRequest(std::list
<std::string
> const &install
,
49 std::list
<std::string
> const &remove
,
51 bool static WriteSolution(pkgDepCache
&Cache
, FILE* output
);
52 bool static WriteProgress(unsigned short const percent
, const char* const message
, FILE* output
);
53 bool static WriteError(std::string
const &message
, FILE* output
);
55 bool static ExecuteSolver(const char* const solver
, int *solver_in
, int *solver_out
);
56 bool static ResolveExternal(const char* const solver
, pkgDepCache
&Cache
,
57 bool const upgrade
, bool const distUpgrade
,
58 bool const autoRemove
);