summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-04 19:53:54 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-04 19:53:54 +0200
commit71608330b9b2bd95a0481ca53cd58b584fd61e42 (patch)
tree0faa250dcda0ff2f47f02e75b88b7f070d3c8daf /apt-pkg/edsp.h
parent307d9eb2d13ee59191b86ffec2f36ba3fffc5c20 (diff)
edsp: use a stanza based interface for solution writing
EDSP had a WriteSolution method to write out the entire solution based on the inspection of a given pkgDepCache, but that is rather inflexible both for EDSP itself and for other EDSP like-protocols. It seems better to use a smaller scope in printing just a single stanza based on a given version as there is more reuse potential.
Diffstat (limited to 'apt-pkg/edsp.h')
-rw-r--r--apt-pkg/edsp.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 347304390..57d4214e8 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -158,20 +158,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
*