28
28
/*@null@*/struct downloaditem *items;
29
29
/*@null@*/struct devices *devices;
31
struct database *database;
33
31
/* for showing what percentage was downloaded */
34
32
long long size_todo, size_done;
35
33
unsigned int last_percent;
38
36
/* Initialize a new download session */
39
retvalue downloadcache_initialize(enum spacecheckmode, off_t reserveddb, off_t reservedother, /*@out@*/struct downloadcache **download);
37
retvalue downloadcache_initialize(enum spacecheckmode, off_t /*reserveddb*/, off_t /*reservedother*/, /*@out@*/struct downloadcache **);
41
39
/* free all memory */
42
retvalue downloadcache_free(/*@null@*//*@only@*/struct downloadcache *download);
40
retvalue downloadcache_free(/*@null@*//*@only@*/struct downloadcache *);
44
42
/* queue a new file to be downloaded:
45
43
* results in RET_ERROR_WRONG_MD5, if someone else already asked
46
44
* for the same destination with other md5sum created. */
47
retvalue downloadcache_add(struct downloadcache *, struct database *, struct aptmethod *, const char *orig, const char *filekey, const struct checksums *);
45
retvalue downloadcache_add(struct downloadcache *, struct aptmethod *, const char * /*orig*/, const char * /*filekey*/, const struct checksums *);
49
47
/* some as above, only for more files... */
50
retvalue downloadcache_addfiles(struct downloadcache *cache,struct database *,
51
struct aptmethod *method,
52
const struct checksumsarray *origfiles,
53
const struct strlist *filekeys);
48
retvalue downloadcache_addfiles(struct downloadcache *, struct aptmethod *, const struct checksumsarray * /*origfiles*/, const struct strlist * /*filekeys*/);