Mercurial > pidgin.yaz
annotate src/protocols/msn/httpmethod.h @ 8299:7402101c0319
[gaim-migrate @ 9023]
Ladies and gentlemen, MSN port 80 connect method.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 20 Feb 2004 22:11:56 +0000 |
parents | c719f9a181d4 |
children | 06f57183e29f |
rev | line source |
---|---|
7288 | 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; | |
8298
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
40 gboolean dirty; |
7288 | 41 |
42 GList *queue; | |
43 }; | |
44 | |
45 /** | |
8298
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
46 * Initializes the HTTP data for a session. |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
47 * |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
48 * @param session The session. |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
49 */ |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
50 void msn_http_session_init(MsnSession *session); |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
51 |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
52 /** |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
53 * Uninitializes the HTTP data for a session. |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
54 * |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
55 * @param session The session. |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
56 */ |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
57 void msn_http_session_uninit(MsnSession *session); |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
58 |
c719f9a181d4
[gaim-migrate @ 9022]
Christian Hammond <chipx86@chipx86.com>
parents:
7288
diff
changeset
|
59 /** |
7288 | 60 * Writes data to the server using the HTTP connection method. |
61 * | |
62 * @param servconn The server connection. | |
63 * @param buf The data to write. | |
64 * @param size The size of the data to write. | |
65 * @param server_type The optional server type. | |
66 * | |
67 * @return The number of bytes written. | |
68 */ | |
69 size_t msn_http_servconn_write(MsnServConn *servconn, const char *buf, | |
70 size_t size, const char *server_type); | |
71 | |
72 /** | |
73 * Polls the server for data. | |
74 * | |
75 * @param servconn The server connection. | |
76 */ | |
77 void msn_http_servconn_poll(MsnServConn *servconn); | |
78 | |
79 /** | |
80 * Processes an incoming message and returns a string the rest of MSN | |
81 * can deal with. | |
82 * | |
83 * @param servconn The server connection. | |
84 * @param buf The incoming buffer. | |
85 * @param size The incoming size. | |
86 * @param ret_buf The returned buffer. | |
87 * @param ret_len The returned length. | |
88 * @param error TRUE if there was an HTTP error. | |
89 * | |
90 * @return TRUE if the returned buffer is ready to be processed. | |
91 * FALSE otherwise. | |
92 */ | |
93 gboolean msn_http_servconn_parse_data(MsnServConn *servconn, | |
94 const char *buf, size_t size, | |
95 char **ret_buf, size_t *ret_size, | |
96 gboolean *error); | |
97 | |
98 #endif /* _MSN_HTTP_METHOD_H_ */ |