Remove some dependencies of the web server on esp.
[gd/samba-autobuild/.git] / source4 / web_server / web_server.h
1 /* 
2    Unix SMB/CIFS implementation.
3    
4    Copyright (C) Andrew Tridgell              2005
5    
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10    
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15    
16    You should have received a copy of the GNU General Public License
17    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include "smbd/process_model.h"
21
22 struct web_server_data {
23         struct tls_params *tls_params;
24         void *private;  
25 };
26
27 /*
28   context of one open web connection
29 */
30 struct websrv_context {
31         struct task_server *task;
32         struct stream_connection *conn;
33         void (*http_process_input)(struct websrv_context *web);
34         struct {
35                 bool tls_detect;
36                 bool tls_first_char;
37                 uint8_t first_byte;
38                 DATA_BLOB partial;
39                 bool end_of_headers;
40                 char *url;
41                 unsigned content_length;
42                 bool post_request;
43                 const char *content_type;
44                 const char *query_string;
45                 const char *user_agent;
46                 const char *referer;
47                 const char *host;
48                 const char *accept_encoding;
49                 const char *accept_language;
50                 const char *accept_charset;
51                 const char *cookie;
52                 const char *session_key;
53         } input;
54         struct {
55                 bool output_pending;
56                 DATA_BLOB content;
57                 int fd;
58                 unsigned nsent;
59                 int response_code;
60                 const char **headers;
61         } output;
62         struct session_data *session;
63 };
64
65
66 #include "web_server/proto.h"
67