opkg: improve download callback handling and integrate into opkg_update_package_lists
[oweals/opkg-lede.git] / libopkg / opkg_download.h
index 8b940e7253bef4677c51fadd4881a5a5b2a63d7f..39cd9a687321c6464975524c5a2b8a6831603e59 100644 (file)
 #include "opkg_conf.h"
 
 typedef void (*opkg_download_progress_callback)(int percent, char *url);
+typedef int (*curl_progress_func)(void *data, double t, double d, double ultotal, double ulnow);
 
-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);
 int opkg_download_pkg(opkg_conf_t *conf, pkg_t *pkg, const char *dir);
 /*
  * Downloads file from url, installs in package database, return package name.