#ifndef PKGLIB_EDSP_H
#define PKGLIB_EDSP_H
-#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheset.h>
+#include <list>
#include <string>
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/progress.h>
+#endif
+
+class pkgDepCache;
+class OpProgress;
+
class EDSP /*{{{*/
{
// we could use pkgCache::DepType and ::Priority, but these would be localized stringsā¦
* \param upgrade is true if it is an request like apt-get upgrade
* \param distUpgrade is true if it is a request like apt-get dist-upgrade
* \param autoRemove is true if removal of unneeded packages should be performed
+ * \param Progress is an instance to report progress to
*
* \return true if request was composed successfully, otherwise false
*/
bool static WriteRequest(pkgDepCache &Cache, FILE* output,
bool const upgrade = false,
bool const distUpgrade = false,
- bool const autoRemove = false);
+ bool const autoRemove = false,
+ OpProgress *Progress = NULL);
/** \brief creates the scenario representing the package universe
*
*
* \param Cache is the known package universe
* \param output is written to this "file"
+ * \param Progress is an instance to report progress to
*
* \return true if universe was composed successfully, otherwise false
*/
- bool static WriteScenario(pkgDepCache &Cache, FILE* output);
+ bool static WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress = NULL);
/** \brief creates a limited scenario representing the package universe
*
* \param Cache is the known package universe
* \param output is written to this "file"
* \param pkgset is a set of packages the universe should be limited to
+ * \param Progress is an instance to report progress to
*
* \return true if universe was composed successfully, otherwise false
*/
bool static WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
- APT::PackageSet const &pkgset);
+ APT::PackageSet const &pkgset,
+ OpProgress *Progress = NULL);
/** \brief waits and acts on the information returned from the solver
*
*
* \param input file descriptor with the response from the solver
* \param Cache the solution should be applied on if any
+ * \param Progress is an instance to report progress to
*
* \return true if a solution is found and applied correctly, otherwise false
*/
- bool static ReadResponse(int const input, pkgDepCache &Cache);
+ bool static ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
/** \brief search and read the request stanza for action later
*
*
* The first line of the message should be a short description
* of the error so it can be used for dialog titles or alike
+ *
+ * \param uuid of this error message
+ * \param message is free form text to discribe the error
+ * \param output the front-end listens for error messages
*/
- bool static WriteError(std::string const &message, FILE* output);
+ bool static WriteError(char const * const uuid, std::string const &message, FILE* output);
+
/** \brief executes the given solver and returns the pipe ends
*
* \param upgrade is true if it is a request like apt-get upgrade
* \param distUpgrade is true if it is a request like apt-get dist-upgrade
* \param autoRemove is true if unneeded packages should be removed
+ * \param Progress is an instance to report progress to
*
* \return true if the solver has successfully solved the problem,
* otherwise false
*/
bool static ResolveExternal(const char* const solver, pkgDepCache &Cache,
bool const upgrade, bool const distUpgrade,
- bool const autoRemove);
+ bool const autoRemove, OpProgress *Progress = NULL);
};
/*}}}*/
#endif