libpurple/http.h

Sat, 17 Aug 2013 23:27:20 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 17 Aug 2013 23:27:20 +0530
branch
soc.2013.gobjectification.plugins
changeset 36543
a8c3fecee2d3
parent 34295
f50c94ec0021
child 35393
00f876b129bc
child 37017
8e2b68c79fa1
permissions
-rw-r--r--

Renamed prpl.[ch] to protocol.[ch]

33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
1 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
2 * @file http.h HTTP API
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
3 * @ingroup core
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
4 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
5
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
6 /* purple
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
7 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
10 * source distribution.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
11 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
16 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
21 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
25 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
26
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
27 #ifndef _PURPLE_HTTP_H_
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
28 #define _PURPLE_HTTP_H_
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
29
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
30 #include <glib.h>
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
31
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
32 #include "connection.h"
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
33
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
34 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
35 * A structure containing all data required to generate a single HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
36 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
37 typedef struct _PurpleHttpRequest PurpleHttpRequest;
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
38
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
39 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
40 * A representation of actually running HTTP request. Can be used to cancel the
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
41 * request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
42 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
43 typedef struct _PurpleHttpConnection PurpleHttpConnection;
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
44
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
45 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
46 * All information got with response for HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
47 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
48 typedef struct _PurpleHttpResponse PurpleHttpResponse;
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
49
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
50 /**
34218
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
51 * Parsed representation for the URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
52 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
53 typedef struct _PurpleHttpURL PurpleHttpURL;
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
54
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
55 /**
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
56 * An collection of cookies, got from HTTP response or provided for HTTP
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
57 * request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
58 */
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
59 typedef struct _PurpleHttpCookieJar PurpleHttpCookieJar;
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
60
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
61 /**
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
62 * A pool of TCP connections for HTTP Keep-Alive session.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
63 */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
64 typedef struct _PurpleHttpKeepalivePool PurpleHttpKeepalivePool;
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
65
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
66 /**
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
67 * A set of running HTTP requests. Can be used to cancel all of them at once.
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
68 */
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
69 typedef struct _PurpleHttpConnectionSet PurpleHttpConnectionSet;
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
70
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
71 /**
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
72 * An callback called after performing (successfully or not) HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
73 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
74 typedef void (*PurpleHttpCallback)(PurpleHttpConnection *http_conn,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
75 PurpleHttpResponse *response, gpointer user_data);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
76
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
77 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
78 * An callback called after storing data requested by PurpleHttpContentReader.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
79 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
80 typedef void (*PurpleHttpContentReaderCb)(PurpleHttpConnection *http_conn,
33466
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
81 gboolean success, gboolean eof, size_t stored);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
82
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
83 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
84 * An callback for getting large request contents (ie. from file stored on
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
85 * disk).
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
86 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
87 * @param http_conn Connection, which requests data.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
88 * @param buffer Buffer to store data to (with offset ignored).
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
89 * @param offset Position, from where to read data.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
90 * @param length Length of data to read.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
91 * @param user_data The user data passed with callback function.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
92 * @param cb The function to call after storing data to buffer.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
93 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
94 typedef void (*PurpleHttpContentReader)(PurpleHttpConnection *http_conn,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
95 gchar *buffer, size_t offset, size_t length, gpointer user_data,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
96 PurpleHttpContentReaderCb cb);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
97
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
98 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
99 * An callback for writting large response contents.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
100 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
101 * @param http_conn Connection, which requests data.
33432
9c4acb75b2e6 Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33430
diff changeset
102 * @param response Response at point got so far (may change later).
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
103 * @param buffer Buffer to read data from (with offset ignored).
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
104 * @param offset Position of data got (its value is offset + length of
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
105 * previous call), can be safely ignored.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
106 * @param length Length of data read.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
107 * @param user_data The user data passed with callback function.
33517
ddd9e37c4b07 HTTP: PurpleHttpContentWriter support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33468
diff changeset
108 * @return TRUE, if succeeded, FALSE otherwise.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
109 */
33517
ddd9e37c4b07 HTTP: PurpleHttpContentWriter support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33468
diff changeset
110 typedef gboolean (*PurpleHttpContentWriter)(PurpleHttpConnection *http_conn,
33432
9c4acb75b2e6 Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33430
diff changeset
111 PurpleHttpResponse *response, const gchar *buffer, size_t offset,
9c4acb75b2e6 Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33430
diff changeset
112 size_t length, gpointer user_data);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
113
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
114 /**
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
115 * An callback for watching HTTP connection progress.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
116 *
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
117 * @param http_conn The HTTP Connection.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
118 * @param reading_state FALSE, is we are sending the request, TRUE, when reading
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
119 * the response.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
120 * @param processed The amount of data already processed.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
121 * @param total Total amount of data (in current state).
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
122 * @param user_data The user data passed with callback function.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
123 */
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
124 typedef void (*PurpleHttpProgressWatcher)(PurpleHttpConnection *http_conn,
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
125 gboolean reading_state, int processed, int total, gpointer user_data);
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
126
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
127 G_BEGIN_DECLS
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
128
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
129 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
130 /** @name Performing HTTP requests */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
131 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
132 /*@{*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
133
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
134 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
135 * Fetches the data from a URL with GET request, and passes it to a callback
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
136 * function.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
137 *
34233
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
138 * @param gc The connection for which the request is needed, or NULL.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
139 * @param callback The callback function.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
140 * @param user_data The user data to pass to the callback function.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
141 * @param url The URL.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
142 * @return The HTTP connection struct.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
143 */
34233
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
144 PurpleHttpConnection * purple_http_get(PurpleConnection *gc,
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
145 PurpleHttpCallback callback, gpointer user_data, const gchar *url);
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
146
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
147 /**
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
148 * Constructs an URL and fetches the data from it with GET request, then passes
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
149 * it to a callback function.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
150 *
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
151 * @param gc The connection for which the request is needed, or NULL.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
152 * @param callback The callback function.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
153 * @param user_data The user data to pass to the callback function.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
154 * @param format The format string.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
155 * @return The HTTP connection struct.
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
156 */
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
157 PurpleHttpConnection * purple_http_get_printf(PurpleConnection *gc,
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
158 PurpleHttpCallback callback, gpointer user_data,
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
159 const gchar *format, ...) G_GNUC_PRINTF(4, 5);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
160
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
161 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
162 * Fetches a HTTP request and passes the response to a callback function.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
163 * Provided request struct can be shared by multiple http requests but can not
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
164 * be modified when any of these is running.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
165 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
166 * @param gc The connection for which the request is needed, or NULL.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
167 * @param request The request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
168 * @param callback The callback function.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
169 * @param user_data The user data to pass to the callback function.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
170 * @return The HTTP connection struct.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
171 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
172 PurpleHttpConnection * purple_http_request(PurpleConnection *gc,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
173 PurpleHttpRequest *request, PurpleHttpCallback callback,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
174 gpointer user_data);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
175
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
176 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
177 /** @name HTTP connection API */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
178 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
179 /*@{*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
180
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
181 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
182 * Cancel a pending HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
183 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
184 * @param http_conn The data returned when you initiated the HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
185 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
186 void purple_http_conn_cancel(PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
187
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
188 /**
33448
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
189 * Cancels all HTTP connections associated with the specified handle.
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
190 *
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
191 * @param gc The handle.
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
192 */
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
193 void purple_http_conn_cancel_all(PurpleConnection *gc);
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
194
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
195 /**
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
196 * Checks, if provided HTTP request is running.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
197 *
33448
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
198 * @param http_conn The HTTP connection (may be invalid pointer).
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
199 * @return TRUE, if provided connection is currently running.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
200 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
201 gboolean purple_http_conn_is_running(PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
202
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
203 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
204 * Gets PurpleHttpRequest used for specified HTTP connection.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
205 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
206 * @param http_conn The HTTP connection.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
207 * @return The PurpleHttpRequest object.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
208 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
209 PurpleHttpRequest * purple_http_conn_get_request(
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
210 PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
211
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
212 /**
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
213 * Gets cookie jar used within connection.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
214 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
215 * @param http_conn The HTTP connection.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
216 * @return The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
217 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
218 PurpleHttpCookieJar * purple_http_conn_get_cookie_jar(
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
219 PurpleHttpConnection *http_conn);
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
220
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
221 /**
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
222 * Gets PurpleConnection tied with specified HTTP connection.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
223 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
224 * @param http_conn The HTTP connection.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
225 * @return The PurpleConnection object.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
226 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
227 PurpleConnection * purple_http_conn_get_purple_connection(
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
228 PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
229
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
230 /**
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
231 * Sets the watcher, called after writing or reading data to/from HTTP stream.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
232 * May be used for updating transfer progress gauge.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
233 *
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
234 * @param http_conn The HTTP connection.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
235 * @param watcher The watcher.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
236 * @param user_data The user data to pass to the callback function.
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
237 * @param interval_threshold Minimum interval (in microseconds) of calls to
34272
8df870b218ca HTTP: chop off another HTTP implementation (for xmpp oob file transfers)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34268
diff changeset
238 * watcher, or -1 for default.
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
239 */
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
240 void purple_http_conn_set_progress_watcher(PurpleHttpConnection *http_conn,
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
241 PurpleHttpProgressWatcher watcher, gpointer user_data,
34272
8df870b218ca HTTP: chop off another HTTP implementation (for xmpp oob file transfers)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34268
diff changeset
242 gint interval_threshold);
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
243
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
244 /*@}*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
245
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
246
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
247 /**************************************************************************/
34218
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
248 /** @name URL processing API */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
249 /**************************************************************************/
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
250 /*@{*/
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
251
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
252 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
253 * Parses a URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
254 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
255 * The returned data must be freed with purple_http_url_free.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
256 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
257 * @param url The URL to parse.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
258 * @return The parsed url or NULL, if the URL is invalid.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
259 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
260 PurpleHttpURL *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
261 purple_http_url_parse(const char *url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
262
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
263 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
264 * Frees the parsed URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
265 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
266 * @param parsed_url The parsed URL struct, or NULL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
267 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
268 void
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
269 purple_http_url_free(PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
270
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
271 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
272 * Converts the base URL to the absolute form of the provided relative URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
273 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
274 * Example: "https://example.com/path/to/file.html" + "subdir/other-file.html" =
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
275 * "https://example.com/path/to/subdir/another-file.html"
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
276 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
277 * @param base_url The base URL. The result is stored here.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
278 * @param relative_url The relative URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
279 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
280 void
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
281 purple_http_url_relative(PurpleHttpURL *base_url, PurpleHttpURL *relative_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
282
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
283 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
284 * Converts the URL struct to the printable form. The result may not be a valid
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
285 * URL (in cases, when the struct doesn't have all fields filled properly).
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
286 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
287 * The result must be g_free'd.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
288 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
289 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
290 * @return The printable form of the URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
291 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
292 gchar *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
293 purple_http_url_print(PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
294
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
295 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
296 * Gets the protocol part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
297 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
298 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
299 * @return The protocol.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
300 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
301 const gchar *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
302 purple_http_url_get_protocol(const PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
303
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
304 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
305 * Gets the username part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
306 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
307 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
308 * @return The username.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
309 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
310 const gchar *
34219
eee308def583 HTTP: get rid of purple_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34218
diff changeset
311 purple_http_url_get_username(const PurpleHttpURL *parsed_url);
34218
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
312
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
313 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
314 * Gets the password part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
315 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
316 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
317 * @return The password.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
318 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
319 const gchar *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
320 purple_http_url_get_password(const PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
321
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
322 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
323 * Gets the hostname part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
324 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
325 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
326 * @return The hostname.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
327 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
328 const gchar *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
329 purple_http_url_get_host(const PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
330
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
331 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
332 * Gets the port part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
333 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
334 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
335 * @return The port number.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
336 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
337 int
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
338 purple_http_url_get_port(const PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
339
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
340 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
341 * Gets the path part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
342 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
343 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
344 * @return The path.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
345 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
346 const gchar *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
347 purple_http_url_get_path(const PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
348
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
349 /**
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
350 * Gets the fragment part of URL.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
351 *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
352 * @param parsed_url The URL struct.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
353 * @return The fragment.
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
354 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
355 const gchar *
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
356 purple_http_url_get_fragment(const PurpleHttpURL *parsed_url);
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
357
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
358 /*@}*/
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
359
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
360
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
361 /**************************************************************************/
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
362 /** @name Cookie jar API */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
363 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
364 /*@{*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
365
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
366 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
367 * Creates new cookie jar,
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
368 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
369 * @return empty cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
370 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
371 PurpleHttpCookieJar * purple_http_cookie_jar_new(void);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
372
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
373 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
374 * Increment the reference count.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
375 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
376 * @param cookie_jar The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
377 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
378 void purple_http_cookie_jar_ref(PurpleHttpCookieJar *cookie_jar);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
379
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
380 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
381 * Decrement the reference count.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
382 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
383 * If the reference count reaches zero, the cookie jar will be freed.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
384 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
385 * @param cookie_jar The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
386 * @return @a cookie_jar or @c NULL if the reference count reached zero.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
387 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
388 PurpleHttpCookieJar * purple_http_cookie_jar_unref(
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
389 PurpleHttpCookieJar *cookie_jar);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
390
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
391 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
392 * Sets the cookie.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
393 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
394 * @param cookie_jar The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
395 * @param name Cookie name.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
396 * @param value Cookie contents.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
397 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
398 void purple_http_cookie_jar_set(PurpleHttpCookieJar *cookie_jar,
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
399 const gchar *name, const gchar *value);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
400
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
401 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
402 * Gets the cookie.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
403 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
404 * @param cookie_jar The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
405 * @param name Cookie name.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
406 * @return Cookie contents, or NULL, if cookie doesn't exists.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
407 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
408 const gchar * purple_http_cookie_jar_get(PurpleHttpCookieJar *cookie_jar,
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
409 const gchar *name);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
410
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
411 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
412 * Checks, if the cookie jar contains any cookies.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
413 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
414 * @param cookie_jar The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
415 * @return TRUE, if cookie jar contains any cookie, FALSE otherwise.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
416 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
417 gboolean purple_http_cookie_jar_is_empty(PurpleHttpCookieJar *cookie_jar);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
418
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
419 /*@}*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
420
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
421
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
422 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
423 /** @name HTTP Request API */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
424 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
425 /*@{*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
426
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
427 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
428 * Creates the new instance of HTTP request configuration.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
429 *
34232
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
430 * @param url The URL to request for, or NULL to leave empty (to be set with
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
431 * purple_http_request_set_url).
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
432 * @return The new instance of HTTP request struct.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
433 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
434 PurpleHttpRequest * purple_http_request_new(const gchar *url);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
435
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
436 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
437 * Increment the reference count.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
438 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
439 * @param request The request.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
440 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
441 void purple_http_request_ref(PurpleHttpRequest *request);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
442
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
443 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
444 * Decrement the reference count.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
445 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
446 * If the reference count reaches zero, the http request struct will be freed.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
447 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
448 * @param request The request.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
449 * @return @a request or @c NULL if the reference count reached zero.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
450 */
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
451 PurpleHttpRequest * purple_http_request_unref(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
452
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
453 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
454 * Sets URL for HTTP request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
455 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
456 * @param request The request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
457 * @param url The url.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
458 */
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
459 void purple_http_request_set_url(PurpleHttpRequest *request, const gchar *url);
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
460
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
461 /**
34232
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
462 * Constructs and sets an URL for HTTP request.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
463 *
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
464 * @param request The request.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
465 * @param format The format string.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
466 */
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
467 void purple_http_request_set_url_printf(PurpleHttpRequest *request,
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
468 const gchar *format, ...) G_GNUC_PRINTF(2, 3);
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
469
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
470 /**
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
471 * Gets URL set for the HTTP request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
472 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
473 * @param request The request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
474 * @return URL set for this request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
475 */
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
476 const gchar * purple_http_request_get_url(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
477
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
478 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
479 * Sets custom HTTP method used for the request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
480 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
481 * @param request The request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
482 * @param method The method, or NULL for default.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
483 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
484 void purple_http_request_set_method(PurpleHttpRequest *request,
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
485 const gchar *method);
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
486
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
487 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
488 * Gets HTTP method set for the request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
489 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
490 * @param request The request.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
491 * @return The method.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
492 */
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
493 const gchar * purple_http_request_get_method(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
494
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
495 /**
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
496 * Sets HTTP KeepAlive connections pool for the request.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
497 *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
498 * It increases pool's reference count.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
499 *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
500 * @param request The request.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
501 * @param pool The new KeepAlive pool, or NULL to reset.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
502 */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
503 void
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
504 purple_http_request_set_keepalive_pool(PurpleHttpRequest *request,
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
505 PurpleHttpKeepalivePool *pool);
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
506
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
507 /**
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
508 * Gets HTTP KeepAlive connections pool associated with the request.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
509 *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
510 * It doesn't affect pool's reference count.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
511 *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
512 * @param request The request.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
513 * @return The KeepAlive pool, used for the request.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
514 */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
515 PurpleHttpKeepalivePool *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
516 purple_http_request_get_keepalive_pool(PurpleHttpRequest *request);
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
517
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
518 /**
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
519 * Sets contents of HTTP request (for example, POST data).
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
520 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
521 * @param request The request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
522 * @param contents The contents.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
523 * @param length The length of contents (-1 if it's a NULL-terminated string)
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
524 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
525 void purple_http_request_set_contents(PurpleHttpRequest *request,
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
526 const gchar *contents, int length);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
527
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
528 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
529 * Sets contents reader for HTTP request, used mainly for possible large
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
530 * uploads.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
531 *
33466
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
532 * @param request The request.
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
533 * @param reader The reader callback.
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
534 * @param contents_size The size of all contents.
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
535 * @param user_data The user data to pass to the callback function.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
536 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
537 void purple_http_request_set_contents_reader(PurpleHttpRequest *request,
33466
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
538 PurpleHttpContentReader reader, int contents_length, gpointer user_data);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
539
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
540 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
541 * Set contents writer for HTTP response.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
542 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
543 * @param request The request.
33517
ddd9e37c4b07 HTTP: PurpleHttpContentWriter support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33468
diff changeset
544 * @param reader The writer callback, or NULL to remove existing.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
545 * @param user_data The user data to pass to the callback function.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
546 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
547 void purple_http_request_set_response_writer(PurpleHttpRequest *request,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
548 PurpleHttpContentWriter writer, gpointer user_data);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
549
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
550 /**
33450
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
551 * Set maximum amount of time, that request is allowed to run.
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
552 *
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
553 * @param request The request.
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
554 * @param timeout Time (in seconds) after that timeout will be cancelled,
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
555 * -1 for infinite time.
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
556 */
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
557 void purple_http_request_set_timeout(PurpleHttpRequest *request, int timeout);
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
558
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
559 /**
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
560 * Get maximum amount of time, that request is allowed to run.
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
561 *
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
562 * @param request The request.
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
563 * @return Timeout currently set (-1 for infinite).
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
564 */
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
565 int purple_http_request_get_timeout(PurpleHttpRequest *request);
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
566
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
567 /**
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
568 * Sets maximum amount of redirects.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
569 *
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
570 * @param request The request.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
571 * @param max_redirects Maximum amount of redirects, or -1 for unlimited.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
572 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
573 void purple_http_request_set_max_redirects(PurpleHttpRequest *request,
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
574 int max_redirects);
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
575
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
576 /**
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
577 * Gets maximum amount of redirects.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
578 *
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
579 * @param request The request.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
580 * @return Current maximum amount of redirects (-1 for unlimited).
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
581 */
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
582 int purple_http_request_get_max_redirects(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
583
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
584 /**
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
585 * Sets cookie jar used for the request.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
586 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
587 * @param request The request.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
588 * @param cookie_jar The cookie jar.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
589 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
590 void purple_http_request_set_cookie_jar(PurpleHttpRequest *request,
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
591 PurpleHttpCookieJar *cookie_jar);
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
592
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
593 /**
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
594 * Gets cookie jar used for the request.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
595 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
596 * @param request The request.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
597 * @return The cookie jar.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
598 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
599 PurpleHttpCookieJar * purple_http_request_get_cookie_jar(
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
600 PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
601
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
602 /**
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
603 * Sets HTTP version to use.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
604 *
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
605 * @param request The request.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
606 * @param http11 TRUE for HTTP/1.1, FALSE for HTTP/1.0.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
607 */
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
608 void purple_http_request_set_http11(PurpleHttpRequest *request,
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
609 gboolean http11);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
610
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
611 /**
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
612 * Gets used HTTP version.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
613 *
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
614 * @param request The request.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
615 * @return TRUE, if we use HTTP/1.1, FALSE for HTTP/1.0.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
616 */
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
617 gboolean purple_http_request_is_http11(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
618
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
619 /**
33446
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
620 * Sets maximum length of response content to read.
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
621 *
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
622 * Headers length doesn't count here.
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
623 *
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
624 * @param request The request.
34295
f50c94ec0021 HTTP: content compression support (gzip, deflate); added hard max length limit; fixed crashes after free; GnuTLS: treat GNUTLS_E_PREMATURE_TERMINATION indulgently
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34287
diff changeset
625 * @param max_len Maximum length of response to read (-1 for the maximum
f50c94ec0021 HTTP: content compression support (gzip, deflate); added hard max length limit; fixed crashes after free; GnuTLS: treat GNUTLS_E_PREMATURE_TERMINATION indulgently
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34287
diff changeset
626 * supported amount).
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
627 */
33446
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
628 void purple_http_request_set_max_len(PurpleHttpRequest *request, int max_len);
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
629
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
630 /**
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
631 * Gets maximum length of response content to read.
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
632 *
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
633 * @param request The request.
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
634 * @return Maximum length of response to read, or -1 if unlimited.
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
635 */
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
636 int purple_http_request_get_max_len(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
637
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
638 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
639 * Sets (replaces, if exists) specified HTTP request header with provided value.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
640 *
34232
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
641 * @param request The request.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
642 * @param key A header to be set.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
643 * @param value A value to set, or NULL to remove specified header.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
644 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
645 * @see purple_http_request_header_add
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
646 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
647 void purple_http_request_header_set(PurpleHttpRequest *request,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
648 const gchar *key, const gchar *value);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
649
34232
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
650 /**
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
651 * Constructs and sets (replaces, if exists) specified HTTP request header.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
652 *
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
653 * @param request The request.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
654 * @param key A header to be set.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
655 * @param format The format string.
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
656 */
33455
2de654702970 Print-like setting headers, vestigal keepalive support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33452
diff changeset
657 void purple_http_request_header_set_printf(PurpleHttpRequest *request,
2de654702970 Print-like setting headers, vestigal keepalive support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33452
diff changeset
658 const gchar *key, const gchar *format, ...) G_GNUC_PRINTF(3, 4);
2de654702970 Print-like setting headers, vestigal keepalive support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33452
diff changeset
659
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
660 /**
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
661 * Adds (without replacing, if exists) an HTTP request header.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
662 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
663 * @param key A header to be set.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
664 * @param value A value to set.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
665 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
666 * @see purple_http_request_header_set
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
667 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
668 void purple_http_request_header_add(PurpleHttpRequest *request,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
669 const gchar *key, const gchar *value);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
670
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
671 /*@}*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
672
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
673
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
674 /**************************************************************************/
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
675 /** @name HTTP Keep-Alive pool API */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
676 /**************************************************************************/
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
677 /*@{*/
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
678
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
679 /**
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
680 * Creates a new HTTP Keep-Alive pool.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
681 */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
682 PurpleHttpKeepalivePool *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
683 purple_http_keepalive_pool_new(void);
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
684
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
685 /**
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
686 * Increment the reference count.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
687 *
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
688 * @param pool The HTTP Keep-Alive pool.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
689 */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
690 void
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
691 purple_http_keepalive_pool_ref(PurpleHttpKeepalivePool *pool);
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
692
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
693 /**
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
694 * Decrement the reference count.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
695 *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
696 * If the reference count reaches zero, the pool will be freed and all
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
697 * connections will be closed.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
698 *
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
699 * @param pool The HTTP Keep-Alive pool.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
700 * @return @a pool or @c NULL if the reference count reached zero.
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
701 */
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
702 PurpleHttpKeepalivePool *
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
703 purple_http_keepalive_pool_unref(PurpleHttpKeepalivePool *pool);
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
704
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
705 /**
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
706 * Sets maximum allowed number of connections to specific host-triple (is_ssl +
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
707 * hostname + port).
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
708 *
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
709 * @param pool The HTTP Keep-Alive pool.
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
710 * @param limit The new limit, 0 for unlimited.
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
711 */
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
712 void
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
713 purple_http_keepalive_pool_set_limit_per_host(PurpleHttpKeepalivePool *pool,
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
714 guint limit);
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
715
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
716 /**
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
717 * Gets maximum allowed number of connections to specific host-triple (is_ssl +
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
718 * hostname + port).
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
719 *
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
720 * @param pool The HTTP Keep-Alive pool.
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
721 * @return The limit.
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
722 */
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
723 guint
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
724 purple_http_keepalive_pool_get_limit_per_host(PurpleHttpKeepalivePool *pool);
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
725
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
726 /*@}*/
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
727
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
728
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
729 /**************************************************************************/
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
730 /** @name HTTP connection set API */
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
731 /**************************************************************************/
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
732 /*@{*/
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
733
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
734 PurpleHttpConnectionSet *
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
735 purple_http_connection_set_new(void);
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
736
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
737 void
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
738 purple_http_connection_set_destroy(PurpleHttpConnectionSet *set);
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
739
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
740 void
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
741 purple_http_connection_set_add(PurpleHttpConnectionSet *set,
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
742 PurpleHttpConnection *http_conn);
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
743
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
744 /*@}*/
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
745
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
746
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
747 /**************************************************************************/
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
748 /** @name HTTP response API */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
749 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
750 /*@{*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
751
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
752 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
753 * Checks, if HTTP request was performed successfully.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
754 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
755 * @param response The response.
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
756 * @return TRUE, if request was performed successfully.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
757 */
34287
6cd0c77b1f6a HTTP: successful is spelled with one l
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34272
diff changeset
758 gboolean purple_http_response_is_successful(PurpleHttpResponse *response);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
759
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
760 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
761 * Gets HTTP response code.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
762 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
763 * @param response The response.
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
764 * @return HTTP response code.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
765 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
766 int purple_http_response_get_code(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
767
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
768 /**
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
769 * Gets error description.
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
770 *
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
771 * @param response The response.
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
772 * @return Localized error description or NULL, if there was no error.
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
773 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
774 const gchar * purple_http_response_get_error(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
775
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
776 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
777 * Gets HTTP response data length.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
778 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
779 * @param response The response.
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
780 * @return Data length;
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
781 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
782 gsize purple_http_response_get_data_len(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
783
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
784 /**
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
785 * Gets HTTP response data.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
786 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
787 * Response data is not written, if writer callback was set for request.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
788 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
789 * @param response The response.
33626
2522d124d883 update purple_http_response_get_data to take a second parameter that is a return address for the size of the data
Gary Kramlich <grim@reaperworld.com>
parents: 33517
diff changeset
790 * @param len Return address for the size of the data. Can be NULL.
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
791 * @return The data.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
792 */
33626
2522d124d883 update purple_http_response_get_data to take a second parameter that is a return address for the size of the data
Gary Kramlich <grim@reaperworld.com>
parents: 33517
diff changeset
793 const gchar * purple_http_response_get_data(PurpleHttpResponse *response, size_t *len);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
794
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
795 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
796 * Gets all headers got with response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
797 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
798 * @param response The response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
799 * @return GList of PurpleKeyValuePair, which keys are header field
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
800 * names (gchar*) and values are its contents (gchar*).
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
801 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
802 const GList * purple_http_response_get_all_headers(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
803
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
804 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
805 * Gets all headers with specified name got with response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
806 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
807 * @param response The response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
808 * @param name The name of header field.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
809 * @return GList of header field records contents (gchar*).
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
810 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
811 const GList * purple_http_response_get_headers_by_name(
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
812 PurpleHttpResponse *response, const gchar *name);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
813
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
814 /**
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
815 * Gets one header contents with specified name got with response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
816 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
817 * To get all headers with the same name, use
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
818 * purple_http_response_get_headers_by_name instead.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
819 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
820 * @param response The response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
821 * @param name The name of header field.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
822 * @return Header field contents or NULL, if there is no such one.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
823 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
824 const gchar * purple_http_response_get_header(PurpleHttpResponse *response,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
825 const gchar *name);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
826
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
827 /*@}*/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
828
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
829
33439
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
830 /**************************************************************************/
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
831 /** @name HTTP Subsystem */
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
832 /**************************************************************************/
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
833 /*@{*/
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
834
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
835 /**
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
836 * Initializes the http subsystem.
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
837 */
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
838 void purple_http_init(void);
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
839
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
840 /**
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
841 * Uninitializes the http subsystem.
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
842 */
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
843 void purple_http_uninit(void);
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
844
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
845 /*@}*/
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
846
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
847 G_END_DECLS
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
848
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
849 #endif /* _PURPLE_HTTP_H_ */

mercurial