diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-04-11 14:19:44 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-04-11 14:19:44 +0000 |
| commit | a8074615c2bac880bf4fd7d5b15e621b88a20052 (patch) | |
| tree | 4e929c12c6997452335d5620b5b5208affb83698 /python/progress.h | |
| parent | 1b514e848902f609cba9b2247702fc6d714d2456 (diff) | |
| download | python-apt-a8074615c2bac880bf4fd7d5b15e621b88a20052.tar.gz | |
* cdrom interface added
Diffstat (limited to 'python/progress.h')
| -rw-r--r-- | python/progress.h | 17 |
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 |
