]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.h
reorganize WriteScenario to add a WriteLimitedScenario in which a scenario
[apt.git] / apt-pkg / edsp.h
index 31f8891f3681bb416c0723c691c8864e9ee57214..db4f06a7c4b6cbd9c28a9113985ba1300e6c39a9 100644 (file)
@@ -8,20 +8,37 @@
 #define PKGLIB_EDSP_H
 
 #include <apt-pkg/depcache.h>
+#include <apt-pkg/cacheset.h>
 
 #include <string>
 
 class EDSP                                                             /*{{{*/
 {
+       // we could use pkgCache::DepType and ::Priority, but these would be localized stringsā€¦
+       static const char * const PrioMap[];
+       static const char * const DepMap[];
+
        bool static ReadLine(int const input, std::string &line);
        bool static StringToBool(char const *answer, bool const defValue);
 
+       void static WriteScenarioVersion(pkgDepCache &Cache, FILE* output,
+                                        pkgCache::PkgIterator const &Pkg,
+                                        pkgCache::VerIterator const &Ver);
+       void static WriteScenarioDependency(pkgDepCache &Cache, FILE* output,
+                                           pkgCache::PkgIterator const &Pkg,
+                                           pkgCache::VerIterator const &Ver);
+       void static WriteScenarioLimitedDependency(pkgDepCache &Cache, FILE* output,
+                                                  pkgCache::PkgIterator const &Pkg,
+                                                  pkgCache::VerIterator const &Ver,
+                                                  APT::PackageSet const &pkgset);
 public:
        bool static WriteRequest(pkgDepCache &Cache, FILE* output,
                                 bool const upgrade = false,
                                 bool const distUpgrade = false,
                                 bool const autoRemove = false);
        bool static WriteScenario(pkgDepCache &Cache, FILE* output);
+       bool static WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
+                                        APT::PackageSet const &pkgset);
        bool static ReadResponse(int const input, pkgDepCache &Cache);
 
        // ReadScenario is provided by the listparser infrastructure