tracking.h 2.62 KB
Newer Older
1 2 3 4
#ifndef REPREPRO_TRACKING_H
#define REPREPRO_TRACKING_H


5 6
#ifndef REPREPRO_DATABASE_H
#include "database.h"
7
#endif
8 9 10
#ifndef REPREPRO_TRACKINGT_H
#include "trackingt.h"
#endif
11 12 13 14
#ifndef REPREPRO_DISTRIBUTION_H
#include "distribution.h"
#endif

Bernhard Link's avatar
Bernhard Link committed
15
retvalue tracking_parse(struct distribution *, struct configiterator *);
16

17
/* high-level retrack of the whole distribution */
18
retvalue tracking_retrack(struct distribution *, bool /*evenifnotstale*/);
19

20
retvalue tracking_initialize(/*@out@*/trackingdb *, const struct distribution *, bool readonly);
21
retvalue tracking_done(trackingdb);
22 23
retvalue tracking_listdistributions(/*@out@*/struct strlist *);
retvalue tracking_drop(const char *);
24

25
retvalue tracking_reset(trackingdb);
26
retvalue tracking_rereference(struct distribution *);
27

28 29
retvalue trackedpackage_addfilekey(trackingdb, struct trackedpackage *, enum filetype, /*@only@*/char * /*filekey*/, bool /*used*/);
retvalue trackedpackage_adddupfilekeys(trackingdb, struct trackedpackage *, enum filetype, const struct strlist * /*filekeys*/, bool /*used*/);
30 31 32 33 34 35
retvalue trackedpackage_removefilekeys(trackingdb, struct trackedpackage *, const struct strlist *);
void trackedpackage_free(struct trackedpackage *);

retvalue tracking_get(trackingdb, const char * /*sourcename*/, const char * /*version*/, /*@out@*/struct trackedpackage **);
retvalue tracking_getornew(trackingdb, const char * /*name*/, const char * /*version*/, /*@out@*/struct trackedpackage **);
retvalue tracking_save(trackingdb, /*@only@*/struct trackedpackage *);
36
retvalue tracking_remove(trackingdb, const char * /*sourcename*/, const char * /*version*/);
37 38 39 40
retvalue tracking_printall(trackingdb);

retvalue trackingdata_summon(trackingdb, const char *, const char *, struct trackingdata *);
retvalue trackingdata_new(trackingdb, struct trackingdata *);
41
retvalue trackingdata_switch(struct trackingdata *, const char *, const char *);
42 43
struct package;
retvalue trackingdata_insert(struct trackingdata *, enum filetype, const struct strlist * /*filekeys*/, /*@null@*/const struct package * /*oldpackage*/, /*@null@*/const struct strlist * /*oldfilekeys*/);
44
retvalue trackingdata_remove(struct trackingdata *, const char */*oldsource*/, const char * /*oldversion*/, const struct strlist * /*filekeys*/);
45
void trackingdata_done(struct trackingdata *);
46
/* like _done but actually do something */
47
retvalue trackingdata_finish(trackingdb, struct trackingdata *);
48 49

/* look at all listed packages and remove everything not needed */
50
retvalue tracking_tidyall(trackingdb);
51

52
retvalue tracking_removepackages(trackingdb, struct distribution *, const char * /*sourcename*/, /*@null@*/const char * /*version*/);
53
#endif /*REPREPRO_TRACKING_H*/