Mercurial > pidgin
annotate src/protocols/msn/msn.h @ 5127:9089baf224c8
[gaim-migrate @ 5490]
now the others also aren't 2 levels deep.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 14 Apr 2003 01:52:44 +0000 |
parents | 3145c5c45877 |
children | cab5cd204956 |
rev | line source |
---|---|
4542 | 1 /** |
2 * @file msn.h The MSN protocol plugin | |
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 */ | |
23 #ifndef _MSN_H_ | |
24 #define _MSN_H_ | |
25 | |
26 #include "config.h" | |
27 | |
28 #ifndef _WIN32 | |
29 #include <unistd.h> | |
30 #else | |
31 #include <winsock.h> | |
32 #include <io.h> | |
33 #endif | |
34 | |
35 | |
36 #include <sys/stat.h> | |
37 #include <stdlib.h> | |
38 #include <string.h> | |
39 #include <errno.h> | |
40 #include <stdio.h> | |
41 #include <ctype.h> | |
42 #ifndef _WIN32 | |
43 #include <netdb.h> | |
44 #endif | |
45 #include "gaim.h" | |
46 #include "prpl.h" | |
47 #include "proxy.h" | |
48 #include "md5.h" | |
49 | |
50 #ifdef _WIN32 | |
51 #include "win32dep.h" | |
52 #include "stdint.h" | |
53 #endif | |
54 | |
55 #include "msg.h" | |
56 #include "switchboard.h" | |
57 | |
58 #define MSN_BUF_LEN 8192 | |
59 #define MIME_HEADER "MIME-Version: 1.0\r\n" \ | |
60 "Content-Type: text/plain; charset=UTF-8\r\n" \ | |
61 "User-Agent: Gaim/" VERSION "\r\n" \ | |
62 "X-MMS-IM-Format: FN=Arial; EF=; CO=0; PF=0\r\n\r\n" | |
63 | |
64 #define HOTMAIL_URL "http://www.hotmail.com/cgi-bin/folders" | |
65 #define PASSPORT_URL "http://lc1.law13.hotmail.passport.com/cgi-bin/dologin?login=" | |
66 | |
67 #define MSN_ONLINE 1 | |
68 #define MSN_BUSY 2 | |
69 #define MSN_IDLE 3 | |
70 #define MSN_BRB 4 | |
71 #define MSN_AWAY 5 | |
72 #define MSN_PHONE 6 | |
73 #define MSN_LUNCH 7 | |
74 #define MSN_OFFLINE 8 | |
75 #define MSN_HIDDEN 9 | |
76 | |
77 #define USEROPT_HOTMAIL 0 | |
78 | |
79 #define USEROPT_MSNSERVER 3 | |
80 #define MSN_SERVER "messenger.hotmail.com" | |
81 #define USEROPT_MSNPORT 4 | |
82 #define MSN_PORT 1863 | |
83 | |
84 #define MSN_TYPING_RECV_TIMEOUT 6 | |
85 #define MSN_TYPING_SEND_TIMEOUT 4 | |
86 | |
87 #define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}" | |
88 | |
89 #define GET_NEXT(tmp) \ | |
90 while (*(tmp) && *(tmp) != ' ' && *(tmp) != '\r') \ | |
91 (tmp)++; \ | |
92 *(tmp)++ = 0; \ | |
93 while (*(tmp) && *(tmp) == ' ') \ | |
94 (tmp)++; | |
95 | |
96 | |
97 struct msn_xfer_data { | |
98 int inpa; | |
99 | |
100 uint32_t cookie; | |
101 uint32_t authcookie; | |
102 | |
103 gboolean transferring; | |
4675
3145c5c45877
[gaim-migrate @ 4986]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
104 gboolean do_cancel; |
4542 | 105 |
106 char *rxqueue; | |
107 int rxlen; | |
108 gboolean msg; | |
109 char *msguser; | |
110 int msglen; | |
111 }; | |
112 | |
113 struct msn_data { | |
114 int fd; | |
115 uint32_t trId; | |
116 int inpa; | |
117 | |
118 char *rxqueue; | |
119 int rxlen; | |
120 gboolean msg; | |
121 char *msguser; | |
122 int msglen; | |
123 | |
124 GSList *switches; | |
125 GSList *fl; | |
126 GSList *permit; | |
127 GSList *deny; | |
128 GSList *file_transfers; | |
129 | |
130 char *kv; | |
131 char *sid; | |
132 char *mspauth; | |
133 unsigned long sl; | |
134 char *passport; | |
135 }; | |
136 | |
137 struct msn_buddy { | |
138 char *user; | |
139 char *friend; | |
140 }; | |
141 | |
142 /** | |
143 * Processes a file transfer message. | |
144 * | |
145 * @param ms The switchboard. | |
146 * @param msg The message. | |
147 */ | |
148 void msn_process_ft_msg(struct msn_switchboard *ms, char *msg); | |
149 | |
150 char *handle_errcode(char *buf, gboolean show); | |
151 char *url_decode(const char *msg); | |
152 | |
153 #endif /* _MSN_H_ */ |