comparison src/core/ngx_conf_file.h @ 43:53cd05892261

nginx-0.0.1-2002-12-27-19:22:50 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 27 Dec 2002 16:22:50 +0000
parents src/core/ngx_config_file.h@cd035a94e0b6
children 0e81ac0bb3e2
comparison
equal deleted inserted replaced
42:cd035a94e0b6 43:53cd05892261
1 #ifndef _NGX_HTTP_CONF_FILE_H_INCLUDED_
2 #define _NGX_HTTP_CONF_FILE_H_INCLUDED_
3
4
5 #include <ngx_config.h>
6 #include <ngx_files.h>
7 #include <ngx_log.h>
8 #include <ngx_file.h>
9 #include <ngx_string.h>
10 #include <ngx_alloc.h>
11 #include <ngx_hunk.h>
12 #include <ngx_array.h>
13
14
15 #define NGX_CONF_NOARGS 1
16 #define NGX_CONF_TAKE1 2
17 #define NGX_CONF_TAKE2 4
18 #define NGX_CONF_ARGS_NUMBER 0x0ffff
19 #define NGX_CONF_ANY 0x10000
20 #define NGX_CONF_BLOCK 0x20000
21
22
23 #define NGX_CONF_UNSET -1
24
25
26 #define NGX_CONF_ERROR (char *) -1
27
28 #define NGX_CONF_BLOCK_DONE 1
29 #define NGX_CONF_FILE_DONE 2
30
31
32 #define NGX_CORE_MODULE_TYPE 0x45524f43 /* "CORE" */
33
34
35 typedef struct ngx_conf_s ngx_conf_t;
36
37
38 typedef struct ngx_command_s ngx_command_t;
39 struct ngx_command_s {
40 ngx_str_t name;
41 int type;
42 char *(*set)(ngx_conf_t *cf, ngx_command_t *cmd, char *conf);
43 int conf;
44 int offset;
45 };
46
47
48 typedef struct {
49 void *ctx;
50 ngx_command_t *commands;
51 int type;
52 int (*init_module)(ngx_pool_t *p);
53 } ngx_module_t;
54
55
56 typedef struct {
57 ngx_file_t file;
58 ngx_hunk_t *hunk;
59 int line;
60 } ngx_conf_file_t;
61
62
63 struct ngx_conf_s {
64 char *name;
65 ngx_array_t *args;
66
67 ngx_pool_t *pool;
68 ngx_conf_file_t *conf_file;
69 ngx_log_t *log;
70
71 void *ctx;
72 int type;
73 int (*handler)(ngx_conf_t *cf);
74 };
75
76
77 int ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename);
78
79
80 char *ngx_conf_set_size_slot(ngx_conf_t *cf, ngx_command_t *cmd, char *conf);
81 char *ngx_conf_set_time_slot(ngx_conf_t *cf, ngx_command_t *cmd, char *conf);
82
83
84 extern ngx_module_t *ngx_modules[];
85
86
87 #endif _NGX_HTTP_CONF_FILE_H_INCLUDED_