Wed, 01 Dec 2004 02:30:47 +0000
[gaim-migrate @ 11454]
Several MSN memory leaks identified and fixed by Miah Gregory and Felipe
Contreras, plus my own fix for bug 1075347.
As normal, thank them for fixes, blame me for breakages.
Did I mention the new MSN icon? It rocks!
| 4542 | 1 | /** |
| 2 | * @file msn.h The MSN protocol plugin | |
| 3 | * | |
| 4 | * gaim | |
| 5 | * | |
|
9198
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 | * Gaim is the legal property of its developers, whose names are too numerous |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 | * source distribution. |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
9 | * |
| 4542 | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with this program; if not, write to the Free Software | |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 | */ | |
| 24 | #ifndef _MSN_H_ | |
| 25 | #define _MSN_H_ | |
| 26 | ||
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
27 | #include "internal.h" |
| 4542 | 28 | |
| 5717 | 29 | #include "account.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
30 | #include "accountopt.h" |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
31 | #include "blist.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
32 | #include "connection.h" |
| 5717 | 33 | #include "conversation.h" |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
34 | #include "debug.h" |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
35 | #include "md5.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
36 | #include "notify.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
37 | #include "privacy.h" |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
38 | #include "proxy.h" |
| 4542 | 39 | #include "prpl.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
40 | #include "request.h" |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
41 | #include "servconn.h" |
|
7590
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
42 | #include "sha.h" |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
43 | #include "sslconn.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
44 | #include "util.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
45 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
46 | #include "ft.h" |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8886
diff
changeset
|
47 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
48 | /* XXX */ |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5717
diff
changeset
|
49 | #include "gaim.h" |
| 4542 | 50 | |
| 51 | #define MSN_BUF_LEN 8192 | |
| 52 | ||
| 53 | #define USEROPT_MSNSERVER 3 | |
| 54 | #define MSN_SERVER "messenger.hotmail.com" | |
| 55 | #define USEROPT_MSNPORT 4 | |
| 56 | #define MSN_PORT 1863 | |
| 57 | ||
| 58 | #define MSN_TYPING_RECV_TIMEOUT 6 | |
| 59 | #define MSN_TYPING_SEND_TIMEOUT 4 | |
| 60 | ||
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
61 | #define HOTMAIL_URL "http://www.hotmail.com/cgi-bin/folders" |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
62 | #define PASSPORT_URL "http://lc1.law13.hotmail.passport.com/cgi-bin/dologin?login=" |
| 6516 | 63 | #define PROFILE_URL "http://members.msn.com/" |
| 4542 | 64 | |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
65 | #define USEROPT_HOTMAIL 0 |
| 4542 | 66 | |
| 67 | ||
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
5166
diff
changeset
|
68 | #define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}" |
| 4542 | 69 | |
|
5895
a0eef38294c1
[gaim-migrate @ 6327]
Mark Doliner <markdoliner@pidgin.im>
parents:
5872
diff
changeset
|
70 | #define MSN_CONNECT_STEPS 8 |
|
5564
1779a1bfbdb8
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
71 | |
|
5316
ec9cbe50e70c
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
72 | #define MSN_CLIENTINFO \ |
|
5475
a2f856cac665
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
73 | "Client-Name: Gaim/" VERSION "\r\n" \ |
|
6786
096ebddea1f3
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
74 | "Chat-Logging: Y\r\n" |
|
5316
ec9cbe50e70c
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
75 | |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
76 | |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
77 | typedef enum |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
78 | { |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
79 | MSN_LIST_FL_OP = 0x01, |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
80 | MSN_LIST_AL_OP = 0x02, |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
81 | MSN_LIST_BL_OP = 0x04, |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
82 | MSN_LIST_RL_OP = 0x08 |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
83 | |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
84 | } MsnListOp; |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6516
diff
changeset
|
85 | |
|
7590
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
86 | typedef enum |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
87 | { |
|
10275
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
88 | MSN_CLIENT_CAP_WIN_MOBILE = 0x001, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
89 | MSN_CLIENT_CAP_UNKNOWN_1 = 0x002, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
90 | MSN_CLIENT_CAP_VIEW_INK = 0x004, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
91 | MSN_CLIENT_CAP_SEND_INK = 0x008, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
92 | MSN_CLIENT_CAP_VIDEO_CHAT = 0x010, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
93 | MSN_CLIENT_CAP_BASE = 0x020, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
94 | MSN_CLIENT_CAP_MSNMOBILE = 0x040, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
95 | MSN_CLIENT_CAP_MSNDIRECT = 0x080, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
96 | MSN_CLIENT_CAP_WEBMSGR = 0x100 |
|
7590
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
97 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
98 | } MsnClientCaps; |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
99 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
100 | typedef enum |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
101 | { |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
102 | MSN_CLIENT_VER_5_0 = 0x00, |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
103 | MSN_CLIENT_VER_6_0 = 0x10, |
|
10275
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
104 | MSN_CLIENT_VER_6_1 = 0x20, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
105 | MSN_CLIENT_VER_6_2 = 0x30, |
|
186d84a66cc3
[gaim-migrate @ 11428]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9860
diff
changeset
|
106 | MSN_CLIENT_VER_7_0 = 0x40 |
|
7590
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
107 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
108 | } MsnClientVerId; |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
109 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
110 | #define MSN_CLIENT_ID_VERSION MSN_CLIENT_VER_6_0 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
111 | #define MSN_CLIENT_ID_RESERVED_1 0x00 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
112 | #define MSN_CLIENT_ID_RESERVED_2 0x00 |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
113 | #define MSN_CLIENT_ID_CAPABILITIES (MSN_CLIENT_CAP_BASE | MSN_CLIENT_CAP_VIEW_INK) |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
114 | |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
115 | #define MSN_CLIENT_ID \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
116 | ((MSN_CLIENT_ID_VERSION << 24) | \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
117 | (MSN_CLIENT_ID_RESERVED_1 << 16) | \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
118 | (MSN_CLIENT_ID_RESERVED_2 << 8) | \ |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
119 | (MSN_CLIENT_ID_CAPABILITIES)) |
|
54b26062c7e0
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6832
diff
changeset
|
120 | |
| 4542 | 121 | #endif /* _MSN_H_ */ |