X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=libopkg%2Fopkg_download.h;h=7415cf3d2c060b02f5985f14e4294472688e817e;hb=1a4c5369c4f62b0fc573f22fa53724603672910a;hp=b87838085d5f9940a46c7da7934c279b20b3a187;hpb=f4a787e50beb527aeffd847df6b734b29967bd96;p=project%2Fopkg-lede.git diff --git a/libopkg/opkg_download.h b/libopkg/opkg_download.h index b878380..7415cf3 100644 --- a/libopkg/opkg_download.h +++ b/libopkg/opkg_download.h @@ -1,4 +1,4 @@ -/* opkg_download.h - the itsy package management system +/* opkg_download.h - the opkg package management system Carl D. Worth @@ -18,16 +18,19 @@ #ifndef OPKG_DOWNLOAD_H #define OPKG_DOWNLOAD_H -#include "opkg_conf.h" +#include "pkg.h" -typedef void (*opkg_download_progress_callback)(int percent, char *url); +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_pkg(opkg_conf_t *conf, pkg_t *pkg, const char *dir); +int opkg_download(const char *src, const char *dest_file_name, + curl_progress_func cb, void *data, const short hide_error); +int opkg_download_pkg(pkg_t * pkg, const char *dir); /* - * Downloads file from url, installs in package database, return package name. + * Downloads file from url, installs in package database, return package name. */ -int opkg_prepare_url_for_install(opkg_conf_t *conf, const char *url, char **namep); +int opkg_prepare_url_for_install(const char *url, char **namep); -int opkg_verify_file (opkg_conf_t *conf, char *text_file, char *sig_file); +int opkg_verify_file(char *text_file, char *sig_file); #endif