summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorLars Hjemli <hjemli@gmail.com>2009-08-11 08:12:53 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-08-11 08:12:53 (UTC)
commit2c742d1a925486a47f74710325b3076a7742a9f9 (patch) (unidiff)
treee16e8de4c65cb659a5b487ac3f8a7d7254fef395 /cgit.h
parentfcc6056230e367e276dcb5a292d45e272cc6e7e6 (diff)
parent80550bbe028b551550395653d32a0ba50db540ef (diff)
downloadcgit-2c742d1a925486a47f74710325b3076a7742a9f9.zip
cgit-2c742d1a925486a47f74710325b3076a7742a9f9.tar.gz
cgit-2c742d1a925486a47f74710325b3076a7742a9f9.tar.bz2
Merge branch 'lh/embedded'
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index 4c854ea..d90ccdc 100644
--- a/cgit.h
+++ b/cgit.h
@@ -178,65 +178,79 @@ struct cgit_config {
178 int max_commit_count; 178 int max_commit_count;
179 int max_lock_attempts; 179 int max_lock_attempts;
180 int max_msg_len; 180 int max_msg_len;
181 int max_repodesc_len; 181 int max_repodesc_len;
182 int max_stats; 182 int max_stats;
183 int nocache; 183 int nocache;
184 int noplainemail; 184 int noplainemail;
185 int noheader; 185 int noheader;
186 int renamelimit; 186 int renamelimit;
187 int snapshots; 187 int snapshots;
188 int summary_branches; 188 int summary_branches;
189 int summary_log; 189 int summary_log;
190 int summary_tags; 190 int summary_tags;
191 struct string_list mimetypes; 191 struct string_list mimetypes;
192 struct cgit_filter *about_filter; 192 struct cgit_filter *about_filter;
193 struct cgit_filter *commit_filter; 193 struct cgit_filter *commit_filter;
194 struct cgit_filter *source_filter; 194 struct cgit_filter *source_filter;
195}; 195};
196 196
197struct cgit_page { 197struct cgit_page {
198 time_t modified; 198 time_t modified;
199 time_t expires; 199 time_t expires;
200 size_t size; 200 size_t size;
201 char *mimetype; 201 char *mimetype;
202 char *charset; 202 char *charset;
203 char *filename; 203 char *filename;
204 char *etag; 204 char *etag;
205 char *title; 205 char *title;
206 int status; 206 int status;
207 char *statusmsg; 207 char *statusmsg;
208}; 208};
209 209
210struct cgit_environment {
211 char *cgit_config;
212 char *http_host;
213 char *https;
214 char *no_http;
215 char *path_info;
216 char *query_string;
217 char *request_method;
218 char *script_name;
219 char *server_name;
220 char *server_port;
221};
222
210struct cgit_context { 223struct cgit_context {
224 struct cgit_environment env;
211 struct cgit_query qry; 225 struct cgit_query qry;
212 struct cgit_config cfg; 226 struct cgit_config cfg;
213 struct cgit_repo *repo; 227 struct cgit_repo *repo;
214 struct cgit_page page; 228 struct cgit_page page;
215}; 229};
216 230
217struct cgit_snapshot_format { 231struct cgit_snapshot_format {
218 const char *suffix; 232 const char *suffix;
219 const char *mimetype; 233 const char *mimetype;
220 write_archive_fn_t write_func; 234 write_archive_fn_t write_func;
221 int bit; 235 int bit;
222}; 236};
223 237
224extern const char *cgit_version; 238extern const char *cgit_version;
225 239
226extern struct cgit_repolist cgit_repolist; 240extern struct cgit_repolist cgit_repolist;
227extern struct cgit_context ctx; 241extern struct cgit_context ctx;
228extern const struct cgit_snapshot_format cgit_snapshot_formats[]; 242extern const struct cgit_snapshot_format cgit_snapshot_formats[];
229 243
230extern struct cgit_repo *cgit_add_repo(const char *url); 244extern struct cgit_repo *cgit_add_repo(const char *url);
231extern struct cgit_repo *cgit_get_repoinfo(const char *url); 245extern struct cgit_repo *cgit_get_repoinfo(const char *url);
232extern void cgit_repo_config_cb(const char *name, const char *value); 246extern void cgit_repo_config_cb(const char *name, const char *value);
233 247
234extern int chk_zero(int result, char *msg); 248extern int chk_zero(int result, char *msg);
235extern int chk_positive(int result, char *msg); 249extern int chk_positive(int result, char *msg);
236extern int chk_non_negative(int result, char *msg); 250extern int chk_non_negative(int result, char *msg);
237 251
238extern char *trim_end(const char *str, char c); 252extern char *trim_end(const char *str, char c);
239extern char *strlpart(char *txt, int maxlen); 253extern char *strlpart(char *txt, int maxlen);
240extern char *strrpart(char *txt, int maxlen); 254extern char *strrpart(char *txt, int maxlen);
241 255
242extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); 256extern void cgit_add_ref(struct reflist *list, struct refinfo *ref);