comparison src/protocols/msn/httpmethod.h @ 7288:ff9127038a5a

[gaim-migrate @ 7869] It doesn't completely work yet, but this is the beginnings of the MSN HTTP port 80 connect method. I don't have it set so it can be enabled, so it's harmless to commit this now, but I want a second set of eyes, and I also want to do other MSN work without dealing with hand-merging patches. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 17 Oct 2003 14:57:59 +0000
parents
children c719f9a181d4
comparison
equal deleted inserted replaced
7287:3a41c3f80228 7288:ff9127038a5a
1 /**
2 * @file httpmethod.h HTTP connection method
3 *
4 * gaim
5 *
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 #ifndef _MSN_HTTP_METHOD_H_
23 #define _MSN_HTTP_METHOD_H_
24
25 typedef struct _MsnHttpMethodData MsnHttpMethodData;
26
27 #include "servconn.h"
28
29 struct _MsnHttpMethodData
30 {
31 char *session_id;
32 char *old_gateway_ip;
33 char *gateway_ip;
34 const char *server_type;
35
36 int timer;
37
38 gboolean virgin;
39 gboolean waiting_response;
40
41 GList *queue;
42 };
43
44 /**
45 * Writes data to the server using the HTTP connection method.
46 *
47 * @param servconn The server connection.
48 * @param buf The data to write.
49 * @param size The size of the data to write.
50 * @param server_type The optional server type.
51 *
52 * @return The number of bytes written.
53 */
54 size_t msn_http_servconn_write(MsnServConn *servconn, const char *buf,
55 size_t size, const char *server_type);
56
57 /**
58 * Polls the server for data.
59 *
60 * @param servconn The server connection.
61 */
62 void msn_http_servconn_poll(MsnServConn *servconn);
63
64 /**
65 * Processes an incoming message and returns a string the rest of MSN
66 * can deal with.
67 *
68 * @param servconn The server connection.
69 * @param buf The incoming buffer.
70 * @param size The incoming size.
71 * @param ret_buf The returned buffer.
72 * @param ret_len The returned length.
73 * @param error TRUE if there was an HTTP error.
74 *
75 * @return TRUE if the returned buffer is ready to be processed.
76 * FALSE otherwise.
77 */
78 gboolean msn_http_servconn_parse_data(MsnServConn *servconn,
79 const char *buf, size_t size,
80 char **ret_buf, size_t *ret_size,
81 gboolean *error);
82
83 #endif /* _MSN_HTTP_METHOD_H_ */