]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.h
close server if parsing of header field failed
[apt.git] / apt-pkg / edsp.h
index 347304390ce76fd067df930d024e6209430e0144..f1624cd6a81325a2efc8bd13dd8f4190d8abb168 100644 (file)
@@ -109,8 +109,9 @@ namespace EDSP                                                              /*{{{*/
         *
         *  This method takes care of interpreting whatever the solver sends
         *  through the standard output like a solution, progress or an error.
-        *  The main thread should handle his control over to this method to
-        *  wait for the solver to finish the given task
+        *  The main thread should hand his control over to this method to
+        *  wait for the solver to finish the given task. The file descriptor
+        *  used as input is completely consumed and closed by the method.
         *
         *  \param input file descriptor with the response from the solver
         *  \param Cache the solution should be applied on if any
@@ -158,20 +159,20 @@ namespace EDSP                                                            /*{{{*/
                                 std::list<std::string> const &remove,
                                 pkgDepCache &Cache);
 
-       /** \brief encodes the changes in the Cache as a EDSP solution
+       /** \brief formats a solution stanza for the given version
         *
-        *  The markers in the Cache are observed and send to given
-        *  file. The solution isn't checked for consistency or alike,
-        *  so even broken solutions can be written successfully,
-        *  but the front-end revicing it will properly fail then.
+        *  EDSP uses a simple format for reporting solutions:
+        *  A single required field name with an ID as value.
+        *  Additional fields might appear as debug aids.
         *
-        *  \param Cache which represents the solution
-        *  \param output to write the stanzas forming the solution to
+        *  \param output to write the stanza forming the solution to
+        *  \param Type of the stanza, used as field name
+        *  \param Ver this stanza applies to
         *
-        *  \return true if solution could be written, otherwise false
+        *  \return true if stanza could be written, otherwise false
         */
-       bool WriteSolution(pkgDepCache &Cache, FileFd &output);
-       bool WriteSolution(pkgDepCache &Cache, FILE* output) APT_DEPRECATED_MSG("Use FileFd-based interface instead");
+       bool WriteSolutionStanza(FileFd &output, char const * const Type, pkgCache::VerIterator const &Ver);
+       bool WriteSolution(pkgDepCache &Cache, FILE* output) APT_DEPRECATED_MSG("Use FileFd-based single-stanza interface instead");
 
        /** \brief sends a progress report
         *