62 * directive in the object |
62 * directive in the object |
63 */ |
63 */ |
64 typedef struct _server_conf_handler ServerConfigHandler; |
64 typedef struct _server_conf_handler ServerConfigHandler; |
65 |
65 |
66 typedef void(*cfg_handler_init_f)(ServerConfigHandler*, ServerConfiguration*); |
66 typedef void(*cfg_handler_init_f)(ServerConfigHandler*, ServerConfiguration*); |
|
67 typedef void*(*cfg_element_start_f)( |
|
68 ServerConfigHandler*, |
|
69 ServerConfiguration*); |
67 typedef int(*cfg_process_directive_f)( |
70 typedef int(*cfg_process_directive_f)( |
68 ServerConfigHandler*, |
71 ServerConfigHandler*, |
69 ServerConfiguration*, |
72 ServerConfiguration*, |
70 ConfigDirective*); |
73 ConfigDirective*, |
|
74 void*); /* element object created in element_start */ |
71 |
75 |
72 struct _server_conf_handler { |
76 struct _server_conf_handler { |
73 cfg_handler_init_f init; |
77 cfg_handler_init_f init; |
|
78 cfg_element_start_f element_start; |
74 cfg_process_directive_f process_directive; |
79 cfg_process_directive_f process_directive; |
|
80 cfg_process_directive_f element_end; |
75 }; |
81 }; |
76 |
82 |
77 void load_init_conf(char *file); |
83 void load_init_conf(char *file); |
78 |
84 |
79 void load_server_conf(char *file); |
85 void init_server_config_parser(); |
80 |
86 |
81 void init_default_server_conf_handlers(); |
87 ServerConfiguration* load_server_conf(char *file); |
82 |
88 |
83 int handle_runtime_directive( |
89 int handle_runtime_directive( |
84 ServerConfigHandler *h, |
90 ServerConfigHandler *h, |
85 ServerConfiguration *conf, |
91 ServerConfiguration *conf, |
86 ConfigDirective *dir); |
92 ConfigDirective *dir, |
|
93 void *data); |
|
94 |
|
95 void* handle_listener_start(ServerConfigHandler *h, ServerConfiguration *cfg); |
87 int handle_listener_directive( |
96 int handle_listener_directive( |
88 ServerConfigHandler *h, |
97 ServerConfigHandler *h, |
89 ServerConfiguration *conf, |
98 ServerConfiguration *conf, |
90 ConfigDirective *dir); |
99 ConfigDirective *dir, |
|
100 void *data); |
|
101 int handle_listener_end( |
|
102 ServerConfigHandler *h, |
|
103 ServerConfiguration *conf, |
|
104 ConfigDirective *dir, |
|
105 void *data); |
|
106 |
|
107 void* handle_vserver_start(ServerConfigHandler *h, ServerConfiguration *cfg); |
91 int handle_vserver_directive( |
108 int handle_vserver_directive( |
92 ServerConfigHandler *h, |
109 ServerConfigHandler *h, |
93 ServerConfiguration *conf, |
110 ServerConfiguration *conf, |
94 ConfigDirective *dir); |
111 ConfigDirective *dir, |
95 |
112 void *data); |
96 VirtualServer* conf_get_default_vs(); |
113 int handle_vserver_end( |
|
114 ServerConfigHandler *h, |
|
115 ServerConfiguration *conf, |
|
116 ConfigDirective *dir, |
|
117 void *data); |
97 |
118 |
98 HTTPObjectConfig* load_obj_conf(char *file); |
119 HTTPObjectConfig* load_obj_conf(char *file); |
99 |
120 |
100 |
121 |
101 |
122 |