summaryrefslogtreecommitdiffstats
path: root/override.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
commit4b8a0f3f3dcf60dac2ce308ea08d413a535af29f (patch)
tree0f09c0ad2a4d0f535d89040a63dc3a866a6606e6 /override.h
parentInitial commit. (diff)
downloadreprepro-4b8a0f3f3dcf60dac2ce308ea08d413a535af29f.tar.xz
reprepro-4b8a0f3f3dcf60dac2ce308ea08d413a535af29f.zip
Adding upstream version 5.4.4.upstream/5.4.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'override.h')
-rw-r--r--override.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/override.h b/override.h
new file mode 100644
index 0000000..f97d359
--- /dev/null
+++ b/override.h
@@ -0,0 +1,35 @@
+#ifndef REPREPRO_OVERRIDE_H
+#define REPREPRO_OVERRIDE_H
+
+#ifndef REPREPRO_ERROR_H
+#include "error.h"
+#warning "What's hapening here?"
+#endif
+#ifndef REPREPRO_STRLIST_H
+#include "strlist.h"
+#endif
+#ifndef REPREPRO_CHUNKS_H
+#include "chunks.h"
+#endif
+
+struct overridefile;
+struct overridedata;
+
+/* to avoid typos */
+#define PRIORITY_FIELDNAME "Priority"
+#define SECTION_FIELDNAME "Section"
+
+void override_free(/*@only@*//*@null@*/struct overridefile *);
+retvalue override_read(const char *filename, /*@out@*/struct overridefile **, bool /*source*/);
+
+/*@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*/);
+
+/* add new fields to otherreplaces, but not "Section", or "Priority".
+ * incorporates otherreplaces, or frees them on error */
+/*@null@*/struct fieldtoadd *override_addreplacefields(const struct overridedata *, /*@only@*/struct fieldtoadd *);
+
+/* as above, but all fields. and may return NULL if there are no overrides */
+retvalue override_allreplacefields(const struct overridedata *, /*@out@*/struct fieldtoadd **);
+
+#endif