]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.h
tests: don't do boundless string compares with data()
[apt.git] / apt-pkg / edsp.h
index f1624cd6a81325a2efc8bd13dd8f4190d8abb168..60f8c28830eb0a8cbe0786e5bc6c054f2e06798d 100644 (file)
@@ -236,4 +236,41 @@ namespace EDSP                                                             /*{{{*/
                                    bool const autoRemove, OpProgress *Progress = NULL);
 }
                                                                        /*}}}*/
+class pkgPackageManager;
+namespace EIPP                                                         /*{{{*/
+{
+   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 flags, OpProgress * const Progress);
+   APT_HIDDEN bool WriteScenario(pkgDepCache &Cache, FileFd &output,
+        OpProgress * const Progress);
+
+   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