summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorLars Hjemli <hjemli@gmail.com>2009-07-31 15:38:38 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-07-31 15:39:51 (UTC)
commitd6f6072560c963065b13c704fa1fa6f8950e4bac (patch) (side-by-side diff)
tree096a542cd404d4a174f2f4a1da44ab0df99aa7c3 /cgit.h
parent286a905842dc0bec6d21a614ec4a97c5f19d5bc4 (diff)
downloadcgit-d6f6072560c963065b13c704fa1fa6f8950e4bac.zip
cgit-d6f6072560c963065b13c704fa1fa6f8950e4bac.tar.gz
cgit-d6f6072560c963065b13c704fa1fa6f8950e4bac.tar.bz2
Add generic filter/plugin infrastructure
The functions cgit_open_filter() and cgit_close_filter() can be used to execute filters on the output stream from cgit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 8c64efe..d0fff1f 100644
--- a/cgit.h
+++ b/cgit.h
@@ -130,4 +130,13 @@ struct cgit_query {
};
+struct cgit_filter {
+ char *cmd;
+ char **argv;
+ int old_stdout;
+ int pipe_fh[2];
+ int pid;
+ int exitstatus;
+};
+
struct cgit_config {
char *agefile;
@@ -249,4 +258,7 @@ extern const char *cgit_repobasename(const char *reponame);
extern int cgit_parse_snapshots_mask(const char *str);
+extern int cgit_open_filter(struct cgit_filter *filter);
+extern int cgit_close_filter(struct cgit_filter *filter);
+
#endif /* CGIT_H */