summaryrefslogtreecommitdiff
path: root/swig/python
diff options
context:
space:
mode:
authorMichael Andres <ma@suse.de>2009-09-22 21:42:55 +0200
committerMichael Andres <ma@suse.de>2009-09-22 21:43:50 +0200
commitaf34fb655f2f3821c6dcbbabe8efbc643a48d691 (patch)
tree5fb032a5066f58b8dbe4b95dad7d0c96161fe04f /swig/python
parent552be1f3bd756ced07566cec912d34189e08dac5 (diff)
downloadlibzypp-bindings-af34fb655f2f3821c6dcbbabe8efbc643a48d691.tar.gz
libzypp-bindings-af34fb655f2f3821c6dcbbabe8efbc643a48d691.tar.bz2
libzypp-bindings-af34fb655f2f3821c6dcbbabe8efbc643a48d691.zip
Remove reference to dead zypp::ScanDBReport.
Diffstat (limited to 'swig/python')
-rw-r--r--swig/python/callbacks.i68
1 files changed, 0 insertions, 68 deletions
diff --git a/swig/python/callbacks.i b/swig/python/callbacks.i
index 5367bfd..6f234fd 100644
--- a/swig/python/callbacks.i
+++ b/swig/python/callbacks.i
@@ -1,71 +1,3 @@
-struct ScanRpmDbReceive
-{
- void set_pymethod(PyObject *pyfunc);
-};
-
%{
- namespace zypp
- {
- struct ScanRpmDbReceive : public callback::ReceiveReport<target::rpm::ScanDBReport>
- {
- typedef target::rpm::ScanDBReport Report;
-
- ScanRpmDbReceive()
- : _pyfunc( 0 )
- { connect(); }
-
- ~ScanRpmDbReceive()
- { disconnect(); }
-
- virtual void start()
- {
- std::cerr << "ScanRpmDbReceive start" << std::endl;
- _last = -1;
- }
-
- virtual bool progress(int value)
- {
- if ( value == _last )
- return Report::progress( value );
- _last = value;
-
- if ( ! _pyfunc )
- return Report::progress( value );
-
- bool ret = Report::progress( value );
- PyObject * arglist = Py_BuildValue( "(i)", value ); // Build argument list
- PyObject * result = PyEval_CallObject( _pyfunc, arglist ); // Call Python
- Py_DECREF( arglist ); // Trash arglist
- if ( result ) { // If no errors, return bool
- ret = PyLong_AsLong( result );
- }
- Py_XDECREF( result );
- return ret;
- }
-
- virtual Action problem( target::rpm::ScanDBReport::Error error, const std::string & description )
- {
- //std::cerr << "ScanRpmDbReceive problem" << std::endl;
- return Report::problem( error, description );
- }
-
- virtual void finish( Error error, const std::string & reason )
- {
- //std::cerr << "ScanRpmDbReceive finish" << std::endl;
- }
-
- void set_pymethod( PyObject * pyfunc_r )
- {
- Py_INCREF( pyfunc_r );
- if ( _pyfunc )
- Py_DECREF( _pyfunc );
- _pyfunc = pyfunc_r;
- }
-
- private:
- int _last;
- PyObject * _pyfunc;
- };
- }
%}