diff options
author | Lars Hjemli <hjemli@gmail.com> | 2009-08-01 00:38:38 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-08-01 00:39:51 (JST) |
commit | d6f6072560c963065b13c704fa1fa6f8950e4bac (patch) | |
tree | 096a542cd404d4a174f2f4a1da44ab0df99aa7c3 /cgit.h | |
parent | 286a905842dc0bec6d21a614ec4a97c5f19d5bc4 (diff) | |
download | cgit-d6f6072560c963065b13c704fa1fa6f8950e4bac.zip cgit-d6f6072560c963065b13c704fa1fa6f8950e4bac.tar.gz |
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')
-rw-r--r-- | cgit.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -129,6 +129,15 @@ struct cgit_query { | |||
129 | int showmsg; | 129 | int showmsg; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | struct cgit_filter { | ||
133 | char *cmd; | ||
134 | char **argv; | ||
135 | int old_stdout; | ||
136 | int pipe_fh[2]; | ||
137 | int pid; | ||
138 | int exitstatus; | ||
139 | }; | ||
140 | |||
132 | struct cgit_config { | 141 | struct cgit_config { |
133 | char *agefile; | 142 | char *agefile; |
134 | char *cache_root; | 143 | char *cache_root; |
@@ -248,5 +257,8 @@ extern const char *cgit_repobasename(const char *reponame); | |||
248 | 257 | ||
249 | extern int cgit_parse_snapshots_mask(const char *str); | 258 | extern int cgit_parse_snapshots_mask(const char *str); |
250 | 259 | ||
260 | extern int cgit_open_filter(struct cgit_filter *filter); | ||
261 | extern int cgit_close_filter(struct cgit_filter *filter); | ||
262 | |||
251 | 263 | ||
252 | #endif /* CGIT_H */ | 264 | #endif /* CGIT_H */ |