summaryrefslogtreecommitdiff
path: root/lib/libalpm/server.h
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-31 06:39:59 +0000
committerAaron Griffin <aaron@archlinux.org>2006-10-31 06:39:59 +0000
commitaf2fb3324a925af6caa9d53aacac92173fc47885 (patch)
treeb7abb647d27db75a1d937eea24cd5eccac6e5db8 /lib/libalpm/server.h
parent78c0badc9b3629c5156d4bd0733a3e9a1e4e92c6 (diff)
downloadpacman-af2fb3324a925af6caa9d53aacac92173fc47885.tar.xz
Numerous changes:
* Furthered the "lazy caching" to force the pkgcache to read nothing (INFRQ_NONE) by default. Anything requiring package data should now check the infolevel of each package and attempt to update it. This could be ironed out a bit more later (by using the front-end get_info function * Switched to libfetch. Drastic changes to the download code and the callback progress bar functions. Also fixed the return value of _alpm_downloadfiles_forreal. Downloading now supports http, ftp, https, and files urls, along with 'mtime's and numerous other fancy features from libfetch.
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 */