Mercurial > hg > nginx
diff src/http/ngx_http.h @ 10:4f3879d9b6f6
nginx-0.0.1-2002-09-11-19:18:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Sep 2002 15:18:33 +0000 |
parents | 6f58641241bb |
children | f323b4f74e4a |
line wrap: on
line diff
--- a/src/http/ngx_http.h +++ b/src/http/ngx_http.h @@ -7,6 +7,7 @@ #include <ngx_hunk.h> #include <ngx_files.h> #include <ngx_connection.h> +#include <ngx_config_command.h> #define NGX_HTTP_GET 1 @@ -139,7 +140,13 @@ typedef struct { typedef struct { - int index; + int index; + void *(*create_srv_conf)(ngx_pool_t *p); + void *(*create_loc_conf)(ngx_pool_t *p); + ngx_command_t *commands; + int (*init_module)(ngx_pool_t *p); + int (*init_output_body_filter)(int (**next_filter) + (ngx_http_request_t *r, ngx_chain_t *ch)); } ngx_http_module_t; #define NGX_HTTP_MODULE 0 @@ -147,6 +154,12 @@ typedef struct { #define ngx_get_module_loc_conf(r, module) r->loc_conf[module.index] #define ngx_get_module_ctx(r, module) r->ctx[module.index] +#define ngx_http_create_ctx(r, ctx, module, size) \ + do { \ + ngx_test_null(ctx, ngx_pcalloc(r->pool, size), NGX_ERROR); \ + r->ctx[module.index] = ctx; \ + } while (0) + /* STUB */ @@ -159,4 +172,10 @@ int ngx_http_init(ngx_pool_t *pool, ngx_ int ngx_http_init_connection(ngx_connection_t *c); +extern int ngx_max_module; + +extern ngx_http_module_t *ngx_http_modules[]; + + + #endif /* _NGX_HTTP_H_INCLUDED_ */