summaryrefslogtreecommitdiff
path: root/python/progress.h
diff options
context:
space:
mode:
Diffstat (limited to 'python/progress.h')
-rw-r--r--python/progress.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/python/progress.h b/python/progress.h
index 2514623a..f116c811 100644
--- a/python/progress.h
+++ b/python/progress.h
@@ -12,6 +12,7 @@
#include <apt-pkg/progress.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/packagemanager.h>
+#include <apt-pkg/cdrom.h>
#include <Python.h>
class PyCallbackObj {
@@ -24,7 +25,8 @@ class PyCallbackObj {
callbackInst = o;
}
- bool RunSimpleCallback(const char *method, PyObject *arglist=NULL);
+ bool RunSimpleCallback(const char *method, PyObject *arglist=NULL,
+ PyObject **result=NULL);
PyCallbackObj() : callbackInst(0) {};
~PyCallbackObj() {Py_DECREF(callbackInst); };
@@ -70,4 +72,17 @@ struct PyInstallProgress : public PyCallbackObj
PyInstallProgress() : PyCallbackObj() {};
};
+struct PyCdromProgress : public pkgCdromStatus, public PyCallbackObj
+{
+ // update steps, will be called regularly as a "pulse"
+ virtual void Update(string text="", int current=0);
+ // ask for cdrom insert
+ virtual bool ChangeCdrom();
+ // ask for cdrom name
+ virtual bool AskCdromName(string &Name);
+
+ PyCdromProgress() : PyCallbackObj() {};
+};
+
+
#endif