filelist.h 1.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#ifndef REPREPRO_FILELIST_H
#define REPREPRO_FILELIST_H

#ifndef REPREPRO_RELEASE_H
#include "release.h"
#endif

struct filelist_list;

retvalue filelist_init(struct filelist_list **list);

12
retvalue filelist_addpackage(struct filelist_list *, const char *package, const char *section, const char *filekey);
13 14 15 16

retvalue filelist_write(struct filelist_list *list, struct filetorelease *file);

void filelist_free(/*@only@*/struct filelist_list *);
17

18
retvalue fakefilelist(const char *filekey);
19 20
retvalue filelists_translate(struct table *, struct table *);

21 22 23
/* for use in routines reading the data: */
struct filelistcompressor {
	unsigned int offsets[256];
24 25
	size_t size, len;
	unsigned int dirdepth;
26 27 28 29
	char *filelist;
};
retvalue filelistcompressor_setup(/*@out@*/struct filelistcompressor *);
retvalue filelistcompressor_add(struct filelistcompressor *, const char *, size_t);
30
retvalue filelistcompressor_finish(struct filelistcompressor *, /*@out@*/char **, /*@out@*/size_t *);
31
void filelistcompressor_cancel(struct filelistcompressor *);
32
#endif