Fri, 19 Jul 2013 14:03:56 +0200
HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
|
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 | /** |
|
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
|
62 | * An pool of TCP connections for HTTP Keep-Alive session. |
|
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 | /** |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
67 | * An callback called after performing (successfully or not) HTTP request. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
68 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
69 | typedef void (*PurpleHttpCallback)(PurpleHttpConnection *http_conn, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
70 | PurpleHttpResponse *response, gpointer user_data); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
71 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
72 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
73 | * An callback called after storing data requested by PurpleHttpContentReader. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
74 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
75 | typedef void (*PurpleHttpContentReaderCb)(PurpleHttpConnection *http_conn, |
|
33466
918507303f45
HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33456
diff
changeset
|
76 | gboolean success, gboolean eof, size_t stored); |
|
33425
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 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
79 | * 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
|
80 | * disk). |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
81 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
82 | * @param http_conn Connection, which requests data. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
83 | * @param buffer Buffer to store data to (with offset ignored). |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
84 | * @param offset Position, from where to read data. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
85 | * @param length Length of data to read. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
86 | * @param user_data The user data passed with callback function. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
87 | * @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
|
88 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
89 | typedef void (*PurpleHttpContentReader)(PurpleHttpConnection *http_conn, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
90 | 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
|
91 | PurpleHttpContentReaderCb cb); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
92 | |
|
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 | * An callback for writting large response contents. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
95 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
96 | * @param http_conn Connection, which requests data. |
|
33432
9c4acb75b2e6
Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33430
diff
changeset
|
97 | * @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
|
98 | * @param buffer Buffer to read data from (with offset ignored). |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
99 | * @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
|
100 | * previous call), can be safely ignored. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
101 | * @param length Length of data read. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
102 | * @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
|
103 | * @return TRUE, if succeeded, FALSE otherwise. |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
104 | */ |
|
33517
ddd9e37c4b07
HTTP: PurpleHttpContentWriter support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33468
diff
changeset
|
105 | typedef gboolean (*PurpleHttpContentWriter)(PurpleHttpConnection *http_conn, |
|
33432
9c4acb75b2e6
Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33430
diff
changeset
|
106 | PurpleHttpResponse *response, const gchar *buffer, size_t offset, |
|
9c4acb75b2e6
Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33430
diff
changeset
|
107 | size_t length, gpointer user_data); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
108 | |
|
33468
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
109 | /** |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
110 | * An callback for watching HTTP connection progress. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
111 | * |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
112 | * @param http_conn The HTTP Connection. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
113 | * @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
|
114 | * the response. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
115 | * @param processed The amount of data already processed. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
116 | * @param total Total amount of data (in current state). |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
117 | * @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
|
118 | */ |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
119 | typedef void (*PurpleHttpProgressWatcher)(PurpleHttpConnection *http_conn, |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
120 | 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
|
121 | |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
122 | G_BEGIN_DECLS |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
123 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
124 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
125 | /** @name Performing HTTP requests */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
126 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
127 | /*@{*/ |
|
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 | * 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
|
131 | * function. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
132 | * |
|
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
|
133 | * @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
|
134 | * @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
|
135 | * @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
|
136 | * @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
|
137 | * @return The HTTP connection struct. |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
138 | */ |
|
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
|
139 | 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
|
140 | 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
|
141 | |
|
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 | /** |
|
8bdcc4f84a5e
HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34232
diff
changeset
|
143 | * 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
|
144 | * 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
|
145 | * |
|
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 | * @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
|
147 | * @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
|
148 | * @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
|
149 | * @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
|
150 | * @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
|
151 | */ |
|
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 | 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
|
153 | 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
|
154 | const gchar *format, ...) G_GNUC_PRINTF(4, 5); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
155 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
156 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
157 | * 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
|
158 | * 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
|
159 | * be modified when any of these is running. |
|
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 | * @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
|
162 | * @param request The request. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
163 | * @param callback The callback function. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
164 | * @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
|
165 | * @return The HTTP connection struct. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
166 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
167 | PurpleHttpConnection * purple_http_request(PurpleConnection *gc, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
168 | PurpleHttpRequest *request, PurpleHttpCallback callback, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
169 | gpointer user_data); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
170 | |
|
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 | /** @name HTTP connection API */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
173 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
174 | /*@{*/ |
|
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 | * Cancel a pending HTTP request. |
|
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 | * @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
|
180 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
181 | void purple_http_conn_cancel(PurpleHttpConnection *http_conn); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
182 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
183 | /** |
|
33448
4d41b1f7b95f
Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33446
diff
changeset
|
184 | * 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
|
185 | * |
|
4d41b1f7b95f
Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33446
diff
changeset
|
186 | * @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
|
187 | */ |
|
4d41b1f7b95f
Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33446
diff
changeset
|
188 | 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
|
189 | |
|
4d41b1f7b95f
Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33446
diff
changeset
|
190 | /** |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
191 | * Checks, if provided HTTP request is running. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
192 | * |
|
33448
4d41b1f7b95f
Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33446
diff
changeset
|
193 | * @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
|
194 | * @return TRUE, if provided connection is currently running. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
195 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
196 | gboolean purple_http_conn_is_running(PurpleHttpConnection *http_conn); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
197 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
198 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
199 | * 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
|
200 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
201 | * @param http_conn The HTTP connection. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
202 | * @return The PurpleHttpRequest object. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
203 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
204 | PurpleHttpRequest * purple_http_conn_get_request( |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
205 | PurpleHttpConnection *http_conn); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
206 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
207 | /** |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
208 | * Gets cookie jar used within connection. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
209 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
210 | * @param http_conn The HTTP connection. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
211 | * @return The cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
212 | */ |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
213 | PurpleHttpCookieJar * purple_http_conn_get_cookie_jar( |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
214 | PurpleHttpConnection *http_conn); |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
215 | |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
216 | /** |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
217 | * 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
|
218 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
219 | * @param http_conn The HTTP connection. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
220 | * @return The PurpleConnection object. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
221 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
222 | PurpleConnection * purple_http_conn_get_purple_connection( |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
223 | PurpleHttpConnection *http_conn); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
224 | |
|
33468
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
225 | /** |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
226 | * 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
|
227 | * May be used for updating transfer progress gauge. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
228 | * |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
229 | * @param http_conn The HTTP connection. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
230 | * @param watcher The watcher. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
231 | * @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
|
232 | * @param interval_threshold Minimum interval (in microseconds) of calls to |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
233 | * watcher. |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
234 | */ |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
235 | 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
|
236 | PurpleHttpProgressWatcher watcher, gpointer user_data, |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
237 | guint interval_threshold); |
|
b057fee9d11a
HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33466
diff
changeset
|
238 | |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
239 | /*@}*/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
240 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
241 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
242 | /**************************************************************************/ |
|
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
|
243 | /** @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
|
244 | /**************************************************************************/ |
|
de45cb0670a5
HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33626
diff
changeset
|
245 | /*@{*/ |
|
de45cb0670a5
HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33626
diff
changeset
|
246 | |
|
de45cb0670a5
HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33626
diff
changeset
|
247 | /** |
|
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 | * 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
|
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 | * 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
|
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 | * @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
|
253 | * @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
|
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 | 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
|
256 | 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
|
257 | |
|
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 | /** |
|
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 | * 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
|
260 | * |
|
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 | * @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
|
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 | 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
|
264 | 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
|
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 | /** |
|
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 | * 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
|
268 | * |
|
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 | * 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
|
270 | * "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
|
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 | * @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
|
273 | * @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
|
274 | */ |
|
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 | 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
|
276 | 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
|
277 | |
|
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 | /** |
|
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 | * 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
|
280 | * 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
|
281 | * |
|
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 | * 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
|
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 | * @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
|
285 | * @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
|
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 | 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
|
288 | 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
|
289 | |
|
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 | /** |
|
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 | * 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
|
292 | * |
|
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 | * @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
|
294 | * @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
|
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 | 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
|
297 | 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
|
298 | |
|
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 | /** |
|
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 | * 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
|
301 | * |
|
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 | * @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
|
303 | * @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
|
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 | const gchar * |
|
34219
eee308def583
HTTP: get rid of purple_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34218
diff
changeset
|
306 | 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
|
307 | |
|
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 | /** |
|
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 | * 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
|
310 | * |
|
de45cb0670a5
HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33626
diff
changeset
|
311 | * @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
|
312 | * @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
|
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 | 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
|
315 | 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
|
316 | |
|
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 | /** |
|
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 | * 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
|
319 | * |
|
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 | * @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
|
321 | * @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
|
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 | 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
|
324 | 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
|
325 | |
|
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 | /** |
|
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 | * 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
|
328 | * |
|
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 | * @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
|
330 | * @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
|
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 | 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
|
333 | 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
|
334 | |
|
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 | /** |
|
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 | * 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
|
337 | * |
|
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 | * @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
|
339 | * @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
|
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 | 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
|
342 | 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
|
343 | |
|
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 | /** |
|
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 | * 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
|
346 | * |
|
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 | * @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
|
348 | * @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
|
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 | 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
|
351 | 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
|
352 | |
|
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 | /*@}*/ |
|
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 | |
|
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 | /**************************************************************************/ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
357 | /** @name Cookie jar API */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
358 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
359 | /*@{*/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
360 | |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
361 | /** |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
362 | * Creates new cookie jar, |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
363 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
364 | * @return empty cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
365 | */ |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
366 | PurpleHttpCookieJar * purple_http_cookie_jar_new(void); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
367 | |
|
33456
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 | * Increment the reference count. |
|
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 | * @param cookie_jar The cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
372 | */ |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
373 | void purple_http_cookie_jar_ref(PurpleHttpCookieJar *cookie_jar); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
374 | |
|
33456
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 | * Decrement the reference count. |
|
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 | * 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
|
379 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
380 | * @param cookie_jar The cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
381 | * @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
|
382 | */ |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
383 | PurpleHttpCookieJar * purple_http_cookie_jar_unref( |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
384 | PurpleHttpCookieJar *cookie_jar); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
385 | |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
386 | /** |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
387 | * Sets the cookie. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
388 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
389 | * @param cookie_jar The cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
390 | * @param name Cookie name. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
391 | * @param value Cookie contents. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
392 | */ |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
393 | void purple_http_cookie_jar_set(PurpleHttpCookieJar *cookie_jar, |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
394 | const gchar *name, const gchar *value); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
395 | |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
396 | /** |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
397 | * Gets the cookie. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
398 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
399 | * @param cookie_jar The cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
400 | * @param name Cookie name. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
401 | * @return Cookie contents, or NULL, if cookie doesn't exists. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
402 | */ |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
403 | 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
|
404 | const gchar *name); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
405 | |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
406 | /** |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
407 | * Checks, if the cookie jar contains any cookies. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
408 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
409 | * @param cookie_jar The cookie jar. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
410 | * @return TRUE, if cookie jar contains any cookie, FALSE otherwise. |
|
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 | 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
|
413 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
414 | /*@}*/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
415 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
416 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
417 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
418 | /** @name HTTP Request API */ |
|
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 | |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
422 | /** |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
423 | * 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
|
424 | * |
|
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
|
425 | * @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
|
426 | * purple_http_request_set_url). |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
427 | * @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
|
428 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
429 | PurpleHttpRequest * purple_http_request_new(const gchar *url); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
430 | |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
431 | /** |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
432 | * Increment the reference count. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
433 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
434 | * @param request The request. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
435 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
436 | void purple_http_request_ref(PurpleHttpRequest *request); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
437 | |
|
33427
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 | * Decrement the reference count. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
440 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
441 | * 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
|
442 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
443 | * @param request The request. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
444 | * @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
|
445 | */ |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
446 | PurpleHttpRequest * purple_http_request_unref(PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
447 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
448 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
449 | * Sets URL for HTTP request. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
450 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
451 | * @param request The request. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
452 | * @param url The url. |
|
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 | 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
|
455 | |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
456 | /** |
|
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
|
457 | * 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
|
458 | * |
|
a5517f235e0f
HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34219
diff
changeset
|
459 | * @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
|
460 | * @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
|
461 | */ |
|
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 | 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
|
463 | 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
|
464 | |
|
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 | /** |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
466 | * 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
|
467 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
468 | * @param request The request. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
469 | * @return URL set for this request. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
470 | */ |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
471 | const gchar * purple_http_request_get_url(PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
472 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
473 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
474 | * 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
|
475 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
476 | * @param request The request. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
477 | * @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
|
478 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
479 | 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
|
480 | const gchar *method); |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
481 | |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
482 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
483 | * 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
|
484 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
485 | * @param request The request. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
486 | * @return The method. |
|
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 | const gchar * purple_http_request_get_method(PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
489 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
490 | /** |
|
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
|
491 | * 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
|
492 | * |
|
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
|
493 | * 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
|
494 | * |
|
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
|
495 | * @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
|
496 | * @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
|
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 | 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
|
499 | 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
|
500 | 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
|
501 | |
|
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 | * 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
|
504 | * |
|
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 | * 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
|
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 | * @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
|
508 | * @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
|
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 | 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
|
511 | 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
|
512 | |
|
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 | /** |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
514 | * Sets contents of HTTP request (for example, POST data). |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
515 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
516 | * @param request The request. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
517 | * @param contents The contents. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
518 | * @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
|
519 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
520 | 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
|
521 | const gchar *contents, int length); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
522 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
523 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
524 | * 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
|
525 | * uploads. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
526 | * |
|
33466
918507303f45
HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33456
diff
changeset
|
527 | * @param request The request. |
|
918507303f45
HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33456
diff
changeset
|
528 | * @param reader The reader callback. |
|
918507303f45
HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33456
diff
changeset
|
529 | * @param contents_size The size of all contents. |
|
918507303f45
HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33456
diff
changeset
|
530 | * @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
|
531 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
532 | 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
|
533 | PurpleHttpContentReader reader, int contents_length, gpointer user_data); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
534 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
535 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
536 | * Set contents writer for HTTP response. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
537 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
538 | * @param request The request. |
|
33517
ddd9e37c4b07
HTTP: PurpleHttpContentWriter support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33468
diff
changeset
|
539 | * @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
|
540 | * @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
|
541 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
542 | void purple_http_request_set_response_writer(PurpleHttpRequest *request, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
543 | PurpleHttpContentWriter writer, gpointer user_data); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
544 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
545 | /** |
|
33450
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
546 | * Set maximum amount of time, that request is allowed to run. |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
547 | * |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
548 | * @param request The request. |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
549 | * @param timeout Time (in seconds) after that timeout will be cancelled, |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
550 | * -1 for infinite time. |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
551 | */ |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
552 | void purple_http_request_set_timeout(PurpleHttpRequest *request, int timeout); |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
553 | |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
554 | /** |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
555 | * Get maximum amount of time, that request is allowed to run. |
|
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 | * @param request The request. |
|
4042907bcdf1
Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33449
diff
changeset
|
558 | * @return Timeout currently set (-1 for infinite). |
|
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 | int purple_http_request_get_timeout(PurpleHttpRequest *request); |
|
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 | /** |
|
33444
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
563 | * 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
|
564 | * |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
565 | * @param request The request. |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
566 | * @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
|
567 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
568 | 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
|
569 | int max_redirects); |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
570 | |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
571 | /** |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
572 | * 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
|
573 | * |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
574 | * @param request The request. |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
575 | * @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
|
576 | */ |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
577 | int purple_http_request_get_max_redirects(PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
578 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
579 | /** |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
580 | * Sets cookie jar used for the request. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
581 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
582 | * @param request The request. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
583 | * @param cookie_jar The cookie jar. |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
584 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
585 | void purple_http_request_set_cookie_jar(PurpleHttpRequest *request, |
|
33456
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
586 | PurpleHttpCookieJar *cookie_jar); |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
587 | |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
588 | /** |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
589 | * Gets cookie jar used for the request. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
590 | * |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
591 | * @param request The request. |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
592 | * @return The cookie jar. |
|
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 | PurpleHttpCookieJar * purple_http_request_get_cookie_jar( |
|
35a2f951a850
Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33455
diff
changeset
|
595 | PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
596 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
597 | /** |
|
33444
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
598 | * 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
|
599 | * |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
600 | * @param request The request. |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
601 | * @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
|
602 | */ |
|
33444
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
603 | 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
|
604 | gboolean http11); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
605 | |
|
33444
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
606 | /** |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
607 | * Gets used HTTP version. |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
608 | * |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
609 | * @param request The request. |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
610 | * @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
|
611 | */ |
|
b3afec292014
New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
612 | gboolean purple_http_request_is_http11(PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
613 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
614 | /** |
|
33446
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
615 | * 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
|
616 | * |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
617 | * Headers length doesn't count here. |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
618 | * |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
619 | * @param request The request. |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
620 | * @param max_len Maximum length of response to read (-1 for unlimited). |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
621 | */ |
|
33446
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
622 | 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
|
623 | |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
624 | /** |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
625 | * 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
|
626 | * |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
627 | * @param request The request. |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
628 | * @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
|
629 | */ |
|
95fda782966c
New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33444
diff
changeset
|
630 | int purple_http_request_get_max_len(PurpleHttpRequest *request); |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
631 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
632 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
633 | * 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
|
634 | * |
|
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
|
635 | * @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
|
636 | * @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
|
637 | * @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
|
638 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
639 | * @see purple_http_request_header_add |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
640 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
641 | void purple_http_request_header_set(PurpleHttpRequest *request, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
642 | const gchar *key, const gchar *value); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
643 | |
|
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
|
644 | /** |
|
a5517f235e0f
HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34219
diff
changeset
|
645 | * 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
|
646 | * |
|
a5517f235e0f
HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34219
diff
changeset
|
647 | * @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
|
648 | * @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
|
649 | * @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
|
650 | */ |
|
33455
2de654702970
Print-like setting headers, vestigal keepalive support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33452
diff
changeset
|
651 | 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
|
652 | 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
|
653 | |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
654 | /** |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
655 | * Adds (without replacing, if exists) an HTTP request header. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
656 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
657 | * @param key A header to be set. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
658 | * @param value A value to set. |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
659 | * |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
660 | * @see purple_http_request_header_set |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
661 | */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
662 | void purple_http_request_header_add(PurpleHttpRequest *request, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
663 | const gchar *key, const gchar *value); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
664 | |
|
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 | |
|
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
|
667 | |
|
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
|
668 | /**************************************************************************/ |
|
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
|
669 | /** @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
|
670 | /**************************************************************************/ |
|
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
|
671 | /*@{*/ |
|
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
|
672 | |
|
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 | * Creates a new HTTP KeepAlive 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
|
675 | */ |
|
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 | 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
|
677 | 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
|
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 | /** |
|
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
|
680 | * 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
|
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 | * @param pool The HTTP KeepAlive 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
|
683 | */ |
|
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 | 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
|
685 | 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
|
686 | |
|
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 | /** |
|
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
|
688 | * 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
|
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 | * 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
|
691 | * 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
|
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 | * @param pool The HTTP KeepAlive 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
|
694 | * @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
|
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 | 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
|
697 | 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
|
698 | |
|
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
|
699 | /*@}*/ |
|
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 | |
|
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 | |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
702 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
703 | /** @name HTTP response API */ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
704 | /**************************************************************************/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
705 | /*@{*/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
706 | |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
707 | /** |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
708 | * 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
|
709 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
710 | * @param response The response. |
|
33430
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
711 | * @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
|
712 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
713 | gboolean purple_http_response_is_successfull(PurpleHttpResponse *response); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
714 | |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
715 | /** |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
716 | * Gets HTTP response code. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
717 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
718 | * @param response The response. |
|
33430
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
719 | * @return HTTP response code. |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
720 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
721 | int purple_http_response_get_code(PurpleHttpResponse *response); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
722 | |
|
33430
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
723 | /** |
|
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
724 | * Gets error description. |
|
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
725 | * |
|
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
726 | * @param response The response. |
|
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
727 | * @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
|
728 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
729 | const gchar * purple_http_response_get_error(PurpleHttpResponse *response); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
730 | |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
731 | /** |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
732 | * Gets HTTP response data length. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
733 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
734 | * @param response The response. |
|
33430
013c5aebb665
Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33427
diff
changeset
|
735 | * @return Data length; |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
736 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
737 | gsize purple_http_response_get_data_len(PurpleHttpResponse *response); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
738 | |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
739 | /** |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
740 | * Gets HTTP response data. |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
741 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
742 | * 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
|
743 | * |
|
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
744 | * @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
|
745 | * @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
|
746 | * @return The data. |
|
33427
dd0c0860e293
Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33425
diff
changeset
|
747 | */ |
|
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
|
748 | 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
|
749 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
750 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
751 | * Gets all headers got with response. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
752 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
753 | * @param response The response. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
754 | * @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
|
755 | * 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
|
756 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
757 | const GList * purple_http_response_get_all_headers(PurpleHttpResponse *response); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
758 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
759 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
760 | * 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
|
761 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
762 | * @param response The response. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
763 | * @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
|
764 | * @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
|
765 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
766 | const GList * purple_http_response_get_headers_by_name( |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
767 | PurpleHttpResponse *response, const gchar *name); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
768 | |
|
33451
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
769 | /** |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
770 | * 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
|
771 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
772 | * 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
|
773 | * 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
|
774 | * |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
775 | * @param response The response. |
|
27d0e5dbc2a1
Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33450
diff
changeset
|
776 | * @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
|
777 | * @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
|
778 | */ |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
779 | const gchar * purple_http_response_get_header(PurpleHttpResponse *response, |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
780 | const gchar *name); |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
781 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
782 | /*@}*/ |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
783 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
784 | |
|
33439
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
785 | /**************************************************************************/ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
786 | /** @name HTTP Subsystem */ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
787 | /**************************************************************************/ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
788 | /*@{*/ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
789 | |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
790 | /** |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
791 | * Initializes the http subsystem. |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
792 | */ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
793 | void purple_http_init(void); |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
794 | |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
795 | /** |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
796 | * Uninitializes the http subsystem. |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
797 | */ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
798 | void purple_http_uninit(void); |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
799 | |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
800 | /*@}*/ |
|
178eb69a3f11
Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33432
diff
changeset
|
801 | |
|
33425
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
802 | G_END_DECLS |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
803 | |
|
379bf9ad6973
Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
804 | #endif /* _PURPLE_HTTP_H_ */ |