summaryrefslogtreecommitdiffabout
path: root/cgit.h
Side-by-side diff
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 5f7af51..d90ccdc 100644
--- a/cgit.h
+++ b/cgit.h
@@ -17,2 +17,3 @@
#include <archive.h>
+#include <string-list.h>
#include <xdiff-interface.h>
@@ -50,2 +51,11 @@ typedef void (*linediff_fn)(char *line, int len);
+struct cgit_filter {
+ char *cmd;
+ char **argv;
+ int old_stdout;
+ int pipe_fh[2];
+ int pid;
+ int exitstatus;
+};
+
struct cgit_repo {
@@ -66,2 +76,5 @@ struct cgit_repo {
time_t mtime;
+ struct cgit_filter *about_filter;
+ struct cgit_filter *commit_filter;
+ struct cgit_filter *source_filter;
};
@@ -138,2 +151,3 @@ struct cgit_config {
char *footer;
+ char *head_include;
char *header;
@@ -157,2 +171,3 @@ struct cgit_config {
int cache_static_ttl;
+ int embedded;
int enable_index_links;
@@ -168,2 +183,4 @@ struct cgit_config {
int nocache;
+ int noplainemail;
+ int noheader;
int renamelimit;
@@ -173,2 +190,6 @@ struct cgit_config {
int summary_tags;
+ struct string_list mimetypes;
+ struct cgit_filter *about_filter;
+ struct cgit_filter *commit_filter;
+ struct cgit_filter *source_filter;
};
@@ -182,3 +203,19 @@ struct cgit_page {
char *filename;
+ char *etag;
char *title;
+ int status;
+ char *statusmsg;
+};
+
+struct cgit_environment {
+ char *cgit_config;
+ char *http_host;
+ char *https;
+ char *no_http;
+ char *path_info;
+ char *query_string;
+ char *request_method;
+ char *script_name;
+ char *server_name;
+ char *server_port;
};
@@ -186,2 +223,3 @@ struct cgit_page {
struct cgit_context {
+ struct cgit_environment env;
struct cgit_query qry;
@@ -244,2 +282,5 @@ 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);
+