]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.h
Most interfaces (Maemo) need a high-level name :/.
[apt.git] / apt-pkg / edsp.h
index 3e0982a560fd0913d792ec03afdbd1b4d0595b75..ed49ac28ca9c57b76ad659f3b49b70937b3c8117 100644 (file)
@@ -72,7 +72,7 @@ namespace EDSP                                                                /*{{{*/
         *  it doesn't make sense from an APT resolver point of view like versions
         *  with a negative pin to enable the solver to propose even that as a
         *  solution or at least to be able to give a hint what can be done to
-        *  statisfy a request.
+        *  satisfy a request.
         *
         *  \param Cache is the known package universe
         *  \param output is written to this "file"
@@ -236,16 +236,41 @@ namespace EDSP                                                            /*{{{*/
                                    bool const autoRemove, OpProgress *Progress = NULL);
 }
                                                                        /*}}}*/
+class pkgPackageManager;
 namespace EIPP                                                         /*{{{*/
 {
-   APT_HIDDEN bool OrderInstall(char const * const solver, pkgDepCache &Cache,
-        unsigned int const version, OpProgress * const Progress);
+   namespace Request
+   {
+      enum Flags
+      {
+        IMMEDIATE_CONFIGURATION_ALL = (1 << 0), /*!< try to keep the least amount of packages unconfigured as possible at all times */
+        NO_IMMEDIATE_CONFIGURATION = (1 << 1), /*!< do not perform immediate configuration at all */
+        ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS = (1 << 2), /*!< just as the name suggests, very special case and dangerous! */
+      };
+   }
+
    APT_HIDDEN bool WriteRequest(pkgDepCache &Cache, FileFd &output,
-        unsigned int const version, OpProgress * const Progress);
+        unsigned int const flags, OpProgress * const Progress);
    APT_HIDDEN bool WriteScenario(pkgDepCache &Cache, FileFd &output,
         OpProgress * const Progress);
-   APT_HIDDEN bool ReadResponse(int const input, pkgDepCache &Cache,
+
+   APT_HIDDEN bool OrderInstall(char const * const planner, pkgPackageManager * const PM,
+        unsigned int const version, OpProgress * const Progress);
+   APT_HIDDEN bool ReadResponse(int const input, pkgPackageManager * const PM,
         OpProgress * const Progress);
+
+   enum class PKG_ACTION
+   {
+      NOOP,
+      INSTALL,
+      REINSTALL,
+      REMOVE
+   };
+   bool ReadRequest(int const input,
+        std::list<std::pair<std::string,PKG_ACTION>> &actions,
+        unsigned int &flags);
+   bool ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,
+        pkgDepCache &Cache);
 }
                                                                        /*}}}*/
 #endif