blob: 6daa9cb2df71f68dd761f6893e394b219b17bd4a [file] [log] [blame]
The Android Open Source Project8b23a6c2009-03-03 19:30:32 -08001/* Copyright (C) 2007-2008 The Android Open Source Project
2**
3** This software is licensed under the terms of the GNU General Public
4** License version 2, as published by the Free Software Foundation, and
5** may be copied, distributed, and modified under those terms.
6**
7** This program is distributed in the hope that it will be useful,
8** but WITHOUT ANY WARRANTY; without even the implied warranty of
9** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10** GNU General Public License for more details.
11*/
12#ifndef _PROXY_HTTP_INT_H
13#define _PROXY_HTTP_INT_H
14
15#include "proxy_http.h"
16#include "proxy_int.h"
17
18/* the HttpService object */
19typedef struct HttpService {
20 ProxyService root[1];
21 SockAddress server_addr; /* server address and port */
22 char* footer; /* the footer contains the static parts of the */
23 int footer_len; /* connection header, we generate it only once */
24 char footer0[512];
25} HttpService;
26
27/* create a CONNECT connection (for port != 80) */
28extern ProxyConnection* http_connector_connect(
29 HttpService* service,
30 SockAddress* address );
31
32/* create a HTTP rewriting connection (for port == 80) */
33extern ProxyConnection* http_rewriter_connect(
34 HttpService* service,
35 SockAddress* address );
36
37
38#endif /* _PROXY_HTTP_INT_H */