summaryrefslogtreecommitdiff
path: root/lib/libalpm/server.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/server.h')
-rw-r--r--lib/libalpm/server.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/libalpm/server.h b/lib/libalpm/server.h
index 218c172a..258df223 100644
--- a/lib/libalpm/server.h
+++ b/lib/libalpm/server.h
@@ -23,7 +23,8 @@
#include "list.h"
#include <time.h>
-#include <ftplib.h>
+
+#include <fetch.h>
#define FREESERVER(p) \
do { \
@@ -37,11 +38,14 @@ do { \
/* Servers */
typedef struct __pmserver_t {
- char *protocol;
- char *server;
char *path;
+ struct url *s_url;
} pmserver_t;
+#define PM_DLBUF_LEN (1024 * 10)
+
+typedef void (*download_progress_cb)(const char *filename, int xfered, int total);
+
pmserver_t *_alpm_server_new(char *url);
void _alpm_server_free(void *data);
int _alpm_downloadfiles(pmlist_t *servers, const char *localpath, pmlist_t *files);
@@ -50,15 +54,7 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath,
char *_alpm_fetch_pkgurl(char *target);
-extern FtpCallback pm_dlcb;
-
-/* progress bar */
-extern char *pm_dlfnm;
-extern int *pm_dloffset;
-extern struct timeval *pm_dlt0, *pm_dlt;
-extern float *pm_dlrate;
-extern int *pm_dlxfered1;
-extern unsigned char *pm_dleta_h, *pm_dleta_m, *pm_dleta_s;
+extern download_progress_cb pm_dlcb;
#endif /* _ALPM_SERVER_H */