summaryrefslogtreecommitdiff
path: root/python/progress.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2005-10-21 21:07:38 +0000
committerMichael Vogt <mvo@debian.org>2005-10-21 21:07:38 +0000
commitf701fc174a88d8f2b418a032571ff40ed6fd56e6 (patch)
treed2a0ebed225e24207c952430390a51d3628a03fb /python/progress.h
parent76bf6920764c1a9a67586d23743f31311b66b811 (diff)
parentbd6df1d8419eb3403e64191681b32fbd1f3accac (diff)
downloadpython-apt-f701fc174a88d8f2b418a032571ff40ed6fd56e6.tar.gz
* merged with apt--mvo
Patches applied: * michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-77 * merged with the progress reporting code * michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-78 * progress interface fully working now, commit interface too * michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-79 * fix a crasher in the install interface * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--base-0 tag of michael.vogt@ubuntu.com--2005/python-apt--mvo--0--patch-43 * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-1 * support the apt--progress-reporting--0 branch (using "InstallProgress.statusfd) * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-2 * support for update reporting via vte/progress bars added, including a evil "pass-me-my-file-descriptor" hack * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-3 * merged with python-apt--mvo * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-4 * merged from python-apt--mvo * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-5 * better support new python-apt, added example for gui-inst with support for VTE_PTY_KEEP_FD * michael.vogt@ubuntu.com--2005/python-apt--progress-reporting--0--patch-6 * removed the fdsend stuff again, libvte will be patched instead
Diffstat (limited to 'python/progress.h')
-rw-r--r--python/progress.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/progress.h b/python/progress.h
index f116c811..f04bd683 100644
--- a/python/progress.h
+++ b/python/progress.h
@@ -15,6 +15,7 @@
#include <apt-pkg/cdrom.h>
#include <Python.h>
+
class PyCallbackObj {
protected:
PyObject *callbackInst;
@@ -44,6 +45,10 @@ struct PyOpProgress : public OpProgress, public PyCallbackObj
struct PyFetchProgress : public pkgAcquireStatus, public PyCallbackObj
{
+ enum {
+ DLDone, DLQueued, DLFailed, DLHit, DLIgnored
+ };
+
void UpdateStatus(pkgAcquire::ItemDesc & Itm, int status);
virtual bool MediaChange(string Media, string Drive);
@@ -58,7 +63,6 @@ struct PyFetchProgress : public pkgAcquireStatus, public PyCallbackObj
bool Pulse(pkgAcquire * Owner);
PyFetchProgress() : PyCallbackObj() {};
-
};
struct PyInstallProgress : public PyCallbackObj