summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-05-09 18:00:28 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-05-09 18:00:28 +0200
commitb57c0e355d7f27a74c860ed73700cf9241cb4e61 (patch)
tree43c0b71e4df4d9df7ae6bf64657d3ffb74753a04 /apt-pkg/edsp.h
parentebfeeaedf5bc357170cae971c0f6a1458ff65f65 (diff)
implement proper progress report with OpProgress
Diffstat (limited to 'apt-pkg/edsp.h')
-rw-r--r--apt-pkg/edsp.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 210188d03..743c3f5d1 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -11,6 +11,7 @@
#include <apt-pkg/depcache.h>
#include <apt-pkg/cacheset.h>
+#include <apt-pkg/progress.h>
#include <string>
@@ -46,13 +47,15 @@ public:
* \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
*
@@ -67,10 +70,11 @@ public:
*
* \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
*
@@ -83,11 +87,13 @@ public:
* \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
*
@@ -98,10 +104,11 @@ public:
*
* \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
*
@@ -202,13 +209,14 @@ public:
* \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