override.h 1.2 KB
Newer Older
Bernhard Link's avatar
Bernhard Link committed
1 2
#ifndef REPREPRO_OVERRIDE_H
#define REPREPRO_OVERRIDE_H
3

Bernhard Link's avatar
Bernhard Link committed
4
#ifndef REPREPRO_ERROR_H
5 6 7
#include "error.h"
#warning "What's hapening here?"
#endif
Bernhard Link's avatar
Bernhard Link committed
8
#ifndef REPREPRO_STRLIST_H
9 10
#include "strlist.h"
#endif
Bernhard Link's avatar
Bernhard Link committed
11
#ifndef REPREPRO_CHUNKS_H
12 13 14
#include "chunks.h"
#endif

15 16
struct overridefile;
struct overridedata;
17

18 19 20 21
/* to avoid typos */
#define PRIORITY_FIELDNAME "Priority"
#define SECTION_FIELDNAME "Section"

22 23
void override_free(/*@only@*//*@null@*/struct overridefile *);
retvalue override_read(const char *filename, /*@out@*/struct overridefile **, bool /*source*/);
24

25 26
/*@null@*//*@dependent@*/const struct overridedata *override_search(/*@null@*/const struct overridefile *, const char * /*package*/);
/*@null@*//*@dependent@*/const char *override_get(/*@null@*/const struct overridedata *, const char * /*field*/);
27 28 29

/* add new fields to otherreplaces, but not "Section", or "Priority".
 * incorporates otherreplaces, or frees them on error */
30
/*@null@*/struct fieldtoadd *override_addreplacefields(const struct overridedata *, /*@only@*/struct fieldtoadd *);
31 32

/* as above, but all fields. and may return NULL if there are no overrides */
33
retvalue override_allreplacefields(const struct overridedata *, /*@out@*/struct fieldtoadd **);
34 35

#endif