Verified Commit 67596333 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

Remove "total download" callback

The "total download" callback has been removed from libalpm in
1e60a5f00674a9a9b0
parent 45af4714
......@@ -174,7 +174,6 @@ static struct _alpm_cb_getset cb_getsets[N_CALLBACKS] = {
{ (alpm_cb_setter)alpm_option_set_logcb, pyalpm_logcb, CB_LOG },
{ (alpm_cb_setter)alpm_option_set_dlcb, pyalpm_dlcb, CB_DOWNLOAD },
{ (alpm_cb_setter)alpm_option_set_fetchcb, pyalpm_fetchcb, CB_FETCH },
{ (alpm_cb_setter)alpm_option_set_totaldlcb, pyalpm_totaldlcb, CB_TOTALDL },
{ (alpm_cb_setter)alpm_option_set_eventcb, pyalpm_eventcb, CB_EVENT },
{ (alpm_cb_setter)alpm_option_set_questioncb, pyalpm_questioncb, CB_QUESTION },
{ (alpm_cb_setter)alpm_option_set_progresscb, pyalpm_progresscb, CB_PROGRESS },
......@@ -289,10 +288,6 @@ struct PyGetSetDef pyalpm_handle_getset[] = {
" transferred :: int\n"
" total :: int\n",
&cb_getsets[CB_DOWNLOAD] },
{ "totaldlcb",
(getter)_get_cb_attr, (setter)_set_cb_attr,
"total download size callback: totaldlcb(total_size)",
&cb_getsets[CB_TOTALDL] },
{ "fetchcb",
(getter)_get_cb_attr, (setter)_set_cb_attr,
"download function\n"
......
......@@ -330,13 +330,6 @@ void pyalpm_dlcb(const char *filename, off_t xfered, off_t total) {
Py_CLEAR(result);
}
void pyalpm_totaldlcb(off_t total) {
PyObject *result;
result = PyObject_CallFunction(global_py_callbacks[CB_TOTALDL], "i", total);
if (!result) PyErr_Print();
Py_CLEAR(result);
}
int pyalpm_fetchcb(const char *url, const char *localpath, int force) {
PyObject *result;
result = PyObject_CallFunction(global_py_callbacks[CB_FETCH], "ssi", url, localpath, force);
......
......@@ -64,7 +64,6 @@ PyObject * option_remove_ignoregrp_alpm(PyObject *self, PyObject *args);
/** Callback options */
void pyalpm_logcb(alpm_loglevel_t level, const char *fmt, va_list va_args);
void pyalpm_dlcb(const char *filename, off_t xfered, off_t total);
void pyalpm_totaldlcb(off_t total);
int pyalpm_fetchcb(const char *url, const char *localpath, int force);
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment