From a8074615c2bac880bf4fd7d5b15e621b88a20052 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 11 Apr 2005 14:19:44 +0000 Subject: * cdrom interface added --- python/progress.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'python/progress.h') 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 #include #include +#include #include 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 -- cgit v1.2.3