|
diff --git a/cgit.h b/cgit.h index 4c854ea..893231d 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -186,49 +186,62 @@ struct cgit_config { |
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 | |
197 | struct cgit_page { |
197 | struct 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 | |
| |
210 | struct cgit_environment { |
| |
211 | char *cgit_config; |
| |
212 | char *http_host; |
| |
213 | char *https; |
| |
214 | char *path_info; |
| |
215 | char *query_string; |
| |
216 | char *request_method; |
| |
217 | char *script_name; |
| |
218 | char *server_name; |
| |
219 | char *server_port; |
| |
220 | }; |
| |
221 | |
210 | struct cgit_context { |
222 | struct cgit_context { |
| |
223 | struct cgit_environment env; |
211 | struct cgit_query qry; |
224 | struct cgit_query qry; |
212 | struct cgit_config cfg; |
225 | struct cgit_config cfg; |
213 | struct cgit_repo *repo; |
226 | struct cgit_repo *repo; |
214 | struct cgit_page page; |
227 | struct cgit_page page; |
215 | }; |
228 | }; |
216 | |
229 | |
217 | struct cgit_snapshot_format { |
230 | struct cgit_snapshot_format { |
218 | const char *suffix; |
231 | const char *suffix; |
219 | const char *mimetype; |
232 | const char *mimetype; |
220 | write_archive_fn_t write_func; |
233 | write_archive_fn_t write_func; |
221 | int bit; |
234 | int bit; |
222 | }; |
235 | }; |
223 | |
236 | |
224 | extern const char *cgit_version; |
237 | extern const char *cgit_version; |
225 | |
238 | |
226 | extern struct cgit_repolist cgit_repolist; |
239 | extern struct cgit_repolist cgit_repolist; |
227 | extern struct cgit_context ctx; |
240 | extern struct cgit_context ctx; |
228 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
241 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
229 | |
242 | |
230 | extern struct cgit_repo *cgit_add_repo(const char *url); |
243 | extern struct cgit_repo *cgit_add_repo(const char *url); |
231 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
244 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
232 | extern void cgit_repo_config_cb(const char *name, const char *value); |
245 | extern void cgit_repo_config_cb(const char *name, const char *value); |
233 | |
246 | |
234 | extern int chk_zero(int result, char *msg); |
247 | extern int chk_zero(int result, char *msg); |
|