summaryrefslogtreecommitdiff
path: root/includes/http.h
diff options
context:
space:
mode:
authorJoJoBond <jojobond@hotmail.com>2010-11-05 21:28:04 (GMT)
committer JoJoBond <jojobond@hotmail.com>2010-11-05 21:28:04 (GMT)
commit891774a7e2935a2e82eba8dd51a8f9782b407149 (patch)
tree75399c741be7486e42e88d4d5c88089a4ceb9c2d /includes/http.h
parent9b8acd9259f67c9efa8125538c91b6108e4155d3 (diff)
parent6124922b9f47003e4935580d792b7ba3b8ba1ede (diff)
downloadpowder-891774a7e2935a2e82eba8dd51a8f9782b407149.zip
powder-891774a7e2935a2e82eba8dd51a8f9782b407149.tar.gz
Merge branch 'master' of github.com:JoJoBond/The-Powder-Toy
Diffstat (limited to 'includes/http.h')
-rwxr-xr-xincludes/http.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/includes/http.h b/includes/http.h
new file mode 100755
index 0000000..2ad7ccc
--- /dev/null
+++ b/includes/http.h
@@ -0,0 +1,43 @@
+/**
+ * Powder Toy - HTTP Library (Header)
+ *
+ * Copyright (c) 2008 - 2010 Stanislaw Skowronek.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
+ */
+#ifndef HTTP_H
+#define HTTP_H
+
+void http_init(char *proxy);
+void http_done(void);
+
+char *http_simple_get(char *uri, int *ret, int *len);
+char *http_auth_get(char *uri, char *user, char *pass, int *ret, int *len);
+char *http_simple_post(char *uri, char *data, int dlen, int *ret, int *len);
+
+void http_auth_headers(void *ctx, char *user, char *pass);
+
+void *http_async_req_start(void *ctx, char *uri, char *data, int dlen, int keep);
+void http_async_add_header(void *ctx, char *name, char *data);
+int http_async_req_status(void *ctx);
+void http_async_get_length(void *ctx, int *total, int *done);
+char *http_async_req_stop(void *ctx, int *ret, int *len);
+void http_async_req_close(void *ctx);
+
+char *http_multipart_post(char *uri, char **names, char **parts, int *plens, char *user, char *pass, int *ret, int *len);
+
+char *http_ret_text(int ret);
+
+#endif