diff options
Diffstat (limited to 'python/progress.h')
| -rw-r--r-- | python/progress.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/python/progress.h b/python/progress.h index b18778b1..6ea0b16b 100644 --- a/python/progress.h +++ b/python/progress.h @@ -10,6 +10,7 @@ #define PROGRESS_H #include <apt-pkg/progress.h> +#include <apt-pkg/acquire.h> #include <Python.h> struct PyOpProgress : public OpProgress @@ -26,4 +27,30 @@ struct PyOpProgress : public OpProgress PyOpProgress() : OpProgress(), callbackInst(0) {}; }; + +struct PyFetchProgress : public pkgAcquireStatus +{ + PyObject *callbackInst; + + void setCallbackInst(PyObject *o) { + callbackInst = o; + } + + + void updateStatus(pkgAcquire::ItemDesc & Itm, int status); + + // apt interface + virtual bool MediaChange(string Media, string Drive); + virtual void IMSHit(pkgAcquire::ItemDesc &Itm); + virtual void Fetch(pkgAcquire::ItemDesc &Itm); + virtual void Done(pkgAcquire::ItemDesc &Itm); + virtual void Fail(pkgAcquire::ItemDesc &Itm); + virtual void Start(); + virtual void Stop(); + + bool Pulse(pkgAcquire * Owner); +}; + + + #endif |
