-opkg_download_progress_callback opkg_cb_download_progress = NULL;
-
-int
-curl_progress_func (char* url,
- double t, /* dltotal */
- double d, /* dlnow */
- double ultotal,
- double ulnow)
-{
- int p = (t) ? d*100/t : 0;
-
- if (opkg_cb_download_progress)
- {
- static int prev = -1;
-
- /* don't report the same percentage multiple times
- * (this can occur due to rounding) */
- if (prev == p)
- return 0;
- prev = p;
-
- opkg_cb_download_progress (p, url);
- return 0;
- }
- return 0;
-}
-
-int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name)
+int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name, curl_progress_func cb, void *data)