aboutsummaryrefslogtreecommitdiffstats
path: root/proxy/proxy_http_int.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:04:49 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:04:49 -0800
commitdf7881f07f53b041dc0568be8528e9dbb74994cc (patch)
tree1b3e036f7df4241bf0c2d527b73198c50e1d7891 /proxy/proxy_http_int.h
parent55f4e4a5ec657a017e3bf75299ad71fd1c968dd3 (diff)
downloadexternal_qemu-df7881f07f53b041dc0568be8528e9dbb74994cc.zip
external_qemu-df7881f07f53b041dc0568be8528e9dbb74994cc.tar.gz
external_qemu-df7881f07f53b041dc0568be8528e9dbb74994cc.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'proxy/proxy_http_int.h')
-rw-r--r--proxy/proxy_http_int.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/proxy/proxy_http_int.h b/proxy/proxy_http_int.h
new file mode 100644
index 0000000..d0a6bc0
--- /dev/null
+++ b/proxy/proxy_http_int.h
@@ -0,0 +1,38 @@
+/* Copyright (C) 2007-2008 The Android Open Source Project
+**
+** This software is licensed under the terms of the GNU General Public
+** License version 2, as published by the Free Software Foundation, and
+** may be copied, distributed, and modified under those terms.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+*/
+#ifndef _PROXY_HTTP_INT_H
+#define _PROXY_HTTP_INT_H
+
+#include "proxy_http.h"
+#include "proxy_int.h"
+
+/* the HttpService object */
+typedef struct HttpService {
+ ProxyService root[1];
+ struct sockaddr_in server_addr; /* server address and port */
+ char* footer; /* the footer contains the static parts of the */
+ int footer_len; /* connection header, we generate it only once */
+ char footer0[512];
+} HttpService;
+
+/* create a CONNECT connection (for port != 80) */
+extern ProxyConnection* http_connector_connect(
+ HttpService* service,
+ struct sockaddr_in* address );
+
+/* create a HTTP rewriting connection (for port == 80) */
+extern ProxyConnection* http_rewriter_connect(
+ HttpService* service,
+ struct sockaddr_in* address );
+
+
+#endif /* _PROXY_HTTP_INT_H */