summaryrefslogtreecommitdiff
path: root/python/progress.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-03-14 15:39:53 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-03-14 15:39:53 +0000
commite85acde9ac66221e7dae0ead2bb9d79140a1826b (patch)
treee0d53b23afc9b9c0d877eb62c94c77a2904c1b9d /python/progress.h
parentd06566c40340c80db43e47b171ceda579291ef66 (diff)
downloadpython-apt-e85acde9ac66221e7dae0ead2bb9d79140a1826b.tar.gz
* basic fetch interface, mostly stubs right now
Diffstat (limited to 'python/progress.h')
-rw-r--r--python/progress.h27
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