libpurple/http.h

Mon, 27 Nov 2017 20:55:41 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 27 Nov 2017 20:55:41 -0600
changeset 38791
cf55bdaccfb0
parent 38716
b9bed228745a
child 39388
3d9ba0d0c688
permissions
-rw-r--r--

Remove all of the #if 0'd blocks. All were 10 years old and don't seem necessary

33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
1 /* purple
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
2 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
3 * 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
4 * 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
5 * source distribution.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
6 *
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
7 * 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
8 * 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
9 * 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
10 * (at your option) any later version.
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 distributed in the hope that it will be useful,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
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 * 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
18 * 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
19 * 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
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
21
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
22 #ifndef _PURPLE_HTTP_H_
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
23 #define _PURPLE_HTTP_H_
35440
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
24 /**
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
25 * SECTION:http
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
26 * @section_id: libpurple-http
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
27 * @short_description: <filename>http.h</filename>
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
28 * @title: HTTP API
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
29 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
30
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
31 #include <glib.h>
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
32
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
33 #include "connection.h"
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
36 * PurpleHttpRequest:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
37 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
38 * 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
39 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
40 typedef struct _PurpleHttpRequest PurpleHttpRequest;
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
41
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
42 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
43 * PurpleHttpConnection:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
44 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
45 * 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
46 * 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 _PurpleHttpConnection PurpleHttpConnection;
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
51 * PurpleHttpResponse:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
52 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
53 * All information got with response for HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
54 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
55 typedef struct _PurpleHttpResponse PurpleHttpResponse;
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
56
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
57 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
58 * PurpleHttpURL:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
59 *
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
60 * 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
61 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
62 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
63
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
64 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
65 * PurpleHttpCookieJar:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
66 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
67 * 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
68 * request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
69 */
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
70 typedef struct _PurpleHttpCookieJar PurpleHttpCookieJar;
33425
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
73 * PurpleHttpKeepalivePool:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
74 *
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
75 * A pool of TCP connections for HTTP Keep-Alive session.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
76 */
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
77 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
78
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
79 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
80 * PurpleHttpConnectionSet:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
81 *
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
82 * A set of running HTTP requests. Can be used to cancel all of them at once.
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
83 */
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
84 typedef struct _PurpleHttpConnectionSet PurpleHttpConnectionSet;
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
85
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
86 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
87 * PurpleHttpCallback:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
88 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
89 * An callback called after performing (successfully or not) HTTP request.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
90 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
91 typedef void (*PurpleHttpCallback)(PurpleHttpConnection *http_conn,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
92 PurpleHttpResponse *response, gpointer user_data);
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
95 * PurpleHttpContentReaderCb:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
96 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
97 * An callback called after storing data requested by PurpleHttpContentReader.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
98 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
99 typedef void (*PurpleHttpContentReaderCb)(PurpleHttpConnection *http_conn,
33466
918507303f45 HTTP API: PurpleHttpContentReader support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33456
diff changeset
100 gboolean success, gboolean eof, size_t stored);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
101
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
102 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
103 * PurpleHttpContentReader:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
104 * @http_conn: Connection, which requests data.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
105 * @buffer: Buffer to store data to (with offset ignored).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
106 * @offset: Position, from where to read data.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
107 * @length: Length of data to read.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
108 * @user_data: The user data passed with callback function.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
109 * @cb: The function to call after storing data to buffer.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
110 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
111 * An callback for getting large request contents (ie. from file stored on
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
112 * disk).
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
113 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
114 typedef void (*PurpleHttpContentReader)(PurpleHttpConnection *http_conn,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
115 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
116 PurpleHttpContentReaderCb cb);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
117
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
118 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
119 * PurpleHttpContentWriter:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
120 * @http_conn: Connection, which requests data.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
121 * @response: Response at point got so far (may change later).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
122 * @buffer: Buffer to read data from (with offset ignored).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
123 * @offset: Position of data got (its value is offset + length of
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
124 * previous call), can be safely ignored.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
125 * @length: Length of data read.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
126 * @user_data: The user data passed with callback function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
127 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
128 * An callback for writting large response contents.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
129 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
130 * Returns: TRUE, if succeeded, FALSE otherwise.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
131 */
33517
ddd9e37c4b07 HTTP: PurpleHttpContentWriter support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33468
diff changeset
132 typedef gboolean (*PurpleHttpContentWriter)(PurpleHttpConnection *http_conn,
33432
9c4acb75b2e6 Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33430
diff changeset
133 PurpleHttpResponse *response, const gchar *buffer, size_t offset,
9c4acb75b2e6 Let's parse response headers
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33430
diff changeset
134 size_t length, gpointer user_data);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
135
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
136 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
137 * PurpleHttpProgressWatcher:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
138 * @http_conn: The HTTP Connection.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
139 * @reading_state: FALSE, is we are sending the request, TRUE, when reading
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
140 * the response.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
141 * @processed: The amount of data already processed.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
142 * @total: Total amount of data (in current state).
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
143 * @user_data: The user data passed with callback function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
144 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
145 * An callback for watching HTTP connection progress.
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
146 */
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
147 typedef void (*PurpleHttpProgressWatcher)(PurpleHttpConnection *http_conn,
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
148 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
149
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
150 G_BEGIN_DECLS
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
151
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
152 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
153 /* Performing HTTP requests */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
154 /**************************************************************************/
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
157 * purple_http_get:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
158 * @gc: The connection for which the request is needed, or NULL.
35682
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
159 * @callback: (scope call): The callback function.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
160 * @user_data: The user data to pass to the callback function.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
161 * @url: The URL.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
162 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
163 * Fetches the data from a URL with GET request, and passes it to a callback
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
164 * function.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
165 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
166 * Returns: The HTTP connection struct.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
167 */
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
168 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
169 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
170
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
171 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
172 * purple_http_get_printf:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
173 * @gc: The connection for which the request is needed, or NULL.
35682
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
174 * @callback: (scope call): The callback function.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
175 * @user_data: The user data to pass to the callback function.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
176 * @format: The format string.
38560
3007790519bf libpurple: Add some trivial parameter documentation strings
Mike Ruprecht <cmaiku@gmail.com>
parents: 37551
diff changeset
177 * @...: The parameters to insert into the format string.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
178 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
179 * Constructs an URL and fetches the data from it with GET request, then passes
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
180 * it to a callback function.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
181 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
182 * Returns: The HTTP connection struct.
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
183 */
8bdcc4f84a5e HTTP: introduce purple_http_get_printf, make purple_http_get consistent with it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34232
diff changeset
184 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
185 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
186 const gchar *format, ...) G_GNUC_PRINTF(4, 5);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
187
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
188 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
189 * purple_http_request:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
190 * @gc: The connection for which the request is needed, or NULL.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
191 * @request: The request.
35682
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
192 * @callback: (scope call): The callback function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
193 * @user_data: The user data to pass to the callback function.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
194 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
195 * 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
196 * 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
197 * be modified when any of these is running.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
198 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
199 * Returns: The HTTP connection struct.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
200 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
201 PurpleHttpConnection * purple_http_request(PurpleConnection *gc,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
202 PurpleHttpRequest *request, PurpleHttpCallback callback,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
203 gpointer user_data);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
204
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
205 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
206 /* HTTP connection API */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
207 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
208
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
209 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
210 * purple_http_conn_cancel:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
211 * @http_conn: The data returned when you initiated the HTTP request.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
212 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
213 * Cancel a pending HTTP request.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
214 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
215 void purple_http_conn_cancel(PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
216
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
217 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
218 * purple_http_conn_cancel_all:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
219 * @gc: The handle.
33448
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
220 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
221 * Cancels all HTTP connections associated with the specified handle.
33448
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
222 */
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
223 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
224
4d41b1f7b95f Cancelling all HTTP connections on account disconnect or app shutdown
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33446
diff changeset
225 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
226 * purple_http_conn_is_running:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
227 * @http_conn: The HTTP connection (may be invalid pointer).
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
228 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
229 * Checks, if provided HTTP request is running.
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
230 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
231 * Returns: TRUE, if provided connection is currently running.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
232 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
233 gboolean purple_http_conn_is_running(PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
234
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
235 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
236 * purple_http_conn_get_request:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
237 * @http_conn: The HTTP connection.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
238 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
239 * 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
240 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
241 * Returns: The PurpleHttpRequest object.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
242 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
243 PurpleHttpRequest * purple_http_conn_get_request(
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
244 PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
245
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
246 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
247 * purple_http_conn_get_cookie_jar:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
248 * @http_conn: The HTTP connection.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
249 *
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
250 * Gets cookie jar used within connection.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
251 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
252 * Returns: The cookie jar.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
253 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
254 PurpleHttpCookieJar * purple_http_conn_get_cookie_jar(
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
255 PurpleHttpConnection *http_conn);
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
256
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
257 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
258 * purple_http_conn_get_purple_connection:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
259 * @http_conn: The HTTP connection.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
260 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
261 * 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
262 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
263 * Returns: The PurpleConnection object.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
264 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
265 PurpleConnection * purple_http_conn_get_purple_connection(
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
266 PurpleHttpConnection *http_conn);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
267
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
268 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
269 * purple_http_conn_set_progress_watcher:
35682
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
270 * @http_conn: The HTTP connection.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
271 * @watcher: (scope call): The watcher.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
272 * @user_data: The user data to pass to the callback function.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
273 * @interval_threshold: Minimum interval (in microseconds) of calls to
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
274 * watcher, or -1 for default.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
275 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
276 * Sets the watcher, called after writing or reading data to/from HTTP stream.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
277 * May be used for updating transfer progress gauge.
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
278 */
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
279 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
280 PurpleHttpProgressWatcher watcher, gpointer user_data,
34272
8df870b218ca HTTP: chop off another HTTP implementation (for xmpp oob file transfers)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34268
diff changeset
281 gint interval_threshold);
33468
b057fee9d11a HTTP progress watcher support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33466
diff changeset
282
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
283
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
284 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
285 /* URL processing API */
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
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
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
289 * purple_http_url_parse:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
290 * @url: The URL to parse.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
291 *
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
292 * 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
293 *
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 * 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
295 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
296 * Returns: The parsed url or NULL, if the URL is invalid.
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
297 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
298 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
299 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
300
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
301 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
302 * purple_http_url_free:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
303 * @parsed_url: The parsed URL struct, or NULL.
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
304 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
305 * Frees the parsed URL struct.
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
306 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
307 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
308 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
309
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
310 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
311 * purple_http_url_relative:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
312 * @base_url: The base URL. The result is stored here.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
313 * @relative_url: The relative URL.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
314 *
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
315 * 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
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 * 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
318 * "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
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 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
321 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
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
324 * purple_http_url_print:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
325 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
326 *
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
327 * 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
328 * 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
329 *
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 * 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
331 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
332 * Returns: The printable form of the 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
333 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
334 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
335 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
336
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
337 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
338 * purple_http_url_get_protocol:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
339 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
340 *
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
341 * 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
342 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
343 * Returns: The protocol.
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
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 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
346 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
347
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
349 * purple_http_url_get_username:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
350 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
351 *
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
352 * 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
353 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
354 * Returns: The username.
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
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 const gchar *
34219
eee308def583 HTTP: get rid of purple_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34218
diff changeset
357 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
358
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
359 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
360 * purple_http_url_get_password:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
361 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
362 *
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
363 * 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
364 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
365 * Returns: The password.
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
366 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
367 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
368 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
369
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
370 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
371 * purple_http_url_get_host:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
372 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
373 *
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
374 * 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
375 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
376 * Returns: The hostname.
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
377 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
378 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
379 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
380
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
381 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
382 * purple_http_url_get_port:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
383 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
384 *
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
385 * 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
386 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
387 * Returns: The port number.
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
388 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
389 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
390 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
391
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
392 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
393 * purple_http_url_get_path:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
394 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
395 *
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
396 * 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
397 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
398 * Returns: The path.
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
399 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
400 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
401 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
402
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
403 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
404 * purple_http_url_get_fragment:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
405 * @parsed_url: The URL struct.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
406 *
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
407 * 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
408 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
409 * Returns: The fragment.
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
410 */
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
411 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
412 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
413
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
414
de45cb0670a5 HTTP: make purple_url_parse deprecated in favor of purple_http_url_parse
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33626
diff changeset
415 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
416 /* Cookie jar API */
33425
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
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
419 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
420 * purple_http_cookie_jar_new:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
421 *
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
422 * Creates new cookie jar,
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
423 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
424 * Returns: empty cookie jar.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
425 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
426 PurpleHttpCookieJar * purple_http_cookie_jar_new(void);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
427
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
428 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
429 * purple_http_cookie_jar_ref:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
430 * @cookie_jar: The cookie jar.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
431 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
432 * Increment the reference count.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
433 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
434 void purple_http_cookie_jar_ref(PurpleHttpCookieJar *cookie_jar);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
435
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
436 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
437 * purple_http_cookie_jar_unref:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
438 * @cookie_jar: The cookie jar.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
439 *
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
440 * Decrement the reference count.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
441 *
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
442 * 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
443 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
444 * Returns: @cookie_jar or %NULL if the reference count reached zero.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
445 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
446 PurpleHttpCookieJar * purple_http_cookie_jar_unref(
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
447 PurpleHttpCookieJar *cookie_jar);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
448
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
449 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
450 * purple_http_cookie_jar_set:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
451 * @cookie_jar: The cookie jar.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
452 * @name: Cookie name.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
453 * @value: Cookie contents.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
454 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
455 * Sets the cookie.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
456 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
457 void purple_http_cookie_jar_set(PurpleHttpCookieJar *cookie_jar,
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
458 const gchar *name, const gchar *value);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
459
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
460 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
461 * purple_http_cookie_jar_get:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
462 * @cookie_jar: The cookie jar.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
463 * @name: Cookie name.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
464 *
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
465 * Gets the cookie.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
466 *
37551
ef0428673cc3 Handle session cookies (expiry of 0) and correctly escape/unescape cookies when getting/setting them manually
Eion Robb <eionrobb@gmail.com>
parents: 37433
diff changeset
467 * The result must be g_free'd.
ef0428673cc3 Handle session cookies (expiry of 0) and correctly escape/unescape cookies when getting/setting them manually
Eion Robb <eionrobb@gmail.com>
parents: 37433
diff changeset
468 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
469 * Returns: Cookie contents, or NULL, if cookie doesn't exists.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
470 */
37551
ef0428673cc3 Handle session cookies (expiry of 0) and correctly escape/unescape cookies when getting/setting them manually
Eion Robb <eionrobb@gmail.com>
parents: 37433
diff changeset
471 gchar * purple_http_cookie_jar_get(PurpleHttpCookieJar *cookie_jar,
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
472 const gchar *name);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
473
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
474 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
475 * purple_http_cookie_jar_is_empty:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
476 * @cookie_jar: The cookie jar.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
477 *
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
478 * Checks, if the cookie jar contains any cookies.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
479 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
480 * Returns: TRUE, if cookie jar contains any cookie, FALSE otherwise.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
481 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
482 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
483
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
484
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
485 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
486 /* HTTP Request API */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
487 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
488
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
489 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
490 * purple_http_request_new:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
491 * @url: The URL to request for, or NULL to leave empty (to be set with
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
492 * purple_http_request_set_url).
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
493 *
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
494 * 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
495 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
496 * Returns: The new instance of HTTP request struct.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
497 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
498 PurpleHttpRequest * purple_http_request_new(const gchar *url);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
499
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
500 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
501 * purple_http_request_ref:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
502 * @request: The request.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
503 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
504 * Increment the reference count.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
505 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
506 void purple_http_request_ref(PurpleHttpRequest *request);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
507
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
508 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
509 * purple_http_request_unref:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
510 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
511 *
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
512 * Decrement the reference count.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
513 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
514 * 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
515 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
516 * Returns: @request or %NULL if the reference count reached zero.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
517 */
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
518 PurpleHttpRequest * purple_http_request_unref(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
519
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
520 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
521 * purple_http_request_set_url:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
522 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
523 * @url: The url.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
524 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
525 * Sets URL for HTTP request.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
526 */
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
527 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
528
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
529 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
530 * purple_http_request_set_url_printf:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
531 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
532 * @format: The format string.
38560
3007790519bf libpurple: Add some trivial parameter documentation strings
Mike Ruprecht <cmaiku@gmail.com>
parents: 37551
diff changeset
533 * @...: The parameters to insert into the format string.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
534 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
535 * Constructs and sets an URL for HTTP request.
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
536 */
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
537 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
538 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
539
a5517f235e0f HTTP: migrate purple_util_fetch_url_request to new API for GG prpl
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34219
diff changeset
540 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
541 * purple_http_request_get_url:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
542 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
543 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
544 * 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
545 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
546 * Returns: URL set for this request.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
547 */
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
548 const gchar * purple_http_request_get_url(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
549
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
550 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
551 * purple_http_request_set_method:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
552 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
553 * @method: The method, or NULL for default.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
554 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
555 * Sets custom HTTP method used for the request.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
556 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
557 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
558 const gchar *method);
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
559
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
560 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
561 * purple_http_request_get_method:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
562 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
563 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
564 * 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
565 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
566 * Returns: The method.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
567 */
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
568 const gchar * purple_http_request_get_method(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
569
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
570 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
571 * purple_http_request_set_keepalive_pool:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
572 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
573 * @pool: The new KeepAlive pool, or NULL to reset.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
574 *
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
575 * 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
576 *
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
577 * 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
578 */
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
579 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
580 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
581 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
582
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
583 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
584 * purple_http_request_get_keepalive_pool:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
585 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
586 *
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
587 * 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
588 *
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
589 * 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
590 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
591 * Returns: The KeepAlive pool, used for the request.
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
592 */
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
593 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
594 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
595
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
596 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
597 * purple_http_request_set_contents:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
598 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
599 * @contents: The contents.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
600 * @length: The length of contents (-1 if it's a NULL-terminated string)
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
601 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
602 * Sets contents of HTTP request (for example, POST data).
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
603 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
604 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
605 const gchar *contents, int length);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
606
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
607 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
608 * purple_http_request_set_contents_reader:
35682
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
609 * @request: The request.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
610 * @reader: (scope call): The reader callback.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
611 * @contents_length: The size of all contents.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
612 * @user_data: The user data to pass to the callback function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
613 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
614 * Sets contents reader for HTTP request, used mainly for possible large
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
615 * uploads.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
616 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
617 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
618 PurpleHttpContentReader reader, int contents_length, gpointer user_data);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
619
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
620 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
621 * purple_http_request_set_response_writer:
35682
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
622 * @request: The request.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
623 * @writer: (scope call): The writer callback, or %NULL to remove existing.
65c1912ee2c8 Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
624 * @user_data: The user data to pass to the callback function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
625 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
626 * Set contents writer for HTTP response.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
627 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
628 void purple_http_request_set_response_writer(PurpleHttpRequest *request,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
629 PurpleHttpContentWriter writer, gpointer user_data);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
630
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
631 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
632 * purple_http_request_set_timeout:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
633 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
634 * @timeout: Time (in seconds) after that timeout will be cancelled,
33450
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
635 * -1 for infinite time.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
636 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
637 * Set maximum amount of time, that request is allowed to run.
33450
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
638 */
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
639 void purple_http_request_set_timeout(PurpleHttpRequest *request, int timeout);
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
640
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
641 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
642 * purple_http_request_get_timeout:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
643 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
644 *
33450
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
645 * Get maximum amount of time, that request is allowed to run.
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
646 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
647 * Returns: Timeout currently set (-1 for infinite).
33450
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
648 */
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
649 int purple_http_request_get_timeout(PurpleHttpRequest *request);
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
650
4042907bcdf1 Timeout support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33449
diff changeset
651 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
652 * purple_http_request_set_max_redirects:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
653 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
654 * @max_redirects: Maximum amount of redirects, or -1 for unlimited.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
655 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
656 * Sets maximum amount of redirects.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
657 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
658 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
659 int max_redirects);
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
660
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
661 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
662 * purple_http_request_get_max_redirects:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
663 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
664 *
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
665 * 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
666 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
667 * Returns: Current maximum amount of redirects (-1 for unlimited).
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
668 */
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
669 int purple_http_request_get_max_redirects(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
670
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
671 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
672 * purple_http_request_set_cookie_jar:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
673 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
674 * @cookie_jar: The cookie jar.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
675 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
676 * Sets cookie jar used for the request.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
677 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
678 void purple_http_request_set_cookie_jar(PurpleHttpRequest *request,
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
679 PurpleHttpCookieJar *cookie_jar);
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
680
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
681 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
682 * purple_http_request_get_cookie_jar:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
683 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
684 *
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
685 * Gets cookie jar used for the request.
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
686 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
687 * Returns: The cookie jar.
33456
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
688 */
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
689 PurpleHttpCookieJar * purple_http_request_get_cookie_jar(
35a2f951a850 Cookies support (reading)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33455
diff changeset
690 PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
691
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
692 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
693 * purple_http_request_set_http11:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
694 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
695 * @http11: TRUE for HTTP/1.1, FALSE for HTTP/1.0.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
696 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
697 * Sets HTTP version to use.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
698 */
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
699 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
700 gboolean http11);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
701
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
702 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
703 * purple_http_request_is_http11:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
704 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
705 *
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
706 * Gets used HTTP version.
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
707 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
708 * Returns: TRUE, if we use HTTP/1.1, FALSE for HTTP/1.0.
33444
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
709 */
b3afec292014 New features: http version switching and limits for redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33439
diff changeset
710 gboolean purple_http_request_is_http11(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
711
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
712 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
713 * purple_http_request_set_max_len:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
714 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
715 * @max_len: Maximum length of response to read (-1 for the maximum
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
716 * supported amount).
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
717 *
33446
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
718 * 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
719 *
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
720 * Headers length doesn't count here.
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
721 *
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
722 */
33446
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
723 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
724
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
725 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
726 * purple_http_request_get_max_len:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
727 * @request: The request.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
728 *
33446
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
729 * 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
730 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
731 * Returns: Maximum length of response to read, or -1 if unlimited.
33446
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
732 */
95fda782966c New feature: setting maximum length of response
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33444
diff changeset
733 int purple_http_request_get_max_len(PurpleHttpRequest *request);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
734
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
735 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
736 * purple_http_request_header_set:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
737 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
738 * @key: A header to be set.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
739 * @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
740 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
741 * Sets (replaces, if exists) specified HTTP request header with provided value.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
742 *
35471
a23769351b31 Remove @see
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
743 * See purple_http_request_header_add().
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
744 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
745 void purple_http_request_header_set(PurpleHttpRequest *request,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
746 const gchar *key, const gchar *value);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
747
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
748 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
749 * purple_http_request_header_set_printf:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
750 * @request: The request.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
751 * @key: A header to be set.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
752 * @format: The format string.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
753 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
754 * Constructs and sets (replaces, if exists) specified HTTP request header.
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
755 */
33455
2de654702970 Print-like setting headers, vestigal keepalive support
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33452
diff changeset
756 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
757 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
758
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
759 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
760 * purple_http_request_header_add:
38560
3007790519bf libpurple: Add some trivial parameter documentation strings
Mike Ruprecht <cmaiku@gmail.com>
parents: 37551
diff changeset
761 * @request: The request.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
762 * @key: A header to be set.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
763 * @value: A value to set.
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
764 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
765 * Adds (without replacing, if exists) an HTTP request header.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
766 *
35471
a23769351b31 Remove @see
Ankit Vani <a@nevitus.org>
parents: 35462
diff changeset
767 * See purple_http_request_header_set().
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
768 */
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
769 void purple_http_request_header_add(PurpleHttpRequest *request,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
770 const gchar *key, const gchar *value);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
771
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
772
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
773 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
774 /* HTTP Keep-Alive pool API */
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
775 /**************************************************************************/
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
776
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
777 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
778 * purple_http_keepalive_pool_new:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
779 *
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
780 * Creates a new HTTP Keep-Alive pool.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
781 */
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
782 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
783 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
784
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
785 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
786 * purple_http_keepalive_pool_ref:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
787 * @pool: The HTTP Keep-Alive pool.
34257
935120490eb2 HTTP: isolate socket-related code in http module; initial implementation for keep-alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34233
diff changeset
788 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
789 * Increment the reference count.
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
790 */
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
791 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
792 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
793
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
794 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
795 * purple_http_keepalive_pool_unref:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
796 * @pool: The HTTP Keep-Alive pool.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
797 *
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
798 * 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
799 *
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
800 * 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
801 * 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
802 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
803 * Returns: @pool or %NULL if the reference count reached zero.
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
804 */
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
805 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
806 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
807
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
808 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
809 * purple_http_keepalive_pool_set_limit_per_host:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
810 * @pool: The HTTP Keep-Alive pool.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
811 * @limit: The new limit, 0 for unlimited.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
812 *
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
813 * Sets maximum allowed number of connections to specific host-triple (is_ssl +
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
814 * hostname + port).
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
815 */
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
816 void
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
817 purple_http_keepalive_pool_set_limit_per_host(PurpleHttpKeepalivePool *pool,
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
818 guint limit);
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
819
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
820 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
821 * purple_http_keepalive_pool_get_limit_per_host:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
822 * @pool: The HTTP Keep-Alive pool.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
823 *
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
824 * Gets maximum allowed number of connections to specific host-triple (is_ssl +
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
825 * hostname + port).
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
826 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
827 * Returns: The limit.
34263
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
828 */
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
829 guint
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
830 purple_http_keepalive_pool_get_limit_per_host(PurpleHttpKeepalivePool *pool);
e55133eaa11a HTTP: queuing requests for Keep-Alive connections
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34257
diff changeset
831
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
832
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
833 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
834 /* HTTP connection set API */
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
835 /**************************************************************************/
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
836
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
837 PurpleHttpConnectionSet *
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
838 purple_http_connection_set_new(void);
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
839
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
840 void
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
841 purple_http_connection_set_destroy(PurpleHttpConnectionSet *set);
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
842
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
843 void
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
844 purple_http_connection_set_add(PurpleHttpConnectionSet *set,
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
845 PurpleHttpConnection *http_conn);
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
846
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
847
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34263
diff changeset
848 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
849 /* HTTP response API */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
850 /**************************************************************************/
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
851
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
852 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
853 * purple_http_response_is_successful:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
854 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
855 *
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
856 * 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
857 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
858 * Returns: 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
859 */
34287
6cd0c77b1f6a HTTP: successful is spelled with one l
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34272
diff changeset
860 gboolean purple_http_response_is_successful(PurpleHttpResponse *response);
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
861
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
862 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
863 * purple_http_response_get_code:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
864 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
865 *
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
866 * Gets HTTP response code.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
867 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
868 * Returns: HTTP response code.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
869 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
870 int purple_http_response_get_code(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
871
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
872 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
873 * purple_http_response_get_error:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
874 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
875 *
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
876 * Gets error description.
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
877 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
878 * Returns: Localized error description or NULL, if there was no error.
33430
013c5aebb665 Let's connect
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33427
diff changeset
879 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
880 const gchar * purple_http_response_get_error(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
881
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
882 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
883 * purple_http_response_get_data_len:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
884 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
885 *
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
886 * Gets HTTP response data length.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
887 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
888 * Returns: Data length;
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
889 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
890 gsize purple_http_response_get_data_len(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
891
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
892 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
893 * purple_http_response_get_data:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
894 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
895 * @len: Return address for the size of the data. Can be NULL.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
896 *
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
897 * Gets HTTP response data.
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
898 *
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
899 * 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
900 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
901 * Returns: The data.
33427
dd0c0860e293 Basic API and testing actions for it
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33425
diff changeset
902 */
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
903 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
904
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
905 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
906 * purple_http_response_get_all_headers:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
907 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
908 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
909 * Gets all headers got with response.
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
910 *
38716
b9bed228745a Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38560
diff changeset
911 * Returns: (element-type PurpleKeyValuePair) (transfer none): Keys are header
b9bed228745a Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38560
diff changeset
912 * field names (gchar*) and values are its contents (gchar*).
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
913 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
914 const GList * purple_http_response_get_all_headers(PurpleHttpResponse *response);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
915
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
916 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
917 * purple_http_response_get_headers_by_name:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
918 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
919 * @name: The name of header field.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
920 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
921 * 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
922 *
38716
b9bed228745a Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38560
diff changeset
923 * Returns: (element-type gchar*) (transfer none): Header field record contents.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
924 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
925 const GList * purple_http_response_get_headers_by_name(
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
926 PurpleHttpResponse *response, const gchar *name);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
927
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
928 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
929 * purple_http_response_get_header:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
930 * @response: The response.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
931 * @name: The name of header field.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
932 *
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
933 * 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
934 *
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
935 * 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
936 * 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
937 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34295
diff changeset
938 * Returns: Header field contents or NULL, if there is no such one.
33451
27d0e5dbc2a1 Implement missing getters/setters and corresponding features
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33450
diff changeset
939 */
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
940 const gchar * purple_http_response_get_header(PurpleHttpResponse *response,
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
941 const gchar *name);
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
942
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
943
33439
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
944 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
945 /* HTTP Subsystem */
33439
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
946 /**************************************************************************/
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
947
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
948 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
949 * purple_http_init:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
950 *
33439
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
951 * Initializes the http subsystem.
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
952 */
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
953 void purple_http_init(void);
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
954
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
955 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
956 * purple_http_uninit:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
957 *
33439
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
958 * Uninitializes the http subsystem.
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
959 */
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
960 void purple_http_uninit(void);
178eb69a3f11 Handle redirects
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33432
diff changeset
961
33425
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
962 G_END_DECLS
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
963
379bf9ad6973 Initial HTTP API definitions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff changeset
964 #endif /* _PURPLE_HTTP_H_ */

mercurial